CanvasRenderingContext2D class

Inheritance

Properties

actionCount int
no setter
canvas CanvasElement
getter/setter pair
contextId int?
no setteroverride
direction TextDirection
getter/setter pair
fillStyle Color
getter/setter pair
font String
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
lineCap StrokeCap
getter/setter pair
lineDashOffset double
getter/setter pair
lineJoin StrokeJoin
getter/setter pair
lineWidth double
getter/setter pair
miterLimit double
getter/setter pair
path2d ↔ Path2D
getter/setter pair
pointer → dynamic
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
strokeStyle Color
getter/setter pair
textAlign TextAlign
getter/setter pair
textBaseline ↔ CanvasTextBaseline
getter/setter pair

Methods

addAction(CanvasAction action) → void
arc(double x, double y, double radius, double startAngle, double endAngle, {bool anticlockwise = false}) → void
arcTo(double x1, double y1, double x2, double y2, double radius) → void
beginPath() → void
bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y) → void
clearRect(double x, double y, double w, double h) → void
clip(PathFillType fillType) → void
closePath() → void
createLinearGradient(double x0, double y0, double x1, double y1) → CanvasGradient
createPattern(CanvasImageSource image, String repetition) → CanvasPattern
createRadialGradient(double x0, double y0, double r0, double x1, double y1, double r1) → CanvasGradient
dispose() → void
inherited
drawImage(int argumentCount, Image? img, double sx, double sy, double sWidth, double sHeight, double dx, double dy, double dWidth, double dHeight) → void
ellipse(double x, double y, double radiusX, double radiusY, double rotation, double startAngle, double endAngle, {bool anticlockwise = false}) → void
fill(PathFillType fillType) → void
fillRect(double x, double y, double w, double h) → void
fillText(String text, double x, double y, {double? maxWidth}) → void
getBindingProperty(String key) → dynamic
override
getContextAttributes() CanvasRenderingContext2DSettings
getLineDash() String
getTransform() Matrix4
invokeBindingMethod(String method, List args) → dynamic
override
isPointInPath(double x, double y, PathFillType fillRule) bool
isPointInStroke(double x, double y) bool
lineTo(double x, double y) → void
measureText(String text) → TextMetrics?
moveTo(double x, double y) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
performActions(Canvas canvas, dynamic size) → void
quadraticCurveTo(double cpx, double cpy, double x, double y) → void
rect(double x, double y, double w, double h) → void
resetTransform() → void
restore() → void
rotate(double angle) → void
save() → void
scale(double x, double y) → void
setBindingProperty(String key, dynamic value) → void
override
setLineDash(String segments) → void
setTransform(double a, double b, double c, double d, double e, double f) → void
stroke() → void
strokeRect(double x, double y, double w, double h) → void
strokeText(String text, double x, double y, {double? maxWidth}) → void
toNative() Pointer<NativeCanvasRenderingContext2D>
toString() String
A string representation of this object.
inherited
transform(double a, double b, double c, double d, double e, double f) → void
translate(double x, double y) → void

Operators

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

Static Methods

parseDirection(String value) TextDirection?
parseLineCap(String value) StrokeCap?
parseLineJoin(String value) StrokeJoin?
parseTextAlign(String value) TextAlign?
parseTextBaseline(String value) → CanvasTextBaseline?