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