23 lines
396 B
Plaintext
23 lines
396 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
|