Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Haijal
Visitor

Using roImageCanvas with HD and SD versions

I have been changing my Roku channel to include a better UI to categorize my different types of content on the channel. I am using a Roku Box 3 which only offers HD versions, and the UI looks great and works wonderful. I am using a canvas and image canvas to display four pictures, and whenever the user is "hovering over" one of the images it changes to make it stand out from the other pictures. Like I said this works very well I am very pleased with it right now. My concern is that it will not scale the same and horrible on the SD version of my channel because the images cover the HD screen.

I know with header images you can give an HD and a SD version of the header image and change the size depending on the quality(HD or SD). However, I do not see documentation for something along those lines for roImage canvases. I did a search before posting this and one of the topic mentioned roScreen and it looks like it is manly used for games on the Roku, however I was wondering if a roScreen would be better to used for this. I do not have much experience with developing with Brightscript, however I would really love to have this UI change for my channel as it makes it look much better and expands my content library by at least twice as much.
Current Roku Channel for Global Sportsman Network(http://globalsportsman.com)
0 Kudos
2 REPLIES 2
Haijal
Visitor

Re: Using roImageCanvas with HD and SD versions

Just In case someone comes to this posting looking for the same information I found the solution to this problem. You can use di = CreateObject("roDeviceInfo") and then di.GetDisplayMethod() to find what the user's Roku bos display is set in SD or HD. You will need to check the SDK for correct syntax, however, that is very close, think of it as Pseudocode. I created my images in a function, so in side that function I used a condition statement to check if the viewing box is SD or HD mode, and then created the targetRect accordingly.
Current Roku Channel for Global Sportsman Network(http://globalsportsman.com)
0 Kudos
Komag
Roku Guru

Re: Using roImageCanvas with HD and SD versions

I personally use:

di = CreateObject("roDeviceInfo")
SD = di.GetDisplayMode() ' Returns a string such as 480i, 480p, 720p, 1080p
? "DisplayMode " SD
IF SD = "480i" OR SD = "480p" THEN SD = TRUE ELSE SD = FALSE ' Save it as a Bool
? "Display is SD: " SD
0 Kudos