Interface for mutable rectangles aligned to the axes in 2D coordinate space with double precision coordinates.
Remarks
Type Details
- yFiles module
- core
See Also
Properties
Gets the coordinates of the bottom left corner of the rectangle as a Point.
Defined in
Gets the coordinates of the bottom right corner of the rectangle as a Point.
Defined in
Gets the coordinates of the center of the rectangle as a Point.
Defined in
Gets the center x-coordinate of the rectangle.
Defined in
Gets the center y-coordinate of the rectangle.
Defined in
Gets or sets the height of this instance.
Remarks
See Also
Implements
Determines whether the specified size is empty.
Remarks
Overrides
Gets the maximum x-coordinate of the rectangle.
Remarks
Defined in
Gets the maximum y-coordinate of the rectangle.
Remarks
Defined in
Gets the current size of the rectangle as Size.
Defined in
Gets the coordinates of the top left corner of the rectangle as a Point.
Defined in
Gets the coordinates of the top right corner of the rectangle as a Point.
Defined in
Gets or sets the width of this instance.
Remarks
See Also
Implements
Gets or sets the x-coordinate for this point.
Remarks
See Also
Implements
Gets or sets the y-coordinate for this point.
Remarks
See Also
Implements
Methods
Adds a rectangle to another one.
Remarks
Parameters
A map of options to pass to the method.
- rectangle2 - IRectangle
- The rectangle to be added.
Adds a point to a rectangle, possibly enlarging the rectangle.
Remarks
If the rectangle is initially empty, i.e. its width or height is negative, the bounds of the rectangle will be set to (x, y, 0, 0).
If either the x- or y-coordinate of the given point is infinite, this method has an undefined result.
Parameters
A map of options to pass to the method.
- point - IPoint
- The coordinate to include in the bounds.
Determines whether the given rectangle contains the provided point.
Parameters
A map of options to pass to the method.
- point - IPoint
- The point to test.
- eps - number
- A positive value allows for fuzzy hit testing. If the point lies outside the given object but its distance is less than or equal to that value, it will be considered a hit.
Returns
- ↪boolean
true
iff the point lies inside the rectangle.
Defined in
Determines whether the given rectangle contains the provided rectangle.
Remarks
More formally, this rectangle contains the other rectangle if the coordinates of each point of the other rectangle are neither less than this rectangle's x and y minus eps
nor greater than this rectangle's MaxX and MaxY plus eps
.
Consequently, an empty rectangle neither contains any other rectangle nor is it contained in any other rectangle.
Note, the result of this method can be counterintuitive if this rectangle's x or y is positive or negative infinity.
Parameters
A map of options to pass to the method.
- other - IRectangle
- The rectangle to test.
- eps - number
- A positive value allows for fuzzy hit testing.
Returns
- ↪boolean
true
if the given rectangle contains the provided rectangle,false
otherwise.
Defined in
Sets the center of the rectangle to the provided value.
Remarks
Parameters
A map of options to pass to the method.
- center - Point
- The new center coordinates.
Applies a new position and size to a given mutable rectangle.
Parameters
A map of options to pass to the method.
- x - number
- The new x-coordinate of the upper left corner of the rectangle.
- y - number
- The new y-coordinate of the upper left corner of the rectangle.
- width - number
- The new width of the rectangle.
- height - number
- The new height of the rectangle.
Applies a new position and size to a given mutable rectangle.
Parameters
A map of options to pass to the method.
- newRectangle - IRectangle
- The bounds to set for the
rectangle
.
Sets the coordinates of the size to the given values.
Parameters
A map of options to pass to the method.
- newWidth - number
- The new x-coordinate
- newHeight - number
- The new y-coordinate
Defined in
Sets the coordinates of the size to the given values.
Parameters
A map of options to pass to the method.
- newSize - ISize
- The new location.
Defined in
Creates a new Size instance with the current values of this size.