Canvas Object

Canvas is predefined object that defines the writeable screen area of your device.

Example

The canvas control has access to these methods

drawLine
drawCircle
drawRGB
drawPoint
drawText
drawPolygon
drawArrow
getFPS

 

w = canvas.getWidth

h = canvas.getHeight

 

canvas.drawRGB 0,0,0  // erase entire canvas area to black

 

dowhile (1)

canvas.drawRGB 0,47,108 // clear screen

color = rgb(random(255),random(255),random(255))
paint.setColor(color)

canvas.drawText outputstring, w,h,"CC"

angle = angle + 30

canvas.DRAW