Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  Album Art as Backdrop
« previous next »
  • Print
Pages: [1]

Author Topic: Album Art as Backdrop  (Read 1477 times)

Offline RockBoxFan

  • Member
  • *
  • Posts: 55
Album Art as Backdrop
« on: April 01, 2015, 04:38:58 PM »
Is it possible to use the %VB tag to display album art as a backdrop?

I am attempting this one a 1g Nano.  Here is a code fragment:

%V(0,0,-,-,-)%VB           
%V(0,0,-,-,-)             

%Fl(4,21-Adobe-Helvetica.fnt,50)

%Vd(A)%VB
%Vd(t)

%Vl(A,22,0,132,132,1)
%Cl(0,0,132,132,c,c)
%Cd%VB

%Vl(t,40,42,65,20,4)%Vf(000000)
%al%pc

(I am trying to write black text over the album art.)

This seems to work in the simulator, but the results are inconsistent, meaning I have to re-load the theme each time I start the simulator.  Is this concept supported, and am I doing it correctly?

Thanks!
Logged

Offline ploco

  • Member
  • *
  • Posts: 18
Re: Album Art as Backdrop
« Reply #1 on: April 01, 2015, 05:13:55 PM »
Don't forget to force update the top layer after draw in backdrop.

%V(0,0,-,-,-)
%Fl(4,21-Adobe-Helvetica.fnt,50)

%Vd(A)%Vd(t)
%Vl(A,22,0,132,132,1)%VB
%Cl(0,0,132,132,c,c)
%Cd
#force update View A
%Vl(A,22,0,132,132,1)
%Vl(t,40,42,65,20,4)%Vf(000000)
%al%pc
Logged

Offline RockBoxFan

  • Member
  • *
  • Posts: 55
Re: Album Art as Backdrop
« Reply #2 on: April 01, 2015, 05:30:35 PM »
Wow, that does seem to stabilize things (much more consistent, so I don't have to keep reloading the theme).

Thanks!

Can you explain why I need this extra line and what it does, or perhaps point me to some documentation?  I have been trying to work it out from the wiki:

http://www.rockbox.org/wiki/CustomWPS#Viewport_Draw_Layer

which says "Any viewports you want drawn on the backdrop need the %VB tag but otherwise code as normal."

Why do I need to force an update to the top layer (and how does your extra command force that?).
Logged

Offline ploco

  • Member
  • *
  • Posts: 18
Re: Album Art as Backdrop
« Reply #3 on: April 01, 2015, 07:36:54 PM »
%VB only associate with viewports, such as %V or %Vl( not %Vd)
So whenever you want to drawn on backdrop, only need to append a %VB to the end of the %V line
however there isn't any documents record the needs of top layer overlay except from the demo script
%V(0,0,-,-,-)%VB           
%V(0,0,-,-,-)

indicates "I drawn, then I menially refresh the screen by putting a same size viewport right on top of it "

My guess is that top layer viewport always receive a screen refreshment after drawn but button layer does not get the same treatment.

I think this extra top layer is a plus
for example
%V(A,22,0,132,132,1)%VB
%Cl(0,0,132,132,c,c)
%Cd
#use a bmp with alpha channel can make really fancy photo frame.
%V(A,22,0,132,132,1)
%x(frame,frame.bmp,0,0)
 
     
Logged

Offline RockBoxFan

  • Member
  • *
  • Posts: 55
Re: Album Art as Backdrop
« Reply #4 on: April 02, 2015, 08:08:18 AM »
That makes sense.  Thank you so much for your help!
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  Album Art as Backdrop
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 5.503 seconds with 15 queries.