CartoType C++ API 8.8-7-gb35e4dc71
for Windows, Linux, Qt and other platforms supporting C++ development
|
#include <cartotype_geometry.h>
Public Types | |
using | contour_t = std::vector< point_t > |
Public Member Functions | |
GeneralGeometry () | |
GeneralGeometry (CartoTypeCore::CoordType aCoordType, bool aClosed=false) | |
GeneralGeometry (const MPath &aPath, CartoTypeCore::CoordType aCoordType, bool aClosed) | |
GeneralGeometry (const RectFP &aRect, CartoTypeCore::CoordType aCoordType) | |
GeneralGeometry (const point_t &aPoint, CartoTypeCore::CoordType aCoordType) | |
GeneralGeometry (const GeneralGeometry &aOther, size_t aContourIndex) | |
operator Outline () const | |
void | Clear () |
CartoTypeCore::CoordType | CoordType () const |
size_t | ContourCount () const |
const contour_t & | ContourByIndex (size_t aIndex) const |
bool | ContourIsOuter (size_t aIndex) const |
size_t | PointCount (size_t aContourIndex) const |
const point_t & | Point (size_t aContourIndex, size_t aPointIndex) const |
point_t & | Point (size_t aContourIndex, size_t aPointIndex) |
bool | IsEmpty () const |
bool | IsClosed () const |
void | SetClosed (bool aClosed) |
WritableCoordSet | CoordSet (size_t aContourIndex) |
CartoTypeCore::CoordSet | CoordSet (size_t aContourIndex) const |
RectFP | Bounds () const |
void | AppendPoint (const point_t &aPoint) |
void | AppendPoint (double aX, double aY) |
void | AppendPoint (double aX, double aY, PointType aPointType) |
void | BeginContour () |
void | Reverse () |
void | ConvertCoords (CartoTypeCore::CoordType aToCoordType, std::function< void(WritableCoordSet &aCoordSet)> aConvertFunction) |
A template class to hold geometry objects containing various types of point. The point type must be derived from or trivially convertible to OutlinePointFP.
using CartoTypeCore::GeneralGeometry< point_t >::contour_t = std::vector<point_t> |
The type for contours: an array of points.
|
inline |
Creates an empty open geometry object using map coordinates.
|
inlineexplicit |
Creates a geometry object with given coordinates and open/closed status.
|
inline |
Creates a geometry object by copying a path, using given coordinates and open/closed status. Ignores the open/closed status of individual contours in the path.
|
inline |
Creates a closed geometry object from an axis-aligned rectangle.
|
inline |
Creates an open geometry object containing a single point.
|
inline |
Creates a geometry object representing a single contour of another geometry object.
|
inline |
Appends a point to the current (last) contour in this geometry.
|
inline |
Appends a point to the last contour in this geometry.
|
inline |
Appends a point to the last contour in this geometry, specifying the point type.
|
inline |
Starts a new contour. Does nothing if the current (last) contour is empty.
|
inline |
Returns the bounds as an axis-aligned rectangle.
|
inline |
Deletes all points, leaving the geometry with a single empty contour and its original coordinate type and open/closed state.
|
inline |
Returns a contour selected by its index as a vector of points.
|
inline |
Returns the number of contours.
|
inline |
Returns true if a contour is an outer contour, defined as being anti-clockwise, that is, having a positive area when treating all points as on-curve. Useful only for closed geometries.
|
inline |
Converts the coordinates to aToCoordType using the function aConvertFunction. For internal use only.
|
inline |
Returns a writable coordinate set referring to this geometry.
|
inline |
Returns a coordinate set referring to this geometry.
|
inline |
Returns the coordinate type used for all points in this geometry.
|
inline |
Returns true if the geometry is closed (formed of closed paths).
|
inline |
Returns true if the geometry is empty.
|
inline |
Returns an Outline object containing this geometry.
|
inline |
Returns a non-const reference to a point identified by its contour index and point index.
|
inline |
Returns a point identified by its contour index and point index.
|
inline |
Returns the number of points in a given contour.
|
inline |
Reverses the order of the contours and the order of the points in each contour.
|
inline |
Sets the open/closed status.