CoordinateSystem class
Maps between Design Document coordinates and on-screen viewport coordinates.
Most Host UI code never needs this — gestures and export use it internally. Useful for custom overlays that must align with document space.
Constructors
- CoordinateSystem({required double width, required double height, required double viewportScale, required Offset viewportOffset})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double
-
Document height in document units.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- viewportOffset → Offset
-
Top-left of the document in screen space.
final
- viewportScale → double
-
Scale factor from document units to screen pixels.
final
- width → double
-
Document width in document units.
final
Methods
-
docToScreen(
Offset docPoint) → Offset - Converts a point from document space to screen space.
-
docToScreenDelta(
Offset docDelta) → Offset - Converts a delta/size from document space to screen space.
-
docToScreenRect(
Rect docRect) → Rect - Converts a Rect from document space to screen space.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
screenToDoc(
Offset screenPoint) → Offset - Converts a point from screen space to document space.
-
screenToDocDelta(
Offset screenDelta) → Offset - Converts a delta/size from screen space to document space.
-
screenToDocRect(
Rect screenRect) → Rect - Converts a Rect from screen space to document space.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited