strattonbrazil
Binge Watcher
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2015
10:21 PM
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?
5 REPLIES 5

RokuJoel
Binge Watcher
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2015
05:58 PM
Re: scaling scene graph components for different resolutions
Theoretically at least, 9patch images should automatically scale to the correct size.
- Joel
- Joel
strattonbrazil
Binge Watcher
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2015
08:22 PM
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?

TheEndless
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2015
12:58 PM
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.
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)
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)

RokuJoel
Binge Watcher
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2015
03:21 PM
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
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
strattonbrazil
Binge Watcher
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2015
11:03 PM
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.