Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
xtr33me
Level 7

Any requirements for images drawn on screen?

I have not had luck finding this and was wondering if there was some documentation somewhere describing what can and cant be rendered to screen. The reason I ask is I am displaying data in a tabular fashion using roCanvas. I wanted a graphical background to display behind the text I am printing to screen but when I use the png image I created in photoshop with a size of 1280x720 and a transparency layer, I get nothing. However if I use a smaller graphic, that does not have transparency, the image shows up. I am assumign this is a restriction onthe device and was hoping I could better find what is allowed. Any help would be great. Thanks!

pics = []
pics.Push({
url: "pkg:/artwork/travel.png"
targetRect: m.canvas.GetCanvasRect()
})
m.canvas.ClearLayer(3)
m.canvas.SetLayer(2,pics)
m.canvas.SetLayer(3, m.decodedText["sid"])
0 Kudos
3 REPLIES 3\
TheEndless
Level 10

Re: Any requirements for images drawn on screen?

What does "m.decodedText["sid"]" look like? Presumably, it's not just a string, as that's not the correct format for a text layer on roImageCanvas.

Also, for your pics, if you want transparency, try setting the CompositionMode to "Source_Over" to enable alpha blending (http://sdkdocs.roku.com/display/sdkdoc/ ... +Meta-Data).
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
xtr33me
Level 7

Re: Any requirements for images drawn on screen?

"TheEndless" wrote:
What does "m.decodedText["sid"]" look like? Presumably, it's not just a string, as that's not the correct format for a text layer on roImageCanvas.

Also, for your pics, if you want transparency, try setting the CompositionMode to "Source_Over" to enable alpha blending (http://sdkdocs.roku.com/display/sdkdoc/ ... +Meta-Data).


Thanks for the reply. First off, the decodedText["sid"] is pointing to an AA as shown below. I appologize as that wasn't supposed to make the copy and paste, as the issue I am having right now is with the pics portion Smiley Happy Regardless, I did try using sourc_over as well yesterday and wasn't having any luck with my image coming up. Is it ok if my image has a transparency layer to begin with? I have no problem getting a black square to be transparent by changing the alpha in the color, but have not had luck with this image. I am going to be playing with this some more today so I will post here anything new I find.

arr["sid"] = CreateObject("roAssociativeArray")
arr["sid"]["targetRect"] = {x: decodedTextStartPoint.x, y: decodedTextStartPoint.y, w: tableWidths.wCol1, h: tableHeight}
arr["sid"]["textAttrs"] = textAttr
arr["sid"]["text"] = ""
0 Kudos
xtr33me
Level 7

Re: Any requirements for images drawn on screen?

All this time on this thing, tryin to get it to work and a simple clean and rebuild seems to have fixed it. I should have tried the simple things first Smiley Tongue Anyways, thanks for the help. Using "Source_Over" does work and something must have just not been getting packaged right.
0 Kudos