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.

 yfiles/client/tiles/GraphBounds enlarge(Number size)           

returns a new instance that has been enlarged by the provided size on all sides.

 Number height()           

returns the height.

 yfiles/client/tiles/GraphBounds intersect(yfiles/client/tiles/GraphBounds another)           

returns a new instance which is the intersection of this and another.

 yfiles/client/tiles/GraphBounds round()           

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

 yfiles/client/tiles/GraphBounds scale(Number factor)           

returns a new instance for which all four parameters (see the constructor) are multplied with the given factor.

 yfiles/client/tiles/GraphBounds 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.

 yfiles/client/tiles/GraphBounds union(yfiles/client/tiles/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

yfiles/client/tiles/GraphBounds 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

yfiles/client/tiles/GraphBounds intersect(yfiles/client/tiles/GraphBounds another)

returns a new instance which is the intersection of this and another.

Parameters:
another -

another GraphBounds instance


round

yfiles/client/tiles/GraphBounds round()

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


scale

yfiles/client/tiles/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

yfiles/client/tiles/GraphBounds 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

yfiles/client/tiles/GraphBounds union(yfiles/client/tiles/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-2013 yWorks GmbH. All rights reserved.