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.
paintVertexShapeRedirects to redrawPath for subclasses to work.
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>.

paintVertexShape

mxActor.prototype.paintVertexShape = function(c,
x,
y,
w,
h)

Redirects to redrawPath for subclasses to work.

redrawPath

mxActor.prototype.redrawPath = function(c,
x,
y,
w,
h)

Draws the path for this shape.

Base class for all shapes.
function mxActor(bounds,
fill,
stroke,
strokewidth)
Constructs a new actor shape.
mxActor.prototype.paintVertexShape = function(c,
x,
y,
w,
h)
Redirects to redrawPath for subclasses to work.
mxActor.prototype.redrawPath = function(c,
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.
Close