Drawing Class
Drawing
provides a set of drawing methods used by Path
and custom shape classes.
Drawing
has the following implementations based on browser capability.
Constructor
Drawing
()
Item Index
Methods
clear
()
chainable
Clears the path.
closePath
()
chainable
Ends a fill and stroke
curveTo
(
chainable
-
cp1x
-
cp1y
-
cp2x
-
cp2y
-
x
-
y
Draws a bezier curve.
Parameters:
drawRect
(
chainable
-
x
-
y
-
w
-
h
Draws a rectangle.
drawRoundRect
(
chainable
-
x
-
y
-
w
-
h
-
ew
-
eh
Draws a rectangle with rounded corners.
end
()
chainable
Completes a drawing operation.
lineTo
(
chainable
-
point1
-
point2
Draws a line segment using the current line style from the current drawing position to the specified x and y coordinates.
moveTo
(
chainable
-
x
-
y
Moves the current drawing position to specified x and y coordinates.
quadraticCurveTo
(
chainable
-
cpx
-
cpy
-
x
-
y
Draws a quadratic bezier curve.
relativeLineTo
(
chainable
-
point1
-
point2
Draws a line segment using the current line style from the current drawing position to the relative x and y coordinates.