DiagramCameraGeometry extension
Viewport mathematics for a camera state.
Properties
- visibleWorldBounds → DiagramRect
-
Available on DiagramCameraState, provided by the DiagramCameraGeometry extension
no setter
Methods
-
clampedTo(
CanvasBounds canvas, DiagramRect? content) → DiagramCameraState -
Available on DiagramCameraState, provided by the DiagramCameraGeometry extension
This camera with its center kept withincanvas: the extent ofcontent, or a viewport-sized canvas around the origin when there is none, with the canvas padding in viewport pixels around it. -
forBounds(
DiagramRect bounds, {double padding = 48}) → DiagramCameraState -
Available on DiagramCameraState, provided by the DiagramCameraGeometry extension
This camera fitted tobounds, leavingpaddingaround them. -
forWidth(
DiagramRect bounds, {double padding = 48}) → DiagramCameraState -
Available on DiagramCameraState, provided by the DiagramCameraGeometry extension
This camera fitted to the width ofbounds. -
screenToWorld(
DiagramPoint screen) → DiagramPoint -
Available on DiagramCameraState, provided by the DiagramCameraGeometry extension
-
worldToScreen(
DiagramPoint world) → DiagramPoint -
Available on DiagramCameraState, provided by the DiagramCameraGeometry extension