|
|
| DsFRect () |
| | Creates a DsRect object initialized to (0, 0, 0, 0).
|
| |
| | DsFRect (const DsRect &r) |
| | Creates a DsFRect object from a DsRect object.
|
| |
| | DsFRect (float x, float y, float w, float h) |
| | Creates a DsPoint object initialized to (x, y, w, h).
|
| |
| | DsFRect (const DsFPoint &pos, const DsFSize &size) |
| | Creates a DsPoint object initialized to (x, y, w, h).
|
| |
| DsFPoint | getPosition (void) const |
| | Gets the position of the rectangle (top left corner).
|
| |
| void | setPosition (const DsFPoint &pos) |
| | Sets the position of the rectangle (top left corner).
|
| |
| DsFSize | getSize (void) const |
| | Gets the size of the rectangle.
|
| |
| void | setSize (const DsFSize &size) |
| | Sets the size of the rectangle.
|
| |
| DsFPoint | getCenter (void) const |
| | Gets the position of the center of the rectangle.
|
| |
| float | area (void) const |
| | Gets the area of rectangle.
|
| |
| bool | contains (const DsFPoint &p) const |
| | Does the rectangle contain a specific point?
|
| |
| DsFRect | intersect (const DsFRect &r) const |
| | Gets the intersection rectangle of the current DsRect object with another rectangle.
|
| |
| DsFRect | move (const DsFPoint &offset) override final |
| | Moves the current DsRect object by a specified 2D offset.
|
| |
| DsFRect & | cat (const DsFRect &r) |
| | Concatenates the current DsRect object with another rectangle.
|
| |
| DsFRect | erode (float size) const |
| | Erodes the current DsRect object by a specific size.
|
| |
| DsFRect | erodeHorizontal (float size) const |
| | Erodes the current DsRect object by a specific size in the horizontal direction.
|
| |
| DsFRect | erodeLeft (float size) const |
| | Erodes the current DsRect object by a specific size on the left side only.
|
| |
| DsFRect | erodeRight (float size) const |
| | Erodes the current DsRect object by a specific size on the right side only.
|
| |
| DsFRect | erodeVertical (float size) const |
| | Erodes the current DsRect object by a specific size in the vertical direction only.
|
| |
| DsFRect | erodeTop (float size) const |
| | Erodes the current DsRect object by a specific size on the top side only.
|
| |
| DsFRect | erodeBottom (float size) const |
| | Erodes the current DsRect object by a specific size on the bottom side only.
|
| |
| DsFRect | dilate (float size) |
| | Dilates the current DsRect object by a specific size.
|
| |
| DsFRect | dilateTop (float size) |
| | Dilates the current DsRect object by a specific size on the top side only.
|
| |
| DsFRect | dilateBotom (float size) |
| | Dilates the current DsRect object by a specific size on the bottom side only.
|
| |
| DsFRect | dilateLeft (float size) |
| | Dilates the current DsRect object by a specific size on the left side only.
|
| |
| DsFRect | dilateRight (float size) |
| | Dilates the current DsRect object by a specific size on the right side only.
|
| |
| DsFRect | getLeftRegion (float split_line) |
| | Splits the rectangle in two using a vertical line and returns the left rectangle.
|
| |
| DsFRect | getRightRegion (float split_line) |
| | Splits the rectangle in two using a vertical line and returns the right rectangle.
|
| |
| DsFRect | getTopRegion (float split_line) |
| | Splits the rectangle in two using a horizontal line and returns the top rectangle.
|
| |
| DsFRect | getBottomRegion (float split_line) |
| | Splits the rectangle in two using a horizontal line and returns the bottom rectangle.
|
| |
| DsFRect & | align (const DsFRect &boundary, const DsAlignment &alignment, const DsFPoint &offset=DsFPoint()) |
| | Changes the X and Y components of the current rectangle to align it in the specified parent rectangle.
|
| |
| | operator DsRect () const |
| | Conversion operator to DsPoint.
|
| |
| pair< float, float > | getVerticalRange (float x) const override final |
| |
| pair< float, float > | getHorizontalRange (float y) const override final |
| |
| DsFRect | getRect (void) const override final |
| |
| void | rotate (const DsSurface &surface) override final |
| |
DsFRect is a class that represents a 2D rectangle (X, Y, W, H) using floating point coordiantes and size.