Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#8856 - WPS viewport definition: allow background color to be non-transparent even with enabled backdrop

Attached to Project: Rockbox
Opened by Matthias Mohr (aka Massa) (mmohr) - Monday, 07 April 2008, 01:38 GMT+2
Last edited by Matthias Mohr (aka Massa) (mmohr) - Wednesday, 28 May 2008, 08:29 GMT+2
Task Type Patches
Category Themes
Status Closed
Assigned To No-one
Player Type All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Private No

Details

Behaviour of current SVN version:
If you use a background colour in your viewport tag %V, it'll only be used when no backdrop has been enabled.
When a backdrop is enabled, the defined background colour is ignored and the colour of the backdrop at that position will be used instead.

This patch extends the viewport WPS-Tag with an optional parameter to use the defined background colour even when a backdrop is used or to keep the behaviour as is.

The complete syntax of the extended viewport definition is:
%V|x|y|width|height|font|fg_pattern|bg_pattern|[[bg_use_backdrop]|]

You're allowed to use any of the following variations:

%V|x|y|width|height|font|fg_pattern|bg_pattern|
%V|x|y|width|height|font|fg_pattern|bg_pattern||
%V|x|y|width|height|font|fg_pattern|bg_pattern|1|
In all above variations bg_use_backdrop will be set to 1;
If a backdrop is present, the defined background colour will be ignored and the backdrop colour will be used instead.
This is how the current SVN version works...

%V|x|y|width|height|font|fg_pattern|bg_pattern|0|
bg_use_backdrop will be set to 0;
Even when a backdrop is enabled, bg_pattern will be used as background colour.

Note: the whole feature is (currently) only implemented for 16-bit colour targets!
Other targets won't be affected.

Note2: using bg_use_backdrop=1 will always display the backdrop as background, even when viewports overlap (which is btw. not officially allowed atm.).
BTW, this behaviour is exactly as it is now - I just want to mention it ;)

The patch is made against SVN version 16999...
Comments are welcome!

Enjoy!
Massa
   vp_bgcolor_use_backdrop_20080407.diff (12.7 KiB)
 apps/screen_access.c          |    2 +
 apps/screen_access.h          |    2 +
 apps/plugins/test_viewports.c |   22 ++++++++++++----
 apps/gui/wps_debug.c          |   11 +++++++-
 apps/gui/viewport.c           |    1 
 apps/gui/wps_parser.c         |   56 +++++++++++++++++++++++++++++++++++++++---
 firmware/export/lcd.h         |    3 ++
 firmware/drivers/lcd-16bit.c  |   37 +++++++++++++++++++++++----
 8 files changed, 118 insertions(+), 16 deletions(-)

This task depends upon

Closed by  Matthias Mohr (aka Massa) (mmohr)
Wednesday, 28 May 2008, 08:29 GMT+2
Reason for closing:  Invalid
Additional comments about closing:  the whole idea has to be reconsidered...

Loading...