So I tried to throw together a little app to plot points on the screen, using 1 pixel .png images, of red green and blue. Not working. Background display is working. Any suggestions as to why nothing is showing up? The idea was to plot a point and leave it up, plot another in 3 colors, just an experiment. Nothing is happening except if I set the background, which I have commented out in case it was overlaying the points. Heres the code, based off a screensaver test TheEndless posted a while back.
sub main()
backgroundHD = {
Color: "#000000",
TargetRect: { x: 0, y: 0, w: 1280, h: 720 }
}
rx=640
ry=360
gx=640
gy=360
bx=640
by=360
gpix={url:"pkg:/green.png"
TargetRect:{x:gx,y:gy,w:10,h:10}}
bpix={url:"pkg:/blue.png"
TargetRect:{x:bx,y:by,w:10,h:10}}
rpix={url:"pkg:/red.png"
TargetRect:{x:rx,y:ry,w:10,h:10}}
port = CreateObject( "roMessagePort" )
canvas = CreateObject( "roImageCanvas" )
canvas.SetMessagePort(port)
canvas.SetRequireAllImagesToDraw( false )
'canvas.SetLayer( 1, backgroundHD)
canvas.Show()
canvas.SetRequireAllImagesToDraw(false)
While true
msg = Wait(10, port )
if Type(msg)="roImageCanvasEvent" then
?msg.GetMessage()
If msg.isRemoteKeyPressed() Then
canvas.Close()
Return
End If
end if
rx=rx+rnd(3)-2
ry=ry+rnd(3)-2
gx=gx+rnd(3)-2
gy=gy+rnd(3)-2
bx=bx+rnd(3)-2
by=by+rnd(3)-2
canvas.SetLayer( 2, gpix)
canvas.SetLayer( 3, bpix)
canvas.SetLayer( 4, rpix)
canvas.show()
?rx,ry,gx,gy,bx,by
End While
End Sub
Screenshades: The first Screensaver for Roku2!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!