yfiles.client.tiles.GraphBounds
Class GraphBounds

Instances of this class represent a box (rectangle).

 
Field Summary
 Number maxX
          Right side of the box.
 Number maxY
          Lower side of the box.
 Number minX
          Left side of the box.
 Number minY
          Upper side of the box.
 
Constructor Summary
GraphBounds(/*Number*/ minX, /*Number*/ maxX, /*Number*/ minY, /*Number*/ maxY)
           This is an axis parallel bounding box.
 
Method Summary
 Number area()
          returns the area.
 Object center()
          returns the center as an object with x and y attributes.
  enlarge(/*Number*/ size)
          returns a new instance that has been enlarged by the provided size on all sides.
 Number height()
          returns the height.
 GraphBounds intersect(/*GraphBounds*/ another)
          returns a new instance which is the intersection of this and another.
 GraphBounds round()
          returns a new instance with Math.floor() applied to all four parameters.
 GraphBounds scale(/*Number*/ factor)
          returns a new instance for which all four parameters (see the constructor) are multplied with the given factor.
  shift(/*Number*/ deltaX, /*Number*/ deltaY)
          returns a new instance which is this shifted by deltaX in x direction and shifted by deltaY in y direction.
 GraphBounds union(/*GraphBounds*/ another)
          returns a new instance which is the union of this and another.
 Number width()
          returns the width.
 
Field Detail

maxX

/*Number*/ maxX
Right side of the box.

maxY

/*Number*/ maxY
Lower side of the box.

minX

/*Number*/ minX
Left side of the box.

minY

/*Number*/ minY
Upper side of the box.
 
Constructor Detail

GraphBounds

GraphBounds(/*Number*/ minX, /*Number*/ maxX, /*Number*/ minY, /*Number*/ maxY)
This is an axis parallel bounding box.
Parameters:
minX - left side of the box
maxX - right side of the box
minY - upper side of the box
maxY - lower side of the box
Method Detail

area

Number area()
returns the area.

center

Object center()
returns the center as an object with x and y attributes.

enlarge

enlarge(/*Number*/ size)
returns a new instance that has been enlarged by the provided size on all sides.
Parameters:
size - the size to add to the rectangle's bounds on all sides

height

Number height()
returns the height.

intersect

GraphBounds intersect(/*GraphBounds*/ another)
returns a new instance which is the intersection of this and another.
Parameters:
another - another GraphBounds instance

round

GraphBounds round()
returns a new instance with Math.floor() applied to all four parameters.

scale

GraphBounds scale(/*Number*/ factor)
returns a new instance for which all four parameters (see the constructor) are multplied with the given factor.
Parameters:
factor - the scaling factor

shift

shift(/*Number*/ deltaX, /*Number*/ deltaY)
returns a new instance which is this shifted by deltaX in x direction and shifted by deltaY in y direction.
Parameters:
deltaX - shift amount in x direction
deltaY - shift amount in y direction

union

GraphBounds union(/*GraphBounds*/ another)
returns a new instance which is the union of this and another.
Parameters:
another - another GraphBounds instance

width

Number width()
returns the width.

Copyright © 2006-2011 yWorks GmbH. All rights reserved.