Holds the operator for closing curves. Default is 'Z'.
Specifies if the output should be compressed by removing redundant calls.
Holds the
Contains the string used for bezier curves. Default is 'C'.
Holds the last x coordinate.
Holds the last y coordinate.
Contains the string used for moving in paths. Default is 'L'.
Contains the string used for moving in paths. Default is 'M'.
Holds the current path as an array.
Boolean value that specifies if events should be handled. Default is false.
Contains the string used for quadratic paths. Default is 'Q'.
Reference to the container for the SVG content.
Switch for rotation of HTML. Default is false.
Holds the current state.
Stack of states.
Specifies if text output should be enabled.
Adds the given operation to the path.
Adds the given arc to the current path. This is a synthetic operation that is broken down into curves.
Starts a new path and puts it into the drawing buffer.
Closes the current path.
Creates the state of the this canvas.
Create a new
Adds a bezier curve to the current path.
Number that represents the x-coordinate of the first control point.
Number that represents the y-coordinate of the first control point.
Number that represents the x-coordinate of the second control point.
Number that represents the y-coordinate of the second control point.
Number that represents the x-coordinate of the endpoint.
Number that represents the y-coordinate of the endpoint.
Puts an ellipse into the drawing buffer.
Number that represents the x-coordinate of the ellipse.
Number that represents the y-coordinate of the ellipse.
Number that represents the width of the ellipse.
Number that represents the height of the ellipse.
Empty implementation for backwards compatibility. This will be removed.
Fills the current drawing buffer.
Fills the current drawing buffer and its outline.
Returns a formatted number with 2 decimal places.
Paints an image.
Number that represents the x-coordinate of the image.
Number that represents the y-coordinate of the image.
Number that represents the width of the image.
Number that represents the height of the image.
String that specifies the URL of the image.
Boolean indicating if the aspect of the image should be preserved.
Boolean indicating if the image should be flipped horizontally.
Boolean indicating if the image should be flipped vertically.
Draws a line to the given coordinates.
Number that represents the x-coordinate of the endpoint.
Number that represents the y-coordinate of the endpoint.
Moves the current path the given point.
Number that represents the x-coordinate of the point.
Number that represents the y-coordinate of the point.
Adds a quadratic curve to the current path.
Number that represents the x-coordinate of the control point.
Number that represents the y-coordinate of the control point.
Number that represents the x-coordinate of the endpoint.
Number that represents the y-coordinate of the endpoint.
Puts a rectangle into the drawing buffer.
Number that represents the x-coordinate of the rectangle.
Number that represents the y-coordinate of the rectangle.
Number that represents the width of the rectangle.
Number that represents the height of the rectangle.
Resets the state of this canvas.
Restores the drawing state.
Rotates and/or flips the output around a given center. (Note: Due to limitations in VML, the rotation cannot be concatenated.)
Number that represents the angle of the rotation (in degrees).
Boolean indicating if the output should be flipped horizontally.
Boolean indicating if the output should be flipped vertically.
Number that represents the x-coordinate of the rotation center.
Number that represents the y-coordinate of the rotation center.
Puts a rounded rectangle into the drawing buffer.
Number that represents the x-coordinate of the rectangle.
Number that represents the y-coordinate of the rectangle.
Number that represents the width of the rectangle.
Number that represents the height of the rectangle.
Number that represents the horizontal rounding.
Number that represents the vertical rounding.
Saves the drawing state.
Scales the output.
Sets the current alpha.
Number that represents the new alpha. Possible values are between 1 (opaque) and 0 (transparent).
Sets the current dash pattern.
String that represents the dash pattern, which is a sequence of numbers defining the length of the dashes and the length of the spaces between the dashes. The lengths are relative to the line width - a length of 1 is equals to the line width.
Sets the current fill alpha.
Number that represents the new fill alpha. Possible values are between 1 (opaque) and 0 (transparent).
Sets the current fill color.
Hexadecimal representation of the color or 'none'.
Sets the current font background color.
Hexadecimal representation of the color or 'none'.
Sets the current font border color.
Hexadecimal representation of the color or 'none'.
Sets the current font style.
Numeric representation of the font family. This is the sum of the font styles from mxConstants.
Sets the gradient. Note that the coordinates may be ignored by some implementations.
Hexadecimal representation of the start color.
Hexadecimal representation of the end color.
X-coordinate of the gradient region.
y-coordinate of the gradient region.
Width of the gradient region.
Height of the gradient region.
One of Constants#DIRECTION_NORTH, Constants#DIRECTION_EAST, Constants#DIRECTION_SOUTH or Constants#DIRECTION_WEST.
Optional alpha of the start color. Default is 1. Possible values are between 1 (opaque) and 0 (transparent).
Optional alpha of the end color. Default is 1. Possible values are between 1 (opaque) and 0 (transparent).
Sets the current link. Hook for subclassers.
Enables or disables shadows.
Boolean that specifies if shadows should be enabled.
Sets the current shadow alpha.
Number that represents the new alpha. Possible values are between 1 (opaque) and 0 (transparent).
Sets the current shadow color.
Hexadecimal representation of the color or none
.
Sets the current shadow offset.
Number that represents the horizontal offset of the shadow.
Number that represents the vertical offset of the shadow.
Sets the current stroke alpha.
Number that represents the new stroke alpha. Possible values are between 1 (opaque) and 0 (transparent).
Sets the current stroke color.
Hexadecimal representation of the color or 'none'.
Sets the current stroke width.
Numeric representation of the stroke width.
Paints the outline of the current drawing buffer.
Paints the given text. Possible values for format are empty string for plain text and html for HTML markup. Background and border color as well as clipping is not available in plain text labels for VML. HTML labels are not available as part of shapes with no foreignObject support in SVG (eg. IE9, IE10).
Number that represents the x-coordinate of the text.
Number that represents the y-coordinate of the text.
Number that represents the available width for the text or 0 for automatic width.
Number that represents the available height for the text or 0 for automatic height.
String that specifies the text to be painted.
String that represents the horizontal alignment.
String that represents the vertical alignment.
Boolean that specifies if word-wrapping is enabled. Requires w > 0.
Empty string for plain text or 'html' for HTML markup.
Specifies the overflow behaviour of the label. Requires w > 0 and/or h > 0.
Boolean that specifies if the label should be clipped. Requires w > 0 and/or h > 0.
Number that specifies the angle of the rotation around the anchor point of the text.
Optional string that specifies the text direction. Possible values are rtl and ltr.
Translates the output.
Number that specifies the horizontal translation.
Number that specifies the vertical translation.
Writes the rendering defaults to root:
Base class for all canvases.
The following methods make up the public interface of the canvas 2D for all painting in mxGraph:
arcTo is an additional method for drawing paths. This is a synthetic method, meaning that it is turned into a sequence of curves by default. Subclasses may add native support for arcs.
All color values of NONE will be converted to null in the state.