CanvasDrawing Class
Canvas implementation of the Drawing
class.
CanvasDrawing
is not intended to be used directly. Instead, use the Drawing
class.
If the browser lacks SVG capabilities but has
Canvas capabilities, the Drawing
class will point to the CanvasDrawing
class.
Item Index
Methods
Properties
Methods
clear
()
chainable
Clears the graphics object.
closePath
()
chainable
Ends a fill and stroke
curveTo
-
cp1x
-
cp1y
-
cp2x
-
cp2y
-
x
-
y
Draws a bezier curve.
Parameters:
drawRect
-
x
-
y
-
w
-
h
Draws a rectangle.
drawRect
-
x
-
y
-
w
-
h
-
ew
-
eh
Draws a rectangle with rounded corners.
end
()
chainable
Completes a drawing operation.
lineTo
-
point1
-
point2
Draws a line segment from the current drawing position to the specified x and y coordinates.
moveTo
-
x
-
y
Moves the current drawing position to specified x and y coordinates.
quadraticCurveTo
-
cpx
-
cpy
-
x
-
y
Draws a quadratic bezier curve.
relativeCurveTo
-
cp1x
-
cp1y
-
cp2x
-
cp2y
-
x
-
y
Draws a bezier curve relative to the current coordinates.
Parameters:
relativeLineTo
-
point1
-
point2
Draws a line segment from the current drawing position to the relative x and y coordinates.
relativeMoveTo
-
x
-
y
Moves the current drawing position relative to specified x and y coordinates.
relativeQuadraticCurveTo
-
cpx
-
cpy
-
x
-
y
Draws a quadratic bezier curve relative to the current position.