ImageEn, unit ieview

TPointerPenInfo


Declaration

TPointerPenInfo = record
  pointerInfo: TPointerInfo;
  penFlags: TPenFlags;
  penMask: TPenMask;
  pressure: UINT32;
  rotation: UINT32;
  tiltX: INT32;
  tiltY: INT32;
end;


Description

pointerInfo
Information about the Pointer:

TPointerInfo = record
  pointerType: TPointerInputType;
  pointerId: UINT32;
  frameId: UINT32;
  pointerFlags: TPointerFlags;
  sourceDevice: THandle;
  hwndTarget: HWND;
  ptPixelLocation: TPoint;
  ptHimetricLocation: TPoint;
  ptPixelLocationRaw: TPoint;
  ptHimetricLocationRaw: TPoint;
  dwTime: DWORD;
  historyCount: UINT32;
  InputData: INT32;
  dwKeyStates: DWORD;
  PerformanceCount: UINT64;
  ButtonChangeType: TPointerButtonChangeType;
end;

See: docs.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-pointer_info

penFlags
May include:

PEN_FLAG_NONE     = $00000000; // Default
PEN_FLAG_BARREL   = $00000001; // The barrel button is pressed
PEN_FLAG_INVERTED = $00000002; // The pen is inverted
PEN_FLAG_ERASER   = $00000004; // The eraser button is pressed

penMask
May include:

PEN_MASK_NONE     = $00000000; // Default - none of the optional fields are valid
PEN_MASK_PRESSURE = $00000001; // The pressure field is valid
PEN_MASK_ROTATION = $00000002; // The rotation field is valid
PEN_MASK_TILT_X   = $00000004; // The tiltX field is valid
PEN_MASK_TILT_Y   = $00000008; // The tiltY field is valid

pressure
A pen pressure normalized to a range between 0 and 1024. The default is 0 if the device does not report pressure.

rotation
The clockwise rotation, or twist, of the pointer normalized in a range of 0 to 359. The default is 0.

tiltX
The angle of tilt of the pointer along the x-axis in a range of -90 to +90, with a positive value indicating a tilt to the right. The default is 0.

tiltY
The angle of tilt of the pointer along the y-axis in a range of -90 to +90, with a positive value indicating a tilt toward the user. The default is 0.

Note: Pointer support requires Delphi 10.3 Rio or newer