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: 
roquoonewbie
Visitor

roImageCanvas on roPosterScreen

Is it possible to draw an arbitrary image at a location on an roPosterScreen (or roSpringBoardScreen for that matter)?

When I try doing it with roImageCanvas, it "works", however the process of "Showing" it removes all input control form the Poster Screen (and you can't get it back until you exit the image canvas by pressing "Up" (which removes the image from being displayed).

Is roImageCanvas the only way to draw an image on these screens? If so, is there any way to set it up so that it does not supercede the underlying screen (and instead just becomes a visible element on the screen, without taking any focus or control from it)? If not, what is the other way?
0 Kudos
8 REPLIES 8
destruk
Streaming Star

Re: roImageCanvas on roPosterScreen

If both the canvas and the springboard share the message port, then you can do that. I gave up trying to overlay image canvases on other screens because sometimes the posters/item content takes longer to populate and other times it is faster.
What ended up happening was it'd either work fine, with everything visible, or just the canvas was visible and the icons never showed up - I tried adding sleep to give it time to draw before drawing the canvas but just couldn't get the timing to be acceptable for every situation with delays on the roku.
The 'standard approved?' way of display a unique image on a poster screen is to use the primary and/or secondary logo and offsets with the app manager/theme.
If you want, you can enable the ad banner to display your download-only image at the bottom middle of a poster screen.
0 Kudos
TheEndless
Channel Surfer

Re: roImageCanvas on roPosterScreen

"destruk" wrote:
If both the canvas and the springboard share the message port, then you can do that.

Actually, you can't. The top most screen always takes the input, so you wouldn't get any events for the springboard/poster screen underneath as long as the canvas is on top. Also, as you noted, with the image canvas on top, the springboard/poster underneath won't get repainted without a show/sleep/show type of hack, which makes for a pretty miserable user experience.

If you want a custom springboard/poster screen, then you'll need to custom draw the whole thing, as well as implement the appropriate functionality. A daunting task, to say the least.
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
roquoonewbie
Visitor

Re: roImageCanvas on roPosterScreen

My problem with the "standard" way is that I cannot get the secondary logo to display, no matter what I try.

See this thread on that: viewtopic.php?f=34&t=46649&p=316750#p316750

I am starting to think it simply does not work and nobody has ever needed/used it.

Even if I got it to show, it seems you can't specify the dimensions it should consume, so you can't, for instance, resize an image to fit nicely into the overhang (as you can do with roImageCanvas).

Or am I missing something? Has anyone actually *seen* a secondary logo? And is there any way to specify it's dimensions to resize it?
0 Kudos
destruk
Streaming Star

Re: roImageCanvas on roPosterScreen

"TheEndless" wrote:
"destruk" wrote:
If both the canvas and the springboard share the message port, then you can do that.

Actually, you can't. The top most screen always takes the input, so you wouldn't get any events for the springboard/poster screen underneath as long as the canvas is on top. Also, as you noted, with the image canvas on top, the springboard/poster underneath won't get repainted without a show/sleep/show type of hack, which makes for a pretty miserable user experience.

If you want a custom springboard/poster screen, then you'll need to custom draw the whole thing, as well as implement the appropriate functionality. A daunting task, to say the least.


What I mean is - if you send the handle to the poster screen to the canvas, or create both in the same subroutine, then you can have the canvas check for input button presses and update the screen underneath.
Setfocusedlist/setfocused filter/etc etc - and handle it that way. Anyway, it's a miserable user experience like you said so why go through the headache to try to make it work...
0 Kudos
roquoonewbie
Visitor

Re: roImageCanvas on roPosterScreen

So has anyone ever actually gotten a secondary logo to appear at all?
0 Kudos
TheEndless
Channel Surfer

Re: roImageCanvas on roPosterScreen

In the deviantart sample app, this works for me:

Sub SetTheme()
app = CreateObject("roAppManager")
theme = CreateObject("roAssociativeArray")

theme.OverhangSliceSD = "pkg:/images/Overhang_BackgroundSlice_Blue_SD43.png"
theme.OverhangPrimaryLogoOffsetSD_X = "72"
theme.OverhangPrimaryLogoOffsetSD_Y = "25"
theme.OverhangPrimaryLogoSD = "pkg:/images/Logo_Overhang_Roku_SDK_SD43.png"
theme.OverhangSecondaryLogoOffsetSD_X = "472"
theme.OverhangSecondaryLogoOffsetSD_Y = "25"
theme.OverhangSecondaryLogoSD = "pkg:/images/Logo_Overhang_Roku_SDK_SD43.png"

theme.OverhangSliceHD = "pkg:/images/Overhang_BackgroundSlice_Blue_HD.png"
theme.OverhangPrimaryLogoOffsetHD_X = "123"
theme.OverhangPrimaryLogoOffsetHD_Y = "48"
theme.OverhangPrimaryLogoHD = "pkg:/images/Logo_Overhang_Roku_SDK_HD.png"
theme.OverhangSecondaryLogoOffsetHD_X = "523"
theme.OverhangSecondaryLogoOffsetHD_Y = "48"
theme.OverhangSecondaryLogoHD = "pkg:/images/Logo_Overhang_Roku_SDK_HD.png"

app.SetTheme(theme)
End Sub
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
roquoonewbie
Visitor

Re: roImageCanvas on roPosterScreen

I copied and pasted your exact code into the deviantart sample app (replacing the SetTheme() function that came with it).

The secondary logo does not show. I see one "Roku SDK" logo appear in the primary logo position. But nothing in the secondary logo position.

Are you certain you see two logos on your screen?
0 Kudos
TheEndless
Channel Surfer

Re: roImageCanvas on roPosterScreen

"roquoonewbie" wrote:
I copied and pasted your exact code into the deviantart sample app (replacing the SetTheme() function that came with it).

The secondary logo does not show. I see one "Roku SDK" logo appear in the primary logo position. But nothing in the secondary logo position.

Are you certain you see two logos on your screen?

I do on a Roku 1. Let me try my Roku 2... hrmm... Interesting. It doesn't seem to work on a Roku 2. Sounds like a firmware bug.
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