Forum Discussion

amit_thakkar's avatar
14 years ago

Dynamically add items in canvasItems of roImageCanvas Exampl

HI..
I am using
roImageCanvas
component for my channel.
& i have referred the example of the same given in document i.e. ComponentReference.pdf in SDK.
in that example showImageCanvas() function is there & in that function canvasItems is decalred which contains static data.
now i want to fill canvasItems dynamically which will come from xml. so i can use SetLayer(int zOrder, roArray contentList) function & assign my xml content to the contentlist argument.
how can i implement them.
plz help.


Thanks
Amit Thakkar

1 Reply

  • Amit,

    I think the very best place to start is by experimenting with the customvideoplayer which is found in the Roku SDK packages. It should give you some ideas on how you can dynamically add content to the canvas layer. It's a good working example of using the image canvas and should get you started. You'll have a much better understanding of the roImageCanvas after you've used and modified it for awhile.

    Good luck! It takes a while but eventually it starts to make sense.
    Mark