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: 
dreamer2057
Channel Surfer

How to get real screen size?

Hello! I what to get real size of the client screen. How can i do it?
Like this:

...
canvas = CreateObject("roImageCanvas")
...
sizes = canvas.GetCanvasRect()
...

But this code returns to me the object with size, which i set early, not real.
Sincerely, Sergey Shoshin, software developer.
0 Kudos
2 REPLIES 2
TheEndless
Channel Surfer

Re: How to get real screen size?

Take a look at roDeviceInfo. GetDisplaySize() should get you what you're looking for.
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
dreamer2057
Channel Surfer

Re: How to get real screen size?

"TheEndless" wrote:
Take a look at roDeviceInfo. GetDisplaySize() should get you what you're looking for.

Yes, thanks! For setting size as full screen we can use empty object like this:

canvas.SetCanvasRect = { x: 0, y: 0, w: 0, h: 0 }

If I right understand.
Sincerely, Sergey Shoshin, software developer.
0 Kudos