com::mxgraph::mxRectangle Class Reference
Implements a 2-dimensional rectangle with double precision coordinates.
More...
List of all members.
Public Member Functions |
| mxRectangle () |
| Constructs a new rectangle at (0, 0) with the width and height set to 0.
|
| mxRectangle (mxRectangle rect) |
| Constructs a copy of the given rectangle.
|
| mxRectangle (Rectangle rect) |
| Constructs a copy of the given rectangle.
|
| mxRectangle (double x, double y, double width, double height) |
| Constructs a rectangle using the given parameters.
|
void | setRect (double x, double y, double w, double h) |
| Sets this rectangle to the specified values.
|
double | GetCenterX () |
| Returns the x-coordinate of the center.
|
double | GetCenterY () |
| Returns the y-coordinate of the center.
|
void | Add (mxRectangle rect) |
| Adds the given rectangle to this rectangle.
|
void | Grow (double amount) |
| Grows the rectangle by the given amount, that is, this method subtracts the given amount from the x- and y-coordinates and adds twice the amount to the width and height.
|
bool | Contains (double x, double y) |
| Returns true if this rectangle contains the given point (x, y).
|
Rectangle | GetRectangle () |
| Returns the bounds as a new rectangle.
|
new Boolean | Equals (Object obj) |
| Returns true if the given object equals this rectangle.
|
new mxRectangle | Clone () |
| Returns a new instance of the same rectangle.
|
Protected Attributes |
double | width |
| Holds the width. Default is 0.
|
double | height |
| Holds the height. Default is 0.
|
Properties |
double | Width [get, set] |
| Sets or returns the width of the rectangle.
|
double | Height [get, set] |
| Sets or returns the height of the rectangle.
|
Detailed Description
Implements a 2-dimensional rectangle with double precision coordinates.
Constructor & Destructor Documentation
com::mxgraph::mxRectangle::mxRectangle |
( |
|
) |
[inline] |
Constructs a new rectangle at (0, 0) with the width and height set to 0.
com::mxgraph::mxRectangle::mxRectangle |
( |
mxRectangle |
rect |
) |
[inline] |
Constructs a copy of the given rectangle.
- Parameters:
-
| rect | Rectangle to construct a copy of. |
com::mxgraph::mxRectangle::mxRectangle |
( |
Rectangle |
rect |
) |
[inline] |
Constructs a copy of the given rectangle.
- Parameters:
-
| rect | Rectangle to construct a copy of. |
com::mxgraph::mxRectangle::mxRectangle |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
width, |
|
|
double |
height | |
|
) |
| | [inline] |
Constructs a rectangle using the given parameters.
- Parameters:
-
| x | X-coordinate of the new rectangle. |
| y | Y-coordinate of the new rectangle. |
| width | Width of the new rectangle. |
| height | Height of the new rectangle. |
Member Function Documentation
void com::mxgraph::mxRectangle::Add |
( |
mxRectangle |
rect |
) |
[inline] |
Adds the given rectangle to this rectangle.
new mxRectangle com::mxgraph::mxRectangle::Clone |
( |
|
) |
[inline] |
bool com::mxgraph::mxRectangle::Contains |
( |
double |
x, |
|
|
double |
y | |
|
) |
| | [inline] |
Returns true if this rectangle contains the given point (x, y).
- Parameters:
-
| x | X-coordinate of the point. |
| y | Y-coordinate of the point. |
- Returns:
- Returns true if (x, y) lies within the given area.
new Boolean com::mxgraph::mxRectangle::Equals |
( |
Object |
obj |
) |
[inline] |
Returns true if the given object equals this rectangle.
- Returns:
- Returns true if obj is equal.
Reimplemented from com::mxgraph::mxPoint.
double com::mxgraph::mxRectangle::GetCenterX |
( |
|
) |
[inline] |
Returns the x-coordinate of the center.
- Returns:
- Returns the x-coordinate of the center.
double com::mxgraph::mxRectangle::GetCenterY |
( |
|
) |
[inline] |
Returns the y-coordinate of the center.
- Returns:
- Returns the y-coordinate of the center.
Rectangle com::mxgraph::mxRectangle::GetRectangle |
( |
|
) |
[inline] |
Returns the bounds as a new rectangle.
- Returns:
- Returns a new rectangle for the bounds.
void com::mxgraph::mxRectangle::Grow |
( |
double |
amount |
) |
[inline] |
Grows the rectangle by the given amount, that is, this method subtracts the given amount from the x- and y-coordinates and adds twice the amount to the width and height.
- Parameters:
-
| amount | Amount by which the rectangle should be grown. |
void com::mxgraph::mxRectangle::setRect |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
w, |
|
|
double |
h | |
|
) |
| | [inline] |
Sets this rectangle to the specified values.
Member Data Documentation
Holds the height. Default is 0.
Holds the width. Default is 0.
Property Documentation
double com::mxgraph::mxRectangle::Height [get, set] |
Sets or returns the height of the rectangle.
double com::mxgraph::mxRectangle::Width [get, set] |
Sets or returns the width of the rectangle.
The documentation for this class was generated from the following file: