Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 

scaling scene graph components for different resolutions

How is scene scaling handled in the roku scene graph components? I can set the size in the component like the poster height and width, but when I change the ui_resolutions in the manifest file, I don't see it "automatically scale" the images. Am I supposed to make a component for each resolution and add those components dynamically? Or should I just set the ui_resolutions to "hd" for 720p and use that sizing in my components?
0 Kudos
5 Replies
Roku Employee
Roku Employee

Re: scaling scene graph components for different resolutions

Theoretically at least, 9patch images should automatically scale to the correct size.

- Joel
0 Kudos

Re: scaling scene graph components for different resolutions

What's a 9patch image? And the question applies to any transformation or dimension. If the components are laid out at X resolution, how are they scaled to Y?
0 Kudos
TheEndless
Level 7

Re: scaling scene graph components for different resolutions

If you only specify a single ui_resolution of "hd" or "fhd" in the manifest, it will scale automatically between the two. Specifying both "hd,fhd" tells the renderer that your layout/code includes images and coordinates for both. For SD, there is no auto-scaling.
There's built-in support for specifying different resolution images via the uri_resolution_autosub manifest setting, but I haven't yet figured out the best way to deal with multiple resolution coordinates aside from explicitly modifying all of the applicable locations and sizes in code, which is a pain.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
Roku Employee
Roku Employee

Re: scaling scene graph components for different resolutions

Documentation is here:
http://sdkdocs.roku.com/display/sdkdoc/ ... Resolution

Engineering says:
"There are several tutorials online about 9-patch artwork. Most are Android-related, but 9-patch is not an Android-only thing. Here’s a good one:
http://radleymarx.com/blog/simple-guide-to-9-patch/

If you want SD support in 7.0, you have to do SD layouts and include SD artwork."

- Joel
0 Kudos

Re: scaling scene graph components for different resolutions

Okay, so it sounds like I always need sd in there since HD dimensions will never scale down to 480 for me. So my choices are sd,hd or sd,fhd with the distinction of what dimensions I was to design my hd components at (720p vs 1080p). I just tested it and as you said adding sd on the front doesn't change the display on the 720p machine. Thanks.
0 Kudos