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(); };
mxDoubleEllipse | Extends mxShape to implement a double ellipse shape. |
Functions | |
mxDoubleEllipse | Constructs a new ellipse shape. |
Variables | |
vmlScale | Scale for improving the precision of VML rendering. |
Functions | |
paintBackground | Paints the background. |
paintForeground | Paints the foreground. |
getLabelBounds | Returns the bounds for the label. |
function mxDoubleEllipse( bounds, fill, stroke, strokewidth )
Constructs a new ellipse 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>. |
Constructs a new ellipse shape.
function mxDoubleEllipse( bounds, fill, stroke, strokewidth )
Scale for improving the precision of VML rendering.
mxDoubleEllipse.prototype.vmlScale
Paints the background.
mxDoubleEllipse.prototype.paintBackground = function( c, x, y, w, h )
Paints the foreground.
mxDoubleEllipse.prototype.paintForeground = function( c, x, y, w, h )
Returns the bounds for the label.
mxDoubleEllipse.prototype.getLabelBounds = function( rect )
Holds the mxRectangle that specifies the bounds of this shape.
mxShape.prototype.bounds