Represents the geometry of a cell. For vertices, the geometry consists of the x- and y-location, as well as the width and height. For edges, the edge either defines the source- and target-terminal, or the geometry defines the respective terminal points.
mxGeometry | Represents the geometry of a cell. |
Variables | |
TRANSLATE_CONTROL_POINTS | Global switch to translate the points in translate. |
alternateBounds | Stores alternate values for x, y, width and height in a rectangle. |
sourcePoint | Defines the source point of the edge. |
targetPoint | Defines the target point of the edge. |
points | Array of mxPoints which specifies the control points along the edge. |
offset | Holds the offset of the label for edges. |
relative | Specifies if the coordinates in the geometry are to be interpreted as relative coordinates. |
Functions | |
mxGeometry | Constructs a new object to describe the size and location of a vertex or the control points of an edge. |
getTerminalPoint | Returns the mxPoint representing the source or target point of this edge. |
setTerminalPoint | Sets the sourcePoint or targetPoint to the given mxPoint and returns the new point. |
translate | Translates the geometry by the specified amount. |
copy | Returns a copy of this mxGeometry. |
var $points
Array of mxPoints which specifies the control points along the edge. These points are the intermediate points on the edge, for the endpoints use targetPoint and sourcePoint or set the terminals of the edge to a non-null value. Default is null.
function getTerminalPoint( $isSource )
Returns the mxPoint representing the source or target point of this edge. This is only used if the edge has no source or target vertex.
isSource | Boolean that specifies if the source or target point should be returned. |
function setTerminalPoint( $point, $isSource )
Sets the sourcePoint or targetPoint to the given mxPoint and returns the new point.
point | Point to be used as the new source or target point. |
isSource | Boolean that specifies if the source or target point should be set. |
function translate( $dx, $dy )
Translates the geometry by the specified amount. That is, <x> and <y> of the geometry, the sourcePoint, targetPoint and all elements of points are translated by the given amount. <x> and <y> are only translated if relative is false. If TRANSLATE_CONTROL_POINTS is false, then points are not modified by this function.
dx | Integer that specifies the x-coordinate of the translation. |
dy | Integer that specifies the y-coordinate of the translation. |
function copy()
Returns a copy of this mxGeometry.
Global switch to translate the points in translate.
public static $TRANSLATE_CONTROL_POINTS
Stores alternate values for x, y, width and height in a rectangle.
var $alternateBounds
Defines the source point of the edge.
var $sourcePoint
Defines the target point of the edge.
var $targetPoint
Array of mxPoints which specifies the control points along the edge.
var $points
Holds the offset of the label for edges.
var $offset
Specifies if the coordinates in the geometry are to be interpreted as relative coordinates.
var $relative
Constructs a new object to describe the size and location of a vertex or the control points of an edge.
function mxGeometry( $x = 0, $y = 0, $width = 0, $height = 0 )
Returns the mxPoint representing the source or target point of this edge.
function getTerminalPoint( $isSource )
Sets the sourcePoint or targetPoint to the given mxPoint and returns the new point.
function setTerminalPoint( $point, $isSource )
Translates the geometry by the specified amount.
function translate( $dx, $dy )
Returns a copy of this mxGeometry.
function copy()