CartoType C++ API 8.8-7-gb35e4dc71
for Windows, Linux, Qt and other platforms supporting C++ development
|
#include <cartotype_base.h>
Public Member Functions | |
RectFP () | |
RectFP (double aMinX, double aMinY, double aMaxX, double aMaxY) | |
RectFP (const Rect &aRect) | |
RectFP (InputStream &aInput) | |
void | Write (OutputStream &aOutput) const |
bool | operator== (const RectFP &aRect) const |
bool | operator!= (const RectFP &aRect) const |
bool | operator< (const RectFP &aRect) const |
double | MinX () const noexcept |
double | MinY () const noexcept |
double | MaxX () const noexcept |
double | MaxY () const noexcept |
bool | IsEmpty () const noexcept |
double | Width () const noexcept |
double | Height () const noexcept |
PointFP | MaxMin () const noexcept |
PointFP | MinMax () const noexcept |
PointFP | Center () const noexcept |
bool | Contains (const PointFP &aPoint) const noexcept |
bool | Contains (const RectFP &aRect) const noexcept |
void | Combine (const PointFP &aPoint) |
void | Combine (const RectFP &aRect) |
void | Intersection (const RectFP &aRect) |
bool | Intersects (const RectFP &aRect) const noexcept |
bool | Intersects (const PointFP &aStart, const PointFP &aEnd, PointFP *aIntersectionStart=nullptr, PointFP *aIntersectionEnd=nullptr) const noexcept |
Rect | Rounded () const noexcept |
RectFP | Expanded (double aExpansion) const noexcept |
Public Attributes | |
PointFP | Min |
PointFP | Max |
A floating-point rectangle in two-dimensional space, aligned with the coordinate system and defined by opposite corners with minimum and maximum coordinates.
|
inline |
Creates an empty rectangle with both corners at the point (0,0).
|
inline |
Creates a rectangle with the specified edges.
|
inline |
Creates a rectangle from an integer rectangle.
|
explicit |
Creates a RectFP by deserializing it from an input stream.
|
inlinenoexcept |
Return the center.
|
inline |
Updates a rectangle such that it contains the specified point.
|
inline |
Sets a rectangle to the smallest new rectangle that contains itself and aRect.
|
inlinenoexcept |
Returns true if the rectangle contains the point, where containment is defined using half-open intervals: the rectangle includes points on its minimum X and Y edges but not its maximum X and Y edges.
|
inlinenoexcept |
Returns true if the rectangle contains another rectangle.
|
inlinenoexcept |
Returns a new rectangle expanded in all directions by aExpansion.
|
inlinenoexcept |
Return the height.
|
inline |
Sets 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 |
Returns true if the rectangle and aRect have an intersection. If both rectangles are non-empty, returns 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 |
Returns the point (Max.X,Min.Y).
|
inlinenoexcept |
Returns the minimum Y coordinate.
|
inlinenoexcept |
Returns the maximum Y coordinate.
|
inlinenoexcept |
Returns the point (Min.X,Max.Y).
|
inlinenoexcept |
Returns the minimum X coordinate.
|
inlinenoexcept |
Returns the maximum X coordinate.
|
inline |
The inequality operator.
|
inline |
The less-than operator.
|
inline |
The equality operator.
|
noexcept |
Returns a rectangle with integer coordinates, created by rounding the coordinates of this rectangle.
|
inlinenoexcept |
Return the width.
void CartoTypeCore::RectFP::Write | ( | OutputStream & | aOutput | ) | const |
Serializes a RectFP to an output stream.
PointFP CartoTypeCore::RectFP::Max |
The corner with maximum X and Y coordinates.
PointFP CartoTypeCore::RectFP::Min |
The corner with minimum X and Y coordinates.