Extends mxShape to implement an actor shape. If a custom shape with one filled area is needed, then this shape’s redrawPath should be overridden.
function SampleShape() { } SampleShape.prototype = new mxActor(); SampleShape.prototype.constructor = vsAseShape; mxCellRenderer.prototype.defaultShapes['sample'] = SampleShape; SampleShape.prototype.redrawPath = function(path, x, y, w, h) { path.moveTo(0, 0); path.lineTo(w, h); // ... path.close(); }
This shape is registered under mxConstants.SHAPE_ACTOR in mxCellRenderer.
mxActor | Extends mxShape to implement an actor shape. |
Functions | |
mxActor | Constructs a new actor shape. |
Variables | |
mixedModeHtml | Overrides the parent value with false, meaning it will draw in VML in mixed Html mode. |
preferModeHtml | Overrides the parent value with false, meaning it will draw as VML in prefer Html mode. |
Functions | |
createVml | Creates and returns the VML node(s) to represent this shape. |
redrawVml | Updates the VML node(s) to reflect the latest bounds and scale. |
createSvg | Creates and returns the SVG node(s) to represent this shape. |
redrawSvg | Updates the SVG node(s) to reflect the latest bounds and scale. |
redrawPath | Draws the path for this shape. |
function mxActor( bounds, fill, stroke, strokewidth )
Constructs a new actor shape.
bounds | mxRectangle that defines the bounds. This is stored in mxShape.bounds. |
fill | String that defines the fill color. This is stored in <fill>. |
stroke | String that defines the stroke color. This is stored in <stroke>. |
strokewidth | Optional integer that defines the stroke width. Default is 1. This is stored in <strokewidth>. |
mxActor.prototype.redrawPath = function( path, x, y, w, h )
Draws the path for this shape. This method uses the mxPath abstraction to paint the shape for VML and SVG.
Constructs a new actor shape.
function mxActor( bounds, fill, stroke, strokewidth )
Overrides the parent value with false, meaning it will draw in VML in mixed Html mode.
mxActor.prototype.mixedModeHtml
Overrides the parent value with false, meaning it will draw as VML in prefer Html mode.
mxActor.prototype.preferModeHtml
Creates and returns the VML node(s) to represent this shape.
mxActor.prototype.createVml = function()
Updates the VML node(s) to reflect the latest bounds and scale.
mxActor.prototype.redrawVml = function()
Creates and returns the SVG node(s) to represent this shape.
mxActor.prototype.createSvg = function()
Updates the SVG node(s) to reflect the latest bounds and scale.
mxActor.prototype.redrawSvg = function()
Draws the path for this shape.
mxActor.prototype.redrawPath = function( path, x, y, w, h )
Holds the mxRectangle that specifies the bounds of this shape.
mxShape.prototype.bounds