Implements a canvas to be used with mxImageExport. This canvas writes all calls as child nodes to the given root XML node.
var xmlDoc = mxUtils.createXmlDocument(); var root = xmlDoc.createElement('output'); xmlDoc.appendChild(root); var xmlCanvas = new mxXmlCanvas2D(root);
mxXmlCanvas2D | Implements a canvas to be used with mxImageExport. |
Functions | |
mxXmlCanvas2D | Constructs a XML canvas. |
Variables | |
converter | Holds the mxUrlConverter to convert image URLs. |
compressed | Specifies if the output should be compressed by removing redundant calls. |
textEnabled | Specifies if text output should be enabled. |
Functions | |
getConverter | Returns converter. |
isCompressed | Returns compressed. |
setCompressed | Sets compressed. |
isTextEnabled | Returns textEnabled. |
setTextEnabled | Sets textEnabled. |
getDocument | Returns the owner document of the root element. |
save | Saves the state of the graphics object. |
restore | Restores the state of the graphics object. |
scale | Scales the current graphics object. |
translate | Translates the current graphics object. |
rotate | Rotates and/or flips the current graphics object. |
setStrokeWidth | Sets the stroke width. |
setStrokeColor | Sets the stroke color. |
setDashed | Sets the dashed state to true or false. |
setDashPattern | Sets the dashed pattern to the given space separated list of numbers. |
setLineCap | Sets the linecap. |
setLineJoin | Sets the linejoin. |
setMiterLimit | Sets the miterlimit. |
setFontSize | Sets the fontsize. |
setFontColor | Sets the fontcolor. |
setFontFamily | Sets the fontfamily. |
setFontStyle | Sets the fontstyle. |
setAlpha | Sets the current alpha. |
setFillColor | Sets the fillcolor. |
setGradient | Sets the gradient color. |
setGlassGradient | Sets the glass gradient. |
rect | Sets the current path to a rectangle. |
roundrect | Sets the current path to a rounded rectangle. |
ellipse | Sets the current path to an ellipse. |
image | Paints an image. |
text | Paints the given text. |
begin | Starts a new path. |
moveTo | Moves the current path the given coordinates. |
lineTo | Adds a line to the current path. |
quadTo | Adds a quadratic curve to the current path. |
curveTo | Adds a bezier curve to the current path. |
close | Closes the current path. |
stroke | Paints the outline of the current path. |
fill | Fills the current path. |
fillstroke | Fills and paints the outline of the current path. |
shadow | Paints the current path as a shadow of the given color. |
clip | Uses the current path for clipping. |
var converter
Holds the mxUrlConverter to convert image URLs.
getConverter: function()
Returns converter.
isCompressed: function()
Returns compressed.
setCompressed: function( value )
Sets compressed.
isTextEnabled: function()
Returns textEnabled.
setTextEnabled: function( value )
Sets textEnabled.
Constructs a XML canvas.
var mxXmlCanvas2D = function( root )
Holds the mxUrlConverter to convert image URLs.
var converter
Specifies if the output should be compressed by removing redundant calls.
var compressed
Specifies if text output should be enabled.
var textEnabled
Returns converter.
getConverter: function()
Returns compressed.
isCompressed: function()
Sets compressed.
setCompressed: function( value )
Returns textEnabled.
isTextEnabled: function()
Sets textEnabled.
setTextEnabled: function( value )
Returns the owner document of the root element.
getDocument: function()
Saves the state of the graphics object.
save: function()
Restores the state of the graphics object.
restore: function()
Scales the current graphics object.
scale: function( value )
Translates the current graphics object.
translate: function( dx, dy )
Rotates and/or flips the current graphics object.
rotate: function( theta, flipH, flipV, cx, cy )
Sets the stroke width.
setStrokeWidth: function( value )
Sets the stroke color.
setStrokeColor: function( value )
Sets the dashed state to true or false.
setDashed: function( value )
Sets the dashed pattern to the given space separated list of numbers.
setDashPattern: function( value )
Sets the linecap.
setLineCap: function( value )
Sets the linejoin.
setLineJoin: function( value )
Sets the miterlimit.
setMiterLimit: function( value )
Sets the fontsize.
setFontSize: function( value )
Sets the fontcolor.
setFontColor: function( value )
Sets the fontfamily.
setFontFamily: function( value )
Sets the fontstyle.
setFontStyle: function( value )
Sets the current alpha.
setAlpha: function( alpha )
Sets the fillcolor.
setFillColor: function( value )
Sets the gradient color.
setGradient: function( color1, color2, x, y, w, h, direction )
Sets the glass gradient.
setGlassGradient: function( x, y, w, h )
Sets the current path to a rectangle.
rect: function( x, y, w, h )
Sets the current path to a rounded rectangle.
roundrect: function( x, y, w, h, dx, dy )
Sets the current path to an ellipse.
ellipse: function( x, y, w, h )
Paints an image.
image: function( x, y, w, h, src, aspect, flipH, flipV )
Paints the given text.
text: function( x, y, w, h, str, align, valign, vertical, wrap, format )
Starts a new path.
begin: function()
Moves the current path the given coordinates.
moveTo: function( x, y )
Adds a line to the current path.
lineTo: function( x, y )
Adds a quadratic curve to the current path.
quadTo: function( x1, y1, x2, y2 )
Adds a bezier curve to the current path.
curveTo: function( x1, y1, x2, y2, x3, y3 )
Closes the current path.
close: function()
Paints the outline of the current path.
stroke: function()
Fills the current path.
fill: function()
Paints the current path as a shadow of the given color.
shadow: function( value, filled )
Uses the current path for clipping.
clip: function()