CartoType C++ API 7.8.2, 2022-03-25
for Windows, Linux, Qt and other platforms supporting C++ development
|
#include <cartotype_base.h>
Public Member Functions | |
TRect () | |
TRect (int32_t aLeft, int32_t aTop, int32_t aRight, int32_t aBottom) | |
TRect (const TRectFP &aRectFP) noexcept | |
bool | operator== (const TRect &aRect) const |
bool | operator!= (const TRect &aRect) const |
int32_t | Left () const |
int32_t | Top () const |
int32_t | Right () const |
int32_t | Bottom () const |
bool | IsEmpty () const |
bool | IsMaximal () const |
int32_t | Width () const |
int32_t | Height () const |
TPoint | TopRight () const |
TPoint | BottomLeft () const |
TPoint | Center () const |
bool | Contains (const TPoint &aPoint) const |
bool | Contains (const TRect &aRect) const |
bool | IsOnEdge (const TPoint &aPoint) const noexcept |
bool | Intersects (const TRect &aRect) const noexcept |
bool | Intersects (const TPoint &aStart, const TPoint &aEnd, TPoint *aIntersectionStart=nullptr, TPoint *aIntersectionEnd=nullptr) const noexcept |
void | Intersection (const TRect &aRect) noexcept |
void | Combine (const TRect &aRect) noexcept |
void | Combine (const TPoint &aPoint) noexcept |
Public Attributes | |
TPoint | iTopLeft |
TPoint | iBottomRight |
A rectangle in two-dimensional space, aligned with the coordinate system and defined by its top-left and bottom-right corners.
|
inline |
Create an empty rectangle with both corners at the point (0,0).
|
inline |
Create a rectangle with the specified edges.
|
explicitnoexcept |
Construct an integer rectangle from a floating-point rectangle, clamping to the 32-bit range and rounding.
|
inline |
Return the bottom edge.
|
inline |
Return the bottom left corner.
|
inline |
Return the center.
|
noexcept |
Updates a rectangle so that it contains the specified point.
|
noexcept |
Set a rectangle to the smallest new rectangle that contains itself and aRect.
|
inline |
Return true if the rectangle contains the point, where containment is defined using half-open intervals: the rectangle includes points on its top and left edges but not its right and bottom edges.
|
inline |
Return true if the rectangle contains another rectangle.
|
inline |
Return the height.
|
noexcept |
Set a rectangle to its intersection with aRect.
|
noexcept |
Returns true if the rectangle intersects the line from aStart to aEnd. If there is an intersection, and if aIntersectionStart and aIntersectionEnd are non-null, returns the intersecting line.
|
noexcept |
Return true if the rectangle and aRect have an intersection. If both rectangles are non-empty, return true only if the intersection is non-empy.
|
inline |
Return true if the rectangle is empty, defined as having a width or height less than or equal to zero.
|
inline |
Return true if the rectangle is maximal, defined as having left and top of INT32_MIN and bottom and right of INT32_MAX.
|
noexcept |
Returns true if aPoint is exactly on an edge of a rectangle.
|
inline |
Return the left edge.
|
inline |
The inequality operator.
|
inline |
The equality operator.
|
inline |
Return the right edge.
|
inline |
Return the top edge.
|
inline |
Return the top right corner.
|
inline |
Return the width.
TPoint CartoType::TRect::iBottomRight |
The bottom right corner.
TPoint CartoType::TRect::iTopLeft |
The top left corner.