The DRect class defines a rectangle in the plane using integer precision. More...
Public Member Functions | |
| def | DRect |
| Default constructor. More... | |
| def | DRect |
| Construct DRect with its upper left corner at (left,top) and width and height. More... | |
| def | DRect |
| Copy constructor. More... | |
| def | left |
| def | right |
| Same as left() + width() More... | |
| def | top |
| def | bottom |
| Same as top() + height() More... | |
| def | width |
| def | height |
| def | setLeft |
| Sets the left edge of the rectangle to the given x coordinate holding width() and height() constant. More... | |
| def | setRight |
| Sets the right edge of the rectangle to the given x coordinate holding width() and height() constant. More... | |
| def | setTop |
| Sets the top edge of the rectangle to the given y-coordinate holding width() and height() constant. More... | |
| def | setBottom |
| Sets the bottom edge of the rectangle to the given y-coordinate holding width() and height() constant. More... | |
| def | setWidth |
| Sets the rectangle's width holding left() constant. More... | |
| def | setHeight |
| Sets the rectangle's height holding top() constant. More... | |
| def | move |
| move the rectangle by dx, dy holding width() and height() constant. More... | |
The DRect class defines a rectangle in the plane using integer precision.
class DRect provides the following operations:
| DRect == rect | Comparison operator
|
| DRect != rect |
|
| def dectris.albula.DRect.DRect | ( | ) |
Default constructor.
| def dectris.albula.DRect.DRect | ( | left, | |
| top, | |||
| width, | |||
| height | |||
| ) |
Construct DRect with its upper left corner at (left,top) and width and height.
| left | Integer defining the left edge of the rectangle |
| top | Integer defining the top edge of the rectangle |
| width | Integer defining the width of the rectangle |
| height | Integer defining the height of the rectangle |
| def dectris.albula.DRect.DRect | ( | rect | ) |
Copy constructor.
| rect | Construct rectangle from an existing DRect rect. |
| def dectris.albula.DRect.height | ( | ) |
| def dectris.albula.DRect.left | ( | ) |
| def dectris.albula.DRect.move | ( | dx, | |
| dy | |||
| ) |
| def dectris.albula.DRect.setBottom | ( | y | ) |
| def dectris.albula.DRect.setHeight | ( | height | ) |
Sets the rectangle's height holding top() constant.
| height | height of the rectangle |
| def dectris.albula.DRect.setLeft | ( | x | ) |
| def dectris.albula.DRect.setRight | ( | x | ) |
| def dectris.albula.DRect.setTop | ( | y | ) |
| def dectris.albula.DRect.setWidth | ( | width | ) |
Sets the rectangle's width holding left() constant.
| width | width of the rectangle |
| def dectris.albula.DRect.top | ( | ) |
| def dectris.albula.DRect.width | ( | ) |