Support and General Use > Theming and Appearance Customization
Skin viewport layering (draw text over images etc)
JdGordon:
Hi all,
This is a screenshot of what I've been working on recently. It's static so a bit hard to guess what is so impressive....
With svn, if you try drawing text over an image it will be very unpredictable as to what happens, and if the text scrolls you will get a line of the background colour instead of the image. So what I have added is a way to be able to draw directly to the background 'layer' which means you draw images onto one layer and text/dynamic stuff onto the normal layer.
It's a bit complicated to make work which is why I'm making this post, so hopefully the skin code is understandable.
Unless specified all viewports draw into the normal layer like now. If *any* viewports have the tag %VL in them will disable the normal backdrop handling (%Xd()) and cause those viewports to draw onto a new layer (which will have the flat bg_colour as its default colour)). Viewports without %VL then use that backdrop layer for their backdrop image.
Does that make any sense?
Attached is a modified cabbiev2.wps for the 240x320 pixel targets which demonstrates how to use this.
As you can see, the first viewport (Line 3) covers the whole screen and has the %VL tag so it is the background layer. In this example I draw the normal background image but there is no reason to draw the whole thing, you could draw multiple smaller images if you wanted. The only important thing though is you *must* use %x() because %xl() will cause the image to redraw too often and break the layering.
Next you can see the AA viewport also draws to the backdrop layer, then there is one more viewport which covers the whole screen (required or you might not redraw the whole screen) and the rest of the wps is unmodified.
comments?
This isnt in svn yet and needs some fiddling with drivers to work, so if you want to help test tell me which target to build for you.
lebellium:
It seems that is what I need for my R0 theme ;D
I'm just not sure to have really understood for the %x() vs %xl() tag but well I'll see that when I have the opportunity to try your new code, I hope very soon :P
Poodlemastah:
Perhaps this would be a good time to include some kind of shadow/outline to ensure readability?
Take your SS for example, there the text over the AA is basically unreadable?
kugel.:
--- Quote from: Poodlemastah on December 02, 2011, 11:45:05 AM ---Perhaps this would be a good time to include some kind of shadow/outline to ensure readability?
Take your SS for example, there the text over the AA is basically unreadable?
--- End quote ---
I don't think that's needed. Normally you aren't going to draw above arbitrary images (read: album art), but known ones. Then you can select the font (e.g. anti-aliased) and color appropriately.
cereal_killer:
So then it might be possible to use the albumart as a backdrop in the wps? That would be cool, especially when I am thinking of screens like the ones of the clip zip, where there is not too much space. But the readability has to be considered, because usually CD covers are images with different colours.
Navigation
[0] Message Index
[#] Next page
Go to full version