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: 
dreamer2057
Level 7

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
TheEndless
Level 7

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
Level 7

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