How skins are rendered
Basic Facts
- A skin is a collection of viewports. Each viewport has a set of lines, each line a set of sublines (With different timeout values), each subline has a set of tokens which are finnaly rendered.
- The first viewport (the "default" one) is sized to the full screen (or the UI viewport set by the Base Skin if the theme isnt disabled)
- If no backdrop is specified (or forced off) a default backdrop is used
Current/svn/"legacy" renderer
The current renderer works like follows:
- On a full update, the default viewport is cleared, all lines are reset to the first subline, timeouts cleared.
- Mark all conditionally hidden viewports to be hidden
- For each viewport:
- Set all images to not be displayed
- If it was hidden and is now visible, clear the viewport
- For each line in the viewport (That has the correct update flag, or had its subline changed, OR ALWAYS IF THE VIEWPORT IS ALWAYS HIDDEN)
- Find the current subline
- Handle (but DO NOT draw) each individual tag (Some tags to do drawing now - Ideally all tags should be drawn now though)
- If a conditional is hit:
- Get the current value for the conditional.
- If the value is hiegher than the amount of options, use the last one
- Go over all tags in the conditional, Handle tags which need handling in a false case (i.e clear image areas)
- Handle the selected conditional
- Draw the peak meters (LCD_BITMAP) or the progressbar (LCD_CHARCELL)
- If there is more than one viwport and we are NOT in the default viewport, OR only one viewport, put the text from the HANDLE step onto the lcd
- draw the progressbars if this viewport has any
- draw each enabled (sub)image in this viewport
FS#11133 changes this the progressbar and image drawing to be drawn in the "Handle tag" step instead of at the end.
--
JonathanGordon - 2010-06-11
Copyright © by the contributing authors.