Skip to main content

Interface: InkController

InkInput.InkController

Interface for classes that proceess digital ink

Properties:
NameTypeAttributesDescription
canvasRendering.2D.InkCanvas2D|Rendering.WebGL.InkCanvasGLInk canvas
transformCommon.Matrix<optional>Transformation matrix that describes viewport transform. Usually used when pan or zoom transforms content.

Methods

(abstract) abort(pointerIDopt)

Handler for pointer cancel functionallity.Implemntation of this method is recommended.

Parameters:
NameTypeAttributesDescription
pointerIDint|Array.<int><optional>Pointer identifier, when is not defined means all available inputs

(abstract) begin(sensorPoint, event)

Begin of ink process.Implemntation of this method is required.

Parameters:
NameTypeDescription
sensorPointInkInput.SensorPointFirst point provided from the ink device for current input
eventPointerEvent|MouseEvent|TouchEventBrowser event

(abstract) end(sensorPoint, event)

End of ink process.Implemntation of this method is required.

Parameters:
NameTypeDescription
sensorPointInkInput.SensorPointLast point provided from the ink device for current input
eventPointerEvent|MouseEvent|TouchEventBrowser event

(abstract) getInkBuilder(pointerID) → PathBuilding.InkBuilder|PathBuilding.InkBuilderAsync

Provides access to proper ink builder processor.Implemntation of this method is required.

Parameters:
NameTypeDescription
pointerIDint|Array.<int>Pointer identifier. Multi-touch needs builder for each one when is needed. For single touch or pen/mouse one builder could be shared.
Returns:

Type

PathBuilding.InkBuilder|PathBuilding.InkBuilderAsync

(abstract) move(sensorPoint, predictionopt, event)

Ink process.Implemntation of this method is required.

Parameters:
NameTypeAttributesDescription
sensorPointInkInput.SensorPointPoint provided from the ink device for current input
predictionInkInput.SensorPoint<optional>Last point provided from predicted events sequence, when supported
eventPointerEvent|MouseEvent|TouchEventBrowser event

(abstract) registerInputProvider(pointerID, isPrimary)

Notify for new coming pointers. Associates inkBuilder with pointerID - property should be assigned.When multi-touch environment is available, inkBuilder and strokeRenderer should be aquired for input processing.

Parameters:
NameTypeDescription
pointerIDint|Array.<int>Pointer identifier
isPrimarybooleanIndicates if the pointer represents the primary pointer of this pointer type. Available only when pointerID is not an Array.

(abstract) reset(sensorPoint)

When new ink input is available, state needs reset.Implemntation of this method is required.

Parameters:
NameTypeDescription
sensorPointInkInput.SensorPointFirst point provided from the ink device

Home