TouchHelper
com.onyx.android.sdk.pen.TouchHelper
The primary entry point for hardware-accelerated pen input. One instance
per host view. All mutating methods return this for chaining.
Constants
Constant |
Description |
|---|---|
|
[AI Generated] Style ID for pencil rendering. Pass to |
|
[AI Generated] Style ID for fountain pen rendering. |
|
[AI Generated] Style ID for marker rendering (opaque, flat edges). |
|
[AI Generated] Style ID for brush pen rendering via the NeoPen native renderer. |
|
[AI Generated] Style ID for charcoal rendering. |
|
[AI Generated] Style ID for dashed line rendering. |
|
[AI Generated] Style ID for charcoal V2 rendering. May be unstable on some devices. |
|
[AI Generated] Feature flag: use app-side touch rendering (no SDK A2 pass). |
|
[AI Generated] Feature flag: use SurfaceFlinger-based touch rendering. |
|
[AI Generated] Feature flag: enable both render paths simultaneously. |
Factory methods
Signature |
Description |
|---|---|
|
[AI Generated] Creates a helper bound to |
|
[AI Generated] Creates a helper; the |
|
[AI Generated] Creates a helper with an explicit render feature flag
( |
Region configuration
Signature |
Description |
|---|---|
|
[AI Generated] Defines the active pen region and gesture exclusion zones in
screen-absolute coordinates. Must be called before |
|
[AI Generated] Single-rect convenience overload. |
|
[AI Generated] Sets limit rects with no exclusion zones. |
|
[AI Generated] Updates exclusion zones without changing the limit rects. |
Lifecycle
Signature |
Description |
|---|---|
|
[AI Generated] Starts the native digitizer reader thread and sets up the EPD
event filter. Must be called after |
|
[AI Generated] Stops the native reader thread and releases the EPD A2 mode claim.
Call in |
|
[AI Generated] Convenience for |
Enable / disable
Signature |
Description |
|---|---|
|
[AI Generated] Combined toggle: render pass + input reader +
|
|
[AI Generated] Like |
|
[AI Generated] Toggles only the A2 render pass. Cycling |
|
[AI Generated] Toggles only the digitizer reader thread. Does not release the EPD A2 mode claim. |
|
[AI Generated] Returns |
|
[AI Generated] Returns |
|
[AI Generated] Returns |
Stroke appearance
Signature |
Description |
|---|---|
|
[AI Generated] Sets the SDK’s built-in stroke style using one of the
|
|
[AI Generated] Sets the ARGB colour for the SDK’s A2 stroke renderer. |
|
[AI Generated] Sets the base stroke width in pixels for the SDK’s A2 renderer. |
Pen / eraser configuration
Signature |
Description |
|---|---|
|
[AI Generated] Enables or disables raw drawing for the pen tip. Normally |
|
[AI Generated] Enables raw drawing for the eraser end. Default |
|
[AI Generated] When |
|
[AI Generated] Resets to defaults: brush enabled, eraser disabled.
Called internally by |
Touch / finger input
Signature |
Description |
|---|---|
|
[AI Generated] Allows finger touch events to be processed alongside stylus events. |
|
[AI Generated] Restricts input to finger touch only, disabling stylus processing. |
|
[AI Generated] Passes a |
Refresh and timing
Signature |
Description |
|---|---|
|
[AI Generated] When |
|
[AI Generated] Delay in ms between pen-up and the automatic refresh. Only relevant
when |
|
[AI Generated] When |
|
[AI Generated] When |
Region mode
Signature |
Description |
|---|---|
|
[AI Generated] Treats all limit rects as a single logical drawing region. Default. |
|
[AI Generated] Treats each limit rect as an independent region. Used with
|
Scroll / host-view interaction
Signature |
Description |
|---|---|
|
[AI Generated] When |
Misc
Signature |
Description |
|---|---|
|
[AI Generated] Rebinds the helper to a different view after creation. |
|
[AI Generated] Enables verbose internal SDK logging. |
|
[AI Generated] Registers / unregisters on the SDK’s internal EventBus for
|