Base class for all canvases. A description of the public API is available in mxXmlCanvas2D. All color values of mxConstants.NONE will be converted to null in the state.
mxAbstractCanvas2D | Base class for all canvases. |
Functions | |
mxAbstractCanvas2D | Constructs a new abstract canvas. |
Variables | |
converter | Holds the mxUrlConverter to convert image URLs. |
state | Holds the current state. |
states | Stack of states. |
path | Holds the current path as an array. |
rotateHtml | Switch for rotation of HTML. |
lastX | Holds the last x coordinate. |
lastY | Holds the last y coordinate. |
moveOp | Contains the string used for moving in paths. |
lineOp | Contains the string used for moving in paths. |
quadOp | Contains the string used for quadratic paths. |
curveOp | Contains the string used for bezier curves. |
closeOp | Holds the operator for closing curves. |
pointerEvents | Boolean value that specifies if events should be handled. |
Functions | |
createUrlConverter | Create a new mxUrlConverter and returns it. |
reset | Resets the state of this canvas. |
createState | Creates the state of the this canvas. |
format | Rounds all numbers to integers. |
addOp | Adds the given operation to the path. |
rotatePoint | Rotates the given point and returns the result as an mxPoint. |
save | Saves the current state. |
restore | Restores the current state. |
setLink | Sets the current link. |
scale | Scales the current state. |
translate | Translates the current state. |
rotate | Rotates the current state. |
setAlpha | Sets the current alpha. |
setFillAlpha | Sets the current solid fill alpha. |
setStrokeAlpha | Sets the current stroke alpha. |
setFillColor | Sets the current fill color. |
setGradient | Sets the current gradient. |
setStrokeColor | Sets the current stroke color. |
setStrokeWidth | Sets the current stroke width. |
setDashed | Enables or disables dashed lines. |
setDashPattern | Sets the current dash pattern. |
setLineCap | Sets the current line cap. |
setLineJoin | Sets the current line join. |
setMiterLimit | Sets the current miter limit. |
setFontColor | Sets the current font color. |
setFontBackgroundColor | Sets the current font background color. |
setFontBorderColor | Sets the current font border color. |
setFontSize | Sets the current font size. |
setFontFamily | Sets the current font family. |
setFontStyle | Sets the current font style. |
setShadow | Enables or disables and configures the current shadow. |
setShadowColor | Enables or disables and configures the current shadow. |
setShadowAlpha | Enables or disables and configures the current shadow. |
setShadowOffset | Enables or disables and configures the current shadow. |
begin | Starts a new path. |
moveTo | Moves the current path the given coordinates. |
lineTo | Draws a line to the given coordinates. |
quadTo | Adds a quadratic curve to the current path. |
curveTo | Adds a bezier curve to the current path. |
arcTo | Adds the given arc to the current path. |
close | Closes the current path. |
end | Empty implementation for backwards compatibility. |
this.converter
Holds the mxUrlConverter to convert image URLs.
mxAbstractCanvas2D.prototype.createUrlConverter = function()
Create a new mxUrlConverter and returns it.
mxAbstractCanvas2D.prototype.rotatePoint = function( x, y, theta, cx, cy )
Rotates the given point and returns the result as an mxPoint.
Constructs a new abstract canvas.
function mxAbstractCanvas2D()
Holds the mxUrlConverter to convert image URLs.
this.converter
Holds the current state.
mxAbstractCanvas2D.prototype.state
Stack of states.
mxAbstractCanvas2D.prototype.states
Holds the current path as an array.
mxAbstractCanvas2D.prototype.path
Switch for rotation of HTML.
mxAbstractCanvas2D.prototype.rotateHtml
Holds the last x coordinate.
mxAbstractCanvas2D.prototype.lastX
Holds the last y coordinate.
mxAbstractCanvas2D.prototype.lastY
Contains the string used for moving in paths.
mxAbstractCanvas2D.prototype.moveOp
Contains the string used for moving in paths.
mxAbstractCanvas2D.prototype.lineOp
Contains the string used for quadratic paths.
mxAbstractCanvas2D.prototype.quadOp
Contains the string used for bezier curves.
mxAbstractCanvas2D.prototype.curveOp
Holds the operator for closing curves.
mxAbstractCanvas2D.prototype.closeOp
Boolean value that specifies if events should be handled.
mxAbstractCanvas2D.prototype.pointerEvents
Create a new mxUrlConverter and returns it.
mxAbstractCanvas2D.prototype.createUrlConverter = function()
Resets the state of this canvas.
mxAbstractCanvas2D.prototype.reset = function()
Creates the state of the this canvas.
mxAbstractCanvas2D.prototype.createState = function()
Rounds all numbers to integers.
mxAbstractCanvas2D.prototype.format = function( value )
Adds the given operation to the path.
mxAbstractCanvas2D.prototype.addOp = function()
Rotates the given point and returns the result as an mxPoint.
mxAbstractCanvas2D.prototype.rotatePoint = function( x, y, theta, cx, cy )
Saves the current state.
mxAbstractCanvas2D.prototype.save = function()
Restores the current state.
mxAbstractCanvas2D.prototype.restore = function()
Sets the current link.
mxAbstractCanvas2D.prototype.setLink = function( link )
Scales the current state.
mxAbstractCanvas2D.prototype.scale = function( value )
Translates the current state.
mxAbstractCanvas2D.prototype.translate = function( dx, dy )
Rotates the current state.
mxAbstractCanvas2D.prototype.rotate = function( theta, flipH, flipV, cx, cy )
Sets the current alpha.
mxAbstractCanvas2D.prototype.setAlpha = function( value )
Sets the current solid fill alpha.
mxAbstractCanvas2D.prototype.setFillAlpha = function( value )
Sets the current stroke alpha.
mxAbstractCanvas2D.prototype.setStrokeAlpha = function( value )
Sets the current fill color.
mxAbstractCanvas2D.prototype.setFillColor = function( value )
Sets the current gradient.
mxAbstractCanvas2D.prototype.setGradient = function( color1, color2, x, y, w, h, direction, alpha1, alpha2 )
Sets the current stroke color.
mxAbstractCanvas2D.prototype.setStrokeColor = function( value )
Sets the current stroke width.
mxAbstractCanvas2D.prototype.setStrokeWidth = function( value )
Enables or disables dashed lines.
mxAbstractCanvas2D.prototype.setDashed = function( value, fixDash )
Sets the current dash pattern.
mxAbstractCanvas2D.prototype.setDashPattern = function( value )
Sets the current line cap.
mxAbstractCanvas2D.prototype.setLineCap = function( value )
Sets the current line join.
mxAbstractCanvas2D.prototype.setLineJoin = function( value )
Sets the current miter limit.
mxAbstractCanvas2D.prototype.setMiterLimit = function( value )
Sets the current font color.
mxAbstractCanvas2D.prototype.setFontColor = function( value )
Sets the current font background color.
mxAbstractCanvas2D.prototype.setFontBackgroundColor = function( value )
Sets the current font border color.
mxAbstractCanvas2D.prototype.setFontBorderColor = function( value )
Sets the current font size.
mxAbstractCanvas2D.prototype.setFontSize = function( value )
Sets the current font family.
mxAbstractCanvas2D.prototype.setFontFamily = function( value )
Sets the current font style.
mxAbstractCanvas2D.prototype.setFontStyle = function( value )
Enables or disables and configures the current shadow.
mxAbstractCanvas2D.prototype.setShadow = function( enabled )
Enables or disables and configures the current shadow.
mxAbstractCanvas2D.prototype.setShadowColor = function( value )
Enables or disables and configures the current shadow.
mxAbstractCanvas2D.prototype.setShadowAlpha = function( value )
Enables or disables and configures the current shadow.
mxAbstractCanvas2D.prototype.setShadowOffset = function( dx, dy )
Starts a new path.
mxAbstractCanvas2D.prototype.begin = function()
Moves the current path the given coordinates.
mxAbstractCanvas2D.prototype.moveTo = function( x, y )
Draws a line to the given coordinates.
mxAbstractCanvas2D.prototype.lineTo = function( x, y )
Adds a quadratic curve to the current path.
mxAbstractCanvas2D.prototype.quadTo = function( x1, y1, x2, y2 )
Adds a bezier curve to the current path.
mxAbstractCanvas2D.prototype.curveTo = function( x1, y1, x2, y2, x3, y3 )
Adds the given arc to the current path.
mxAbstractCanvas2D.prototype.arcTo = function( rx, ry, angle, largeArcFlag, sweepFlag, x, y )
Closes the current path.
mxAbstractCanvas2D.prototype.close = function( x1, y1, x2, y2, x3, y3 )
Empty implementation for backwards compatibility.
mxAbstractCanvas2D.prototype.end = function()
Defines the value for none.
NONE: 'none'