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 | |
TRectFP () | |
TRectFP (double aMinX, double aMinY, double aMaxX, double aMaxY) | |
TRectFP (const TRect &aRect) | |
bool | operator== (const TRectFP &aRect) const |
bool | operator!= (const TRectFP &aRect) const |
bool | operator< (const TRectFP &aRect) const |
double | Left () const noexcept |
double | Top () const noexcept |
double | Right () const noexcept |
double | Bottom () const noexcept |
bool | IsEmpty () const noexcept |
double | Width () const noexcept |
double | Height () const noexcept |
TPointFP | TopRight () const noexcept |
TPointFP | BottomLeft () const noexcept |
TPointFP | Center () const noexcept |
bool | Contains (const TPointFP &aPoint) const noexcept |
bool | Contains (const TRectFP &aRect) const noexcept |
void | Combine (const TPointFP &aPoint) |
void | Combine (const TRectFP &aRect) |
void | Intersection (const TRectFP &aRect) |
bool | Intersects (const TRectFP &aRect) const noexcept |
bool | Intersects (const TPointFP &aStart, const TPointFP &aEnd, TPointFP *aIntersectionStart=nullptr, TPointFP *aIntersectionEnd=nullptr) const noexcept |
TRect | Rounded () const noexcept |
Public Attributes | |
TPointFP | iTopLeft |
TPointFP | iBottomRight |
A floating-point rectangle in two-dimensional space, aligned with the coordinate system and defined by its top-left (minimum coords) and bottom-right (maximum coords) corners.
The terms top-left and bottom-right are misleading but are retained for compatibility with TRect and with existing CartoType practice.
|
inline |
Create an empty rectangle with both corners at the point (0,0).
|
inline |
Create a rectangle with the specified edges.
|
inline |
Create a rectangle from an integer rectangle.
|
inlinenoexcept |
Return the bottom edge.
|
inlinenoexcept |
Return the bottom left corner.
|
inlinenoexcept |
Return the center.
|
inline |
Update a rectangle such that it contains the specified point.
|
inline |
Set a rectangle to the smallest new rectangle that contains itself and aRect.
|
inlinenoexcept |
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.
|
inlinenoexcept |
Return true if the rectangle contains another rectangle.
|
inlinenoexcept |
Return the height.
|
inline |
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.
|
inlinenoexcept |
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.
|
inlinenoexcept |
Return true if the rectangle is empty, defined as having a width or height less than or equal to zero.
|
inlinenoexcept |
Return the left edge.
|
inline |
The inequality operator.
|
inline |
The less-than operator.
|
inline |
The equality operator.
|
inlinenoexcept |
Return the right edge.
|
noexcept |
Returns a rectangle with integer coordinates, created by rounding the coordinates of this rectangle.
|
inlinenoexcept |
Return the top edge.
|
inlinenoexcept |
Return the top right corner.
|
inlinenoexcept |
Return the width.
TPointFP CartoType::TRectFP::iBottomRight |
The bottom right corner.
TPointFP CartoType::TRectFP::iTopLeft |
The top left corner.