Pen functions
Free functions you can call directly in sprite code.
changePenSize
Section titled “changePenSize”changePenSize(amount: number): voidChange the pen size by an amount.
Delegates to Sprite.penSize
clearPen
Section titled “clearPen”clearPen(): voidClear all pen marks from the stage.
Delegates to Sprite.clearPen
getPenColor
Section titled “getPenColor”getPenColor(): ColorGet the current pen color.
Delegates to Sprite.penColor
getPenDown
Section titled “getPenDown”getPenDown(): booleanGet whether the pen is currently down.
Delegates to Sprite.penDown
getPenSize
Section titled “getPenSize”getPenSize(): numberGet the current pen size.
Delegates to Sprite.penSize
penDown
Section titled “penDown”penDown(): voidPut the pen down so the sprite draws as it moves.
Delegates to Sprite.penDown
penUp(): voidLift the pen up so the sprite stops drawing.
Delegates to Sprite.penDown
setPenColor
Section titled “setPenColor”setPenColor(color: Color): voidSet the pen color.
Delegates to Sprite.penColor
setPenSize
Section titled “setPenSize”setPenSize(size: number): voidSet the pen size.
Delegates to Sprite.penSize
stamp(): voidStamp this sprite’s image onto the pen layer.
Delegates to Sprite.stamp