CartesianCanvasDelegate class abstract
Delegate interface used by CartesianCanvasController to communicate with the canvas. This allows the controller to trigger actions inside the canvas state.
- Implementers
Constructors
Properties
- drawingMode → bool
-
Returns true if the freehand drawing mode is currently active.
no setter
- eraserMode → bool
-
Returns true if the eraser mode is currently active.
no setter
- gridVisible → bool
-
Returns true if the background grid is currently visible.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
captureImage(
) → Future< Image?> - Captures the current visible canvas as an image. Returns a ui.Image which can be used to save or share the graph.
-
clearFreehand(
) → void - Clears all freehand strokes (including erasures) from the canvas.
-
fitToContent(
) → void - Automatically adjusts the view (scale and origin) to fit all items within the viewport.
-
goToPoint(
double x, double y) → void -
Moves the center of the viewport to the specific
xandyworld coordinates. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
redoFreehand(
) → void - Redoes the previously undone freehand stroke or erasure.
-
resetView(
) → void - Resets the canvas view to its initial origin and scale.
-
setDrawingMode(
bool val) → void -
Sets the freehand drawing mode to
val. -
setEraserMode(
bool val) → void -
Sets the eraser mode to
val. -
setGridVisible(
bool val) → void -
Sets the visibility of the background grid to
val. -
toString(
) → String -
A string representation of this object.
inherited
-
undoFreehand(
) → void - Undoes the last freehand stroke or erasure.
-
zoomFromCenter(
double factor) → void -
Zooms the canvas in or out from the center of the viewport by a given
factor.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited