mxActor

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.

Example

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.

Summary
mxActorExtends mxShape to implement an actor shape.
Functions
mxActorConstructs a new actor shape.
Variables
mixedModeHtmlOverrides the parent value with false, meaning it will draw in VML in mixed Html mode.
preferModeHtmlOverrides the parent value with false, meaning it will draw as VML in prefer Html mode.
Functions
createVmlCreates and returns the VML node(s) to represent this shape.
redrawVmlUpdates the VML node(s) to reflect the latest bounds and scale.
createSvgCreates and returns the SVG node(s) to represent this shape.
redrawSvgUpdates the SVG node(s) to reflect the latest bounds and scale.
redrawPathDraws the path for this shape.

Functions

mxActor

function mxActor(bounds,
fill,
stroke,
strokewidth)

Constructs a new actor shape.

Parameters

boundsmxRectangle that defines the bounds.  This is stored in mxShape.bounds.
fillString that defines the fill color.  This is stored in <fill>.
strokeString that defines the stroke color.  This is stored in <stroke>.
strokewidthOptional integer that defines the stroke width.  Default is 1.  This is stored in <strokewidth>.

Variables

mixedModeHtml

mxActor.prototype.mixedModeHtml

Overrides the parent value with false, meaning it will draw in VML in mixed Html mode.

preferModeHtml

mxActor.prototype.preferModeHtml

Overrides the parent value with false, meaning it will draw as VML in prefer Html mode.

Functions

createVml

mxActor.prototype.createVml = function()

Creates and returns the VML node(s) to represent this shape.

redrawVml

mxActor.prototype.redrawVml = function()

Updates the VML node(s) to reflect the latest bounds and scale.

createSvg

mxActor.prototype.createSvg = function()

Creates and returns the SVG node(s) to represent this shape.

redrawSvg

mxActor.prototype.redrawSvg = function()

Updates the SVG node(s) to reflect the latest bounds and scale.

redrawPath

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.

Base class for all shapes.
function mxActor(bounds,
fill,
stroke,
strokewidth)
Constructs a new actor shape.
mxActor.prototype.mixedModeHtml
Overrides the parent value with false, meaning it will draw in VML in mixed Html mode.
mxActor.prototype.preferModeHtml
Overrides the parent value with false, meaning it will draw as VML in prefer Html mode.
mxActor.prototype.createVml = function()
Creates and returns the VML node(s) to represent this shape.
mxActor.prototype.redrawVml = function()
Updates the VML node(s) to reflect the latest bounds and scale.
mxActor.prototype.createSvg = function()
Creates and returns the SVG node(s) to represent this shape.
mxActor.prototype.redrawSvg = function()
Updates the SVG node(s) to reflect the latest bounds and scale.
mxActor.prototype.redrawPath = function(path,
x,
y,
w,
h)
Draws the path for this shape.
Name under which mxActor is registered in mxCellRenderer.
Renders cells into a document object model.
Extends mxPoint to implement a 2-dimensional rectangle with double precision coordinates.
mxShape.prototype.bounds
Holds the mxRectangle that specifies the bounds of this shape.
An abstraction for creating VML and SVG paths.
Close