graphics/js/SVGDrawing.js:19
SVG implementation of the Drawing
class.
SVGDrawing
is not intended to be used directly. Instead, use the Drawing
class.
If the browser has SVG capabilities, the Drawing
class will point to the SVGDrawing
class.
_curveTo
args
relative
Defined in
graphics/js/SVGDrawing.js:124
Implements curveTo methods.
_getCurrentArray
Defined in
graphics/js/SVGDrawing.js:789
Returns the current array of drawing commands.
Array
_lineTo
args
relative
Defined in
graphics/js/SVGDrawing.js:531
Implements lineTo methods.
_moveTo
args
relative
Defined in
graphics/js/SVGDrawing.js:621
Implements moveTo methods.
_quadraticCurveTo
args
relative
Defined in
graphics/js/SVGDrawing.js:223
Implements quadraticCurveTo methods.
_round
val
Defined in
graphics/js/SVGDrawing.js:30
Rounds a value to the nearest hundredth.
val
Number
Value to be rounded.
Number
_setCurveBoundingBox
Array
Number
Number
Defined in
graphics/js/SVGDrawing.js:835
Calculates the bounding box for a curve
_trackSize
w
h
Defined in
graphics/js/SVGDrawing.js:870
Updates the size of the graphics object
curveTo
cp1x
cp1y
cp2x
cp2y
x
y
Defined in
graphics/js/SVGDrawing.js:90
Draws a bezier curve.
drawDiamond
x
y
width
height
Defined in
graphics/js/SVGDrawing.js:382
Draws a diamond.
drawEllipse
x
y
w
h
Defined in
graphics/js/SVGDrawing.js:356
Draws an ellipse.
drawRoundRect
x
y
w
h
ew
eh
Defined in
graphics/js/SVGDrawing.js:307
Draws a rectangle with rounded corners.
drawWedge
x
y
startAngle
arc
radius
yRadius
Defined in
graphics/js/SVGDrawing.js:405
Draws a wedge.
x
Number
x-coordinate of the wedge's center point
y
Number
y-coordinate of the wedge's center point
startAngle
Number
starting angle in degrees
arc
Number
sweep of the wedge. Negative values draw clockwise.
radius
Number
radius of wedge. If [optional] yRadius is defined, then radius is the x radius.
yRadius
Number
[optional] y radius for wedge.
getBezierData
Array
Number
Defined in
graphics/js/SVGDrawing.js:807
Returns the points on a curve
Array
lineTo
point1
point2
Defined in
graphics/js/SVGDrawing.js:503
Draws a line segment using the current line style from the current drawing position to the specified x and y coordinates.
moveTo
x
y
Defined in
graphics/js/SVGDrawing.js:593
Moves the current drawing position to specified x and y coordinates.
quadraticCurveTo
cpx
cpy
x
y
Defined in
graphics/js/SVGDrawing.js:193
Draws a quadratic bezier curve.
quadraticCurveTo
cpx
cpy
x
y
Defined in
graphics/js/SVGDrawing.js:208
Draws a quadratic bezier curve relative to the current position.
relativeCurveTo
cp1x
cp1y
cp2x
cp2y
x
y
Defined in
graphics/js/SVGDrawing.js:107
Draws a bezier curve relative to the current coordinates.
relativeLineTo
point1
point2
Defined in
graphics/js/SVGDrawing.js:517
Draws a line segment using the current line style from the current drawing position to the relative x and y coordinates.
relativeMoveTo
x
y
Defined in
graphics/js/SVGDrawing.js:607
Moves the current drawing position relative to specified x and y coordinates.