Files
RCBASIC4/doc/files/activecanvas.txt
2026-02-26 15:33:51 -06:00

24 lines
397 B
Plaintext

#title ActiveCanvas [RCBasic Doc]
#header Function ActiveCanvas()
Returns the canvas that drawing commands are currently applied to
#code
c1 = OpenCanvas(640, 480, 0, 0, 640, 480, 0)
c2 = OpenCanvas(640, 480, 0, 0, 640, 480, 0)
Canvas(c1)
If ActiveCanvas() = c1 Then
Print "Active canvas is c1"
End If
Canvas(c2)
If ActiveCanvas() = c2 Then
Print "Active canvas is now c2"
End If
#/code