Interface: InkController
InkInput.InkController
Interface for classes that proceess digital ink
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
canvas | Rendering.2D.InkCanvas2D|Rendering.WebGL.InkCanvasGL | Ink canvas | |
transform | Common.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:
Name | Type | Attributes | Description |
---|---|---|---|
pointerID | int|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:
Name | Type | Description |
---|---|---|
sensorPoint | InkInput.SensorPoint | First point provided from the ink device for current input |
event | PointerEvent|MouseEvent|TouchEvent | Browser event |
(abstract) end(sensorPoint, event)
End of ink process.Implemntation of this method is required.
Parameters:
Name | Type | Description |
---|---|---|
sensorPoint | InkInput.SensorPoint | Last point provided from the ink device for current input |
event | PointerEvent|MouseEvent|TouchEvent | Browser event |
(abstract) getInkBuilder(pointerID) → PathBuilding.InkBuilder|PathBuilding.InkBuilderAsync
Provides access to proper ink builder processor.Implemntation of this method is required.
Parameters:
Name | Type | Description |
---|---|---|
pointerID | int|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:
Name | Type | Attributes | Description |
---|---|---|---|
sensorPoint | InkInput.SensorPoint | Point provided from the ink device for current input | |
prediction | InkInput.SensorPoint | <optional> | Last point provided from predicted events sequence, when supported |
event | PointerEvent|MouseEvent|TouchEvent | Browser 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:
Name | Type | Description |
---|---|---|
pointerID | int|Array.<int> | Pointer identifier |
isPrimary | boolean | Indicates 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:
Name | Type | Description |
---|---|---|
sensorPoint | InkInput.SensorPoint | First point provided from the ink device |