Ok, maybe I'm missing something here:
1. I draw a black background on layer by using a screensize rect with color black
backgroundHD = {
Color: "#000000",
TargetRect: { x: 0, y: 0, w: 1280, h: 720 }
}
canvas.SetLayer( 0, backgroundHD)
2. anything I draw on layer 0 after that is persistant
gpix={color:"#00FF0040"
CompositionMode:"Source_Over"
TargetRect:{x:gx,y:gy,w:50,h:50}}
bpix={color:"#0000FF40"
CompositionMode:"Source_Over"
TargetRect:{x:bx,y:by,w:50,h:50}}
rpix={color:"#FF000040"
CompositionMode:"Source_Over"
TargetRect:{x:rx,y:ry,w:50,h:50}}
... 'calculations to move the squares around the screen
rpix.TargetRect.x = rx
rpix.TargetRect.y = ry
rpix.CompositionMode="Source_Over"
gpix.TargetRect.x = gx
gpix.TargetRect.y = gy
gpix.CompositionMode="Source_Over"
bpix.TargetRect.x = bx
bpix.TargetRect.y = by
bpix.CompositionMode="Source_Over"
canvas.SetLayer(0,rpix)
canvas.SetLayer(0,gpix)
canvas.SetLayer(0,bpix)
3. but if I set each color square to its own layer:
canvas.SetLayer(1,rpix)
canvas.SetLayer(2,gpix)
canvas.SetLayer(3,bpix)
every draw replaces the previous draw.
So, I guess my question is, how do I keep persistant drawing on multiple layers, or does it only work on layer 0? Sticking a background on a layer other than 0 first doesn't seem to have an effect.
Screenshades: The first Screensaver for Roku2!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!