Forum Discussion

idunno's avatar
idunno
Visitor
14 years ago

Changing From roImageCanvas to roScreen questions

It has become apparent that I will need to use roScreen in my program instead of roImageCanvas in order to speed up my program. My program makes heavy use of roImageCanvas, specifically the setLayer, clearLayer and swapLayer, in addition to the ability to setLayer something on an already occupied layer to overwrite what is already on that layer. I was wondering if there was a way for roScreen to reproduce any/all of these effects, and how I should go about changing my program to use roScreen, since I have never used it before.

17 Replies

  • It's worth noting (just in case you are using it) that rotation in roScreen is not equivalent to rotation in roImageCanvas. Last time I checked, roScreen could only rotate by 90 degree increments.

    P.S. We would *happily* write a compatibility library so you could use roScreen like roImageCanvas if rotation was fixed, as we would be doing it anyway to fix KidPaint. Really, the only thing that's kept KidPaint from being fixed from the buggy implementation that exists using multiple (many!) canvases is that the rotation we need can't be achieved through roScreen. We would actually implement rotation ourselves (albeit slowly) if we could convert both directions between bytearray and roBitmap, but that's missing as well last time I checked. In fact that's what blocked us getting a very low-end (slow) VNC client working (the TCP server that speaks the protocol is written already...).
  • Since 4.5 or so firmware, you can rotate to any angle.

    - Joel
  • "RokuJoel" wrote:
    Since 4.5 or so firmware, you can rotate to any angle.

    Hmm, then I guess I have some work to do, don't I? 😉
  • "kbenson" wrote:
    "RokuJoel" wrote:
    Since 4.5 or so firmware, you can rotate to any angle.

    Hmm, then I guess I have some work to do, don't I? 😉

    I was actually testing this out the other day.. don't get your hopes up too high... 😉
    Also, still limited to 90 degree rotations on the Roku 1.
  • "TheEndless" wrote:
    "kbenson" wrote:
    "RokuJoel" wrote:
    Since 4.5 or so firmware, you can rotate to any angle.

    Hmm, then I guess I have some work to do, don't I? 😉

    I was actually testing this out the other day.. don't get your hopes up too high... 😉
    Also, still limited to 90 degree rotations on the Roku 1.


    Actually, I just checked some old email, and I was notified about this. I think the lack of arbitrary rotation angles on the Roku 1 that caused me to not go forward with creating a roImageCanvas shim. So, first, sorry to Roku for shooting my mouth off about it not being supported, that's what I get for not paying attention.

    Second, since I said I would work on implementing the an roImageCanvas to roScreen shim if they provided rotation, I'll at least try. 🙂
  • Guys

    I'm working on a Scene Graph project and I have to overlay a non-transparent image over video while it is playing.
    I saw this example and believe it is a great place to start. Looking at the 2DVideoLayers example (note : great example )

    I changed the object from roScreen to roSGScreen ... and ran into some issues.

    orig = screen=createobject("roscreen",true)
    new screen=createobject("roSGScreen",true)

    I made some changes and did some debugging to find that I get stuck on line 119 screen.setalphaenable(true) 'enable transparency

    roSGScreen does not have this method and I was wondering what the equivalent for setaplhaenable(true) might be using the roSGScreen object ?

    Ran into some issues and wanted to ask someone if I'm going in the right direction.

    Also trying to use roVideoPlayer instead of roVideoScreen.... and then use roImageCanvas to paint the image on top of the video.

    Any suggestions / help