PdfPageGeometry class

Converts between a page's PDF user space (origin bottom-left, y up, points) and the view space of the widget displaying it (origin top-left, y down, logical pixels), including the page's /Rotate.

Handed to PdfViewer.pageOverlayBuilder so apps can pin Flutter widgets to positions on the page; the inverse mappings support hit-testing and authoring (e.g. placing an annotation where the user tapped). The transforms here mirror PdfPageRenderer's canvas setup, so a mapped point always lands on the same spot in the rendered raster.

Constructors

PdfPageGeometry({required PdfRect cropBox, required int rotation, required Size viewSize})
const

Properties

cropBox → PdfRect
The page's crop box - the region the view displays.
final
hashCode int
The hash code for this object.
no setterinherited
rotation int
The page's /Rotate value (0, 90, 180, or 270).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scale double
Logical pixels per PDF point. A sideways page shows the crop box's height across the view's width.
no setter
viewSize Size
The size the page occupies on screen, in logical pixels.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toPagePoint(Offset offset) → (double, double)
View position → (x, y) in page space.
toPageRect(Rect rect) → PdfRect
toString() String
A string representation of this object.
inherited
toViewOffset(double x, double y) Offset
toViewRect(PdfRect rect) Rect

Operators

operator ==(Object other) bool
The equality operator.
inherited