Skip to content

ScaleUpdateEvent

ScaleUpdateEvent #

Bases: Event[EventControlType]

control #

control: EventControlType = field(repr=False)

data #

data: Any | None = field(default=None, kw_only=True)

focal_point_delta #

focal_point_delta: Offset = field(
    metadata={"data_field": "fpd"}
)

The amount the gesture's focal point has moved in the coordinate space of the event receiver since the previous update.

global_focal_point #

global_focal_point: Offset = field(
    metadata={"data_field": "gfp"}
)

The focal point of the pointers in contact with the screen, in global coordinates.

horizontal_scale #

horizontal_scale: float = field(
    metadata={"data_field": "hs"}
)

The scale implied by the average distance along the horizontal axis between the pointers in contact with the screen.

This value must be greater than or equal to zero.

local_focal_point #

local_focal_point: Offset = field(
    metadata={"data_field": "lfp"}
)

The focal point of the pointers in contact with the screen, in local coordinates.

name #

name: str

page #

page: Page | PageView | None

pointer_count #

pointer_count: int = field(metadata={'data_field': 'pc'})

The number of pointers being tracked by the gesture recognizer.

Typically this is the number of fingers being used to pan the widget using the gesture recognizer. Due to platform limitations, trackpad gestures count as two fingers even if more than two fingers are used.

rotation #

rotation: float = field(metadata={'data_field': 'rot'})

The angle (in radians) implied by the first two pointers to enter in contact with the screen.

scale #

scale: float = field(metadata={'data_field': 's'})

The scale implied by the average distance between the pointers in contact with the screen.

This value must be greater than or equal to zero.

target #

target: int

timestamp #

timestamp: Duration | None = field(
    default=None, metadata={"data_field": "ts"}
)

Recorded timestamp of the source pointer event that triggered the scale event.

Could be None if triggered from proxied events such as accessibility.

vertical_scale #

vertical_scale: float = field(metadata={"data_field": "vs"})

The scale implied by the average distance along the vertical axis between the pointers in contact with the screen.

This value must be greater than or equal to zero.