Static methods

@:value({ num : 0 })staticget(num:Int = 0):Pen

Get current Pen.

Parameters:

num

(optional) pen id (0 by default).

Methods

notify(?downListener:(Int, Int, Float) ‑> Void, ?upListener:(Int, Int, Float) ‑> Void, ?moveListener:(Int, Int, Float) ‑> Void):Void

Creates event handlers from passed functions.

Parameters:

downListener

(optional) function with x:Int,y:Int,pressure:Float arguments, fired when a pen is pressed down. pressure is force of pressure on the screen in the range from 0 to 1.

upListener

(optional) function with x:Int,y:Int,pressure:Float arguments, fired when a pen is released.

moveListener

(optional) function with x:Int,y:Int,pressure:Float arguments, fired when a pen is moved.

notifyEraser(eraserDownListener:(Int, Int, Float) ‑> Void, eraserUpListener:(Int, Int, Float) ‑> Void, eraserMoveListener:(Int, Int, Float) ‑> Void):Void

Creates event handlers from passed functions specific to the pen's eraser.

Parameters:

downListener

function with x:Int,y:Int,pressure:Float arguments, fired when an eraser is pressed down. pressure is force of pressure on the screen in the range from 0 to 1.

upListener

function with x:Int,y:Int,pressure:Float arguments, fired when an eraser is released.

moveListener

function with x:Int,y:Int,pressure:Float arguments, fired when an eraser is moved.

notifyEraserWindowed(windowId:Int, eraserDownListener:(Int, Int, Float) ‑> Void, eraserUpListener:(Int, Int, Float) ‑> Void, eraserMoveListener:(Int, Int, Float) ‑> Void):Void

Creates event handlers from passed functions like notifyEraser function, but only for window with windowId:Int id argument. The windows are not supported by all the targets.

notifyWindowed(windowId:Int, ?downListener:(Int, Int, Float) ‑> Void, ?upListener:(Int, Int, Float) ‑> Void, ?moveListener:(Int, Int, Float) ‑> Void):Void

Creates event handlers from passed functions like notify function, but only for window with windowId:Int id argument. The windows are not supported by all the targets.

remove(?downListener:(Int, Int, Float) ‑> Void, ?upListener:(Int, Int, Float) ‑> Void, ?moveListener:(Int, Int, Float) ‑> Void):Void

Removes event handlers from the passed functions that were passed to notify function.

removeEraser(eraserDownListener:(Int, Int, Float) ‑> Void, eraserUpListener:(Int, Int, Float) ‑> Void, eraserMoveListener:(Int, Int, Float) ‑> Void):Void

Removes event handlers from the passed functions that were passed to notifyEraser function.

removeEraserWindowed(windowId:Int, eraserDownListener:(Int, Int, Float) ‑> Void, eraserUpListener:(Int, Int, Float) ‑> Void, eraserMoveListener:(Int, Int, Float) ‑> Void):Void

Removes event handlers for windowId:Int from the passed functions that were passed to notifyEraserWindowed function.

removeWindowed(windowId:Int, ?downListener:(Int, Int, Float) ‑> Void, ?upListener:(Int, Int, Float) ‑> Void, ?moveListener:(Int, Int, Float) ‑> Void):Void

Removes event handlers for windowId:Int from the passed functions that were passed to notifyWindowed function.