VMLDrawing Class
+ + + + +VML implementation of the Drawing class.
+VMLDrawing is not intended to be used directly. Instead, use the Drawing class.
+If the browser lacks SVG and Canvas
+capabilities, the Drawing class will point to the VMLDrawing class.
-
+
- Index + + +
- Methods + + +
- Properties + + + +
Item Index
+ + +Methods
+ +-
+
+
- + _addToPath + + + + + +
- + _curveTo + + + + + +
- + _draw + + + + + +
- + _lineTo + + + + + +
- + _moveTo + + + + + +
- + _quadraticCurveTo + + + + + +
- + _round + + + + + +
- + _setCurveBoundingBox + + + + + +
- + _trackSize + + + + + +
- + clear + + + + + +
- + closePath + + + + + +
- + curveTo + + + + + +
- + drawCircle + + + + + +
- + drawDiamond + + + + + +
- + drawEllipse + + + + + +
- + drawRect + + + + + +
- + drawRect + + + + + +
- + drawWedge + + + + + +
- + end + + + + + +
- + getBezierData + + + + + +
- + lineTo + + + + + +
- + moveTo + + + + + +
- + quadraticCurveTo + + + + + +
- + relativeCurveTo + + + + + +
- + relativeLineTo + + + + + +
- + relativeMoveTo + + + + + +
- + relativeQuadraticCurveTo + + + + + +
Properties
+ +-
+
+
- + _coordSpaceMultiplier + + + + + +
- + _currentX + + + + + +
- + _currentY + + + + + +
- + _pathSymbolToMethod + + + + + +
Methods
+ + +_addToPath
+
+
+ -
+
+
-
+
+
val+ +
+
+
Concatanates the path.
+Parameters:
+ +-
+
+
-
+
+
val+ String + + + + +++ + +The value to add to the path string.
+
+
+
_curveTo
+
+
+ -
+
+
-
+
+
args+ +
+
+ -
+
+
relative+ +
+
+
Implements curveTo methods.
+_draw
+
+
+ ()
+
+
+
+
+
+
+
+ private
+
+
+
+
+
+
+
+
+
+
+
+
+ Draws the graphic.
+_lineTo
+
+
+ -
+
+
-
+
+
args+ +
+
+ -
+
+
relative+ +
+
+
Implements lineTo methods.
+_moveTo
+
+
+ -
+
+
-
+
+
args+ +
+
+ -
+
+
relative+ +
+
+
Implements moveTo methods.
+_quadraticCurveTo
+
+
+ -
+
+
-
+
+
args+ +
+
+ -
+
+
relative+ +
+
+
Implements quadraticCurveTo methods.
+_round
+
+
+ -
+
+
-
+
+
The+ +
+
+
Rounds dimensions and position values based on the coordinate space.
+Parameters:
+ +-
+
+
-
+
+
The+ Number + + + + +++ + +value for rounding
+
+
+
Returns:
+ +_setCurveBoundingBox
+
+
+ -
+
+
-
+
+
Array+ +
+
+ -
+
+
Number+ +
+
+ -
+
+
Number+ +
+
+
Calculates the bounding box for a curve
+Parameters:
+ +-
+
+
-
+
+
Array+ Object + + + + +++ + +pts Array containing points for start, end and control points of a curve.
+
+
+ -
+
+
Number+ Object + + + + +++ + +w Width used to calculate the number of points to describe the curve.
+
+
+ -
+
+
Number+ Object + + + + +++ + +h Height used to calculate the number of points to describe the curve.
+
+
+
_trackSize
+
+
+ -
+
+
-
+
+
w+ +
+
+ -
+
+
h+ +
+
+
Updates the size of the graphics object
+clear
+
+
+ ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+ chainable
+
+
+
+
+
+
+ Clears the path.
+closePath
+
+
+ ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+ chainable
+
+
+
+
+
+
+ Ends a fill and stroke
+curveTo
+
+
+ -
+
+
-
+
+
cp1x+ +
+
+ -
+
+
cp1y+ +
+
+ -
+
+
cp2x+ +
+
+ -
+
+
cp2y+ +
+
+ -
+
+
x+ +
+
+ -
+
+
y+ +
+
+
Draws a bezier curve.
+Parameters:
+ +-
+
+
-
+
+
cp1x+ Number + + + + +++ + +x-coordinate for the first control point.
+
+
+ -
+
+
cp1y+ Number + + + + +++ + +y-coordinate for the first control point.
+
+
+ -
+
+
cp2x+ Number + + + + +++ + +x-coordinate for the second control point.
+
+
+ -
+
+
cp2y+ Number + + + + +++ + +y-coordinate for the second control point.
+
+
+ -
+
+
x+ Number + + + + +++ + +x-coordinate for the end point.
+
+
+ -
+
+
y+ Number + + + + +++ + +y-coordinate for the end point.
+
+
+
drawCircle
+
+
+ -
+
+
-
+
+
x+ +
+
+ -
+
+
y+ +
+
+ -
+
+
r+ +
+
+
Draws a circle. Used internally by CanvasCircle class.
drawDiamond
+
+
+ -
+
+
-
+
+
x+ +
+
+ -
+
+
y+ +
+
+ -
+
+
width+ +
+
+ -
+
+
height+ +
+
+
Draws a diamond.
+drawEllipse
+
+
+ -
+
+
-
+
+
x+ +
+
+ -
+
+
y+ +
+
+ -
+
+
w+ +
+
+ -
+
+
h+ +
+
+
Draws an ellipse.
+drawRect
+
+
+ -
+
+
-
+
+
x+ +
+
+ -
+
+
y+ +
+
+ -
+
+
w+ +
+
+ -
+
+
h+ +
+
+ -
+
+
ew+ +
+
+ -
+
+
eh+ +
+
+
Draws a rectangle with rounded corners.
+Parameters:
+ +-
+
+
-
+
+
x+ Number + + + + +++ + +x-coordinate
+
+
+ -
+
+
y+ Number + + + + +++ + +y-coordinate
+
+
+ -
+
+
w+ Number + + + + +++ + +width
+
+
+ -
+
+
h+ Number + + + + +++ + +height
+
+
+ -
+
+
ew+ Number + + + + +++ + +width of the ellipse used to draw the rounded corners
+
+
+ -
+
+
eh+ Number + + + + +++ + +height of the ellipse used to draw the rounded corners
+
+
+
drawRect
+
+
+ -
+
+
-
+
+
x+ +
+
+ -
+
+
y+ +
+
+ -
+
+
w+ +
+
+ -
+
+
h+ +
+
+
Draws a rectangle.
+drawWedge
+
+
+ -
+
+
-
+
+
x+ +
+
+ -
+
+
y+ +
+
+ -
+
+
startAngle+ +
+
+ -
+
+
arc+ +
+
+ -
+
+
radius+ +
+
+ -
+
+
yRadius+ +
+
+
Draws a wedge.
+Parameters:
+ +-
+
+
-
+
+
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.
+
+
+
end
+
+
+ ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+ chainable
+
+
+
+
+
+
+ Completes a drawing operation.
+getBezierData
+
+
+ -
+
+
-
+
+
Array+ +
+
+ -
+
+
Number+ +
+
+
Returns the points on a curve
+Parameters:
+ + +Returns:
+ +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.
+Parameters:
+ + +relativeCurveTo
+
+
+ -
+
+
-
+
+
cp1x+ +
+
+ -
+
+
cp1y+ +
+
+ -
+
+
cp2x+ +
+
+ -
+
+
cp2y+ +
+
+ -
+
+
x+ +
+
+ -
+
+
y+ +
+
+
Draws a bezier curve.
+Parameters:
+ +-
+
+
-
+
+
cp1x+ Number + + + + +++ + +x-coordinate for the first control point.
+
+
+ -
+
+
cp1y+ Number + + + + +++ + +y-coordinate for the first control point.
+
+
+ -
+
+
cp2x+ Number + + + + +++ + +x-coordinate for the second control point.
+
+
+ -
+
+
cp2y+ Number + + + + +++ + +y-coordinate for the second control point.
+
+
+ -
+
+
x+ Number + + + + +++ + +x-coordinate for the end point.
+
+
+ -
+
+
y+ Number + + + + +++ + +y-coordinate for the end point.
+
+
+
relativeLineTo
+
+
+ -
+
+
-
+
+
point1+ +
+
+ -
+
+
point2+ +
+
+
Draws a line segment using the current line style 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.
+Parameters:
+ + +Properties
+ + +_coordSpaceMultiplier
+ Number
+
+
+
+
+ private
+
+
+
+
+
+
+
+
+ Value for rounding up to coordsize
+_currentX
+ Number
+
+
+
+
+ private
+
+
+
+
+
+
+
+
+ Current x position of the drawing.
+_currentY
+ Number
+
+
+
+
+ private
+
+
+
+
+
+
+
+
+ Current y position of the drqwing.
+_pathSymbolToMethod
+ Object
+
+
+
+
+ private
+
+
+
+
+
+
+
+
+ Maps path to methods
+