|
Maps SDK for C++ 1.0.0
|
Rectangle representation based on pixels. More...
Public Member Functions | |
| RectType (T left=0, T top=0, T right=0, T bottom=0) | |
| Constructor initializing a rectangle based on left, top, right, bottom sides, which are set to 0 if no values are passed in. | |
| RectType (XyType< T > pos, SizeType< T > size) | |
| Constructor initializing a rectangle based on a TXy (upper left x,y) position and a TSize size (width, height). | |
| bool | operator== (const RectType &item) const |
| Returns true if all 4 values of the passed in rectangle, left, top, width, height are equal to this rectangle. | |
| bool | operator!= (const RectType &item) const |
| Returns false if operator== returns true, and true if operator== returns false. | |
| T | right () const |
| Return the rightmost x coordinate (right side) of the rectangle. | |
| T | bottom () const |
| Return the lowest y coordinate (bottom side) of the rectangle. | |
| RectType & | inflate (T dx, T dy) |
| Expand viewport by adding 2*dx to its width and 2*dy to its height, while leaving its center unmoved. | |
| SizeType< T > | dimensions () const |
| Get dimensions representation based on pixels. | |
| XyType< T > | center () const |
| Returns rectangle center point. | |
| bool | isEmpty () const |
| Returns true if all 4 sides of the rectangle are set to zero. | |
| bool | pointInRectangle (const XyType< T > &pt) const |
| Check if XY position is inside rectangle. | |
Rectangle representation based on pixels.
|
inline |
Constructor initializing a rectangle based on left, top, right, bottom sides, which are set to 0 if no values are passed in.
|
inline |
Constructor initializing a rectangle based on a TXy (upper left x,y) position and a TSize size (width, height).
| pos | Horizontal zero-based screen position, in pixels, increasing from left to right. |
| size | Vertical zero-based screen position, in pixels, increasing from top to bottom. |
|
inline |
Return the lowest y coordinate (bottom side) of the rectangle.
|
inline |
Returns rectangle center point.
|
inline |
Get dimensions representation based on pixels.
|
inline |
Expand viewport by adding 2*dx to its width and 2*dy to its height, while leaving its center unmoved.
| dx | Horizontal offset to add to the left and right sides of the rectangle. |
| dy | Vertical offset to add to the top and bottom sides of the rectangle. |
|
inline |
Returns true if all 4 sides of the rectangle are set to zero.
|
inline |
Returns false if operator== returns true, and true if operator== returns false.
| item | Rectangle to compare to. |
|
inline |
Returns true if all 4 values of the passed in rectangle, left, top, width, height are equal to this rectangle.
| item | Rectangle to compare to. |
|
inline |
Check if XY position is inside rectangle.
| pt | XY position to check. |
|
inline |
Return the rightmost x coordinate (right side) of the rectangle.