Drawing Class
yui3/src/graphics/js/GraphicBase.js:297
Drawing
provides a set of drawing methods used by Path
and custom shape classes.
Drawing
has the following implementations based on browser capability.
<ul>
<li><a href="SVGDrawing.html">SVGDrawing
</a></li>
<li><a href="VMLDrawing.html">VMLDrawing
</a></li>
<li><a href="CanvasDrawing.html">CanvasDrawing
</a></li>
</ul>
Constructor
Drawing
()
Index
Methods
clear
()
chainable
Clears the path.
closePath
()
chainable
Ends a fill and stroke
curveTo
-
cp1x
-
cp1y
-
cp2x
-
cp2y
-
x
-
y
Draws a bezier curve.
Parameters:
drawCircle
-
x
-
y
-
r
Draws a circle.
drawDiamond
-
x
-
y
-
width
-
height
Draws a diamond.
drawEllipse
-
x
-
y
-
w
-
h
Draws an ellipse.
drawRect
-
x
-
y
-
w
-
h
Draws a rectangle.
drawRoundRect
-
x
-
y
-
w
-
h
-
ew
-
eh
Draws a rectangle with rounded corners.
drawWedge
-
x
-
y
-
startAngle
-
arc
-
radius
-
yRadius
Draws a wedge.
Parameters:
-
x
Numberx-coordinate of the wedge's center point
-
y
Numbery-coordinate of the wedge's center point
-
startAngle
Numberstarting angle in degrees
-
arc
Numbersweep of the wedge. Negative values draw clockwise.
-
radius
Numberradius of wedge. If [optional] yRadius is defined, then radius is the x radius.
-
yRadius
Number[optional] y radius for wedge.
end
()
chainable
Completes a drawing operation.
lineTo
-
point1
-
point2
Draws a line segment using the current line style 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.
relativeLineTo
-
point1
-
point2
Draws a line segment using the current line style from the current drawing position to the relative x and y coordinates.