Forum Discussion

andreV's avatar
andreV
Visitor
11 years ago

Canvas Item Definitions

We see the use of images and text in canvas items in many examples available both from Roku and from other developers.
Is there a strict definition of all of the available combinations of the properties that a canvas item is made up from?

i.e. { url: "http://www.domain.com/mages/image1.png"
TargetRect: {x: borderPosX,
y: borderPosY,
w: 100,
h: 100}

This makes an image item.

What other combinations of properties will the Roku identify and create an item for? Is there a document that defines this somewhere?
Can the markup be more complex and have a container for items?

i.e. {list:[
{ url: "http://www.domain.com/mages/image1.png"
TargetRect: {x: borderPosX,
y: borderPosY,
w: 100,
h: 100},
{ url: "http://www.domain.com/mages/image2.png"
TargetRect: {x: borderPosX,
y: borderPosY,
w: 100,
h: 100},
{ url: "http://www.domain.com/mages/image3.png"
TargetRect: {x: borderPosX,
y: borderPosY,
w: 100,
h: 100}
]}


thank you,

Andrej

1 Reply

  • +1 to that request!
    Document all working items for roCanvas (for example, it has been said elsewhere - undocumentedly - that omitting URL from above but adding color is good for painting rectangles)