mxDoubleEllipse

Extends mxShape to implement a double ellipse shape.  This shape is registered under mxConstants.SHAPE_DOUBLE_ELLIPSE in mxCellRenderer.  Use the following override to only fill the inner ellipse in this shape:

mxDoubleEllipse.prototype.paintVertexShape = function(c, x, y, w, h)
{
  c.ellipse(x, y, w, h);
  c.stroke();

  var inset = mxUtils.getValue(this.style, mxConstants.STYLE_MARGIN, Math.min(3 + this.strokewidth, Math.min(w / 5, h / 5)));
  x += inset;
  y += inset;
  w -= 2 * inset;
  h -= 2 * inset;

  if (w > 0 && h > 0)
  {
    c.ellipse(x, y, w, h);
  }

  c.fillAndStroke();
};
Summary
mxDoubleEllipseExtends mxShape to implement a double ellipse shape.
Functions
mxDoubleEllipseConstructs a new ellipse shape.
Variables
vmlScaleScale for improving the precision of VML rendering.
Functions
paintBackgroundPaints the background.
paintForegroundPaints the foreground.

Functions

mxDoubleEllipse

function mxDoubleEllipse(bounds,
fill,
stroke,
strokewidth)

Constructs a new ellipse 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

vmlScale

mxDoubleEllipse.prototype.vmlScale

Scale for improving the precision of VML rendering.  Default is 10.

Functions

paintBackground

mxDoubleEllipse.prototype.paintBackground = function(c,
x,
y,
w,
h)

Paints the background.

paintForeground

mxDoubleEllipse.prototype.paintForeground = function(c,
x,
y,
w,
h)

Paints the foreground.

Base class for all shapes.
function mxDoubleEllipse(bounds,
fill,
stroke,
strokewidth)
Constructs a new ellipse shape.
mxDoubleEllipse.prototype.vmlScale
Scale for improving the precision of VML rendering.
mxDoubleEllipse.prototype.paintBackground = function(c,
x,
y,
w,
h)
Paints the background.
mxDoubleEllipse.prototype.paintForeground = function(c,
x,
y,
w,
h)
Paints the foreground.
Name under which mxDoubleEllipse 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