TSdlPenTouchEvent
Pressure-sensitive pen touched event structure (Event.PenTouch.* )
These events come when a pen touches a surface (a tablet, etc), or lifts off from one.
Definition
Unit: Neslib.Sdl3.Events
Properties
Name | Description |
---|---|
IsDown | True if the pen is touching or false if the pen is lifted off |
IsEraserUsed | True if eraser end is used (not all pens support this). |
Kind | Event kind (TSdlEventKind.PenUp/Down) |
PenID | The pen instance id |
PenState | Complete pen input state at time of event |
Position | Position, relative to window |
Timestamp | In nanoseconds, populated using SdlGetTicksNS |
Window | The window with pen focus, if any |
WindowID | The ID of the window with pen focus, if any |
X | X coordinate, relative to window |
Y | Y coordinate, relative to window |
Property Descriptions
IsDown
True if the pen is touching or false if the pen is lifted off
property IsDown: Boolean read FHandle.down
Type: Boolean
IsEraserUsed
True if eraser end is used (not all pens support this).
property IsEraserUsed: Boolean read FHandle.eraser
Type: Boolean
Kind
Event kind (TSdlEventKind.PenUp/Down)
property Kind: TSdlEventKind read GetKind
Type: TSdlEventKind
PenID
The pen instance id
property PenID: TSdlPenID read FHandle.which
Type: TSdlPenID
PenState
Complete pen input state at time of event
property PenState: TSdlPenInputFlags read GetPenState
Type: TSdlPenInputFlags
Position
Position, relative to window
property Position: TSdlPointF read GetPosition
Type: TSdlPointF
Timestamp
In nanoseconds, populated using SdlGetTicksNS
property Timestamp: UInt64 read FHandle.timestamp
Type: UInt64
Window
The window with pen focus, if any
property Window: TSdlWindow read GetWindow
Type: TSdlWindow
WindowID
The ID of the window with pen focus, if any
property WindowID: TSdlWindowID read FHandle.windowID
Type: TSdlWindowID
X
X coordinate, relative to window
property X: Single read FHandle.x
Type: Single
Y
Y coordinate, relative to window
property Y: Single read FHandle.y
Type: Single