#include <opennurbs_font.h>
|
enum | Orientation : ON__UINT8 {
Orientation::Unset = 0,
Orientation::CounterClockwise = 1,
Orientation::Clockwise = 2,
Orientation::NotOriented = 3,
Orientation::Error = 15
} |
|
enum | Type : ON__UINT8 {
Type::Unset = 0,
Type::Unknown = 1,
Type::SingleStroke = 2,
Type::DoubleStroke = 3,
Type::Perimeter = 4,
Type::NotPerimeter = 5,
Type::Mixed = 7
} |
| ON_OutlineFigure::Type identifies the structure of the figure. More...
|
|
|
| ON_OutlineFigure ()=default |
|
| ON_OutlineFigure (const ON_OutlineFigure &)=default |
|
| ~ON_OutlineFigure ()=default |
|
double | AreaEstimate () const |
|
const ON_BoundingBox | BoundingBox () const |
|
double | BoxArea () const |
|
double | DefaultPolylineTolerance () const |
|
ON__UINT16 | FigureIndex () const |
|
ON_OutlineFigure::Orientation | FigureOrientation () const |
|
ON_OutlineFigure::Type | FigureType () const |
|
unsigned int | GetFigureCurves (double scale, bool b3d, ON_SimpleArray< ON_Curve * > &figure_curves) const |
|
unsigned int | GetFigureCurves (double scale, bool b3d, ON_SimpleArray< ON_NurbsCurve * > &figure_curves) const |
|
unsigned int | GetPolyline (double tolerance, ON_SimpleArray< ON_2dPoint > &points) const |
|
unsigned int | GetPolyline (double tolerance, ON_SimpleArray< ON_2fPoint > &points) const |
|
unsigned int | GetPolyline (double tolerance, ON_SimpleArray< ON_3dPoint > &points) const |
|
unsigned int | GetPolyline (double tolerance, ON_SimpleArray< ON_3fPoint > &points) const |
|
unsigned int | GetPolyline (double tolerance, void(*PointCallbackFunc)(float x, float y, void *), void *context) const |
|
unsigned | GetUpToFourPointsOnFigure (ON_2fPoint p[4]) const |
|
bool | IsInsideOf (const ON_OutlineFigure *outer_figure, bool bPerformExtraChecking) const |
|
bool | IsValidFigure (bool bLogErrors) const |
|
bool | NegateY () |
|
ON_OutlineFigure & | operator= (const ON_OutlineFigure &)=default |
|
bool | ReverseFigure () |
|
ON__UINT32 | UnitsPerEM () const |
|
int | WindingNumber (ON_2fPoint winding_point) const |
|
◆ Orientation
Enumerator |
---|
Unset | |
CounterClockwise | |
Clockwise | |
NotOriented | |
Error | An error occurred in orientation calculations.
|
◆ Type
ON_OutlineFigure::Type identifies the structure of the figure.
Enumerator |
---|
Unset | summary> This value should be used for parameters where the type is has not been explicitly to determined. /summary> summary> Unknown indicates an attempt was made to determine the type, that attempt failed, and further attempts will just waste time. It is best to pass Unset when calling functions and you have not calculated the type. /summary>
|
Unknown | summary> Single stroke figures can be open or closed and are not designed to be filled. Single stroke fonts like RhSS and MecSoft have these types of figures. /summary>
|
SingleStroke | summary> Double stroke figures are closed and contain no area. They consist of a single stroke path follow by the reverse of the single stroke path. The CamBam Stick fonts have these types of figures. A double stroke figure can be converted to a single stroke figure by removing the reversed overlapping portion. /summary>
|
DoubleStroke | summary> The outline figures are perimeters around non-empty areas that are typically filled or hollow depending on their orientation. The majority of TrueType, OpenType, and PostScript fonts have these types of figures. /summary>
|
Perimeter | summary> The outline figure is not a perimeter around a non-empty area. /summary>
|
NotPerimeter | summary> Used in a context where there are multiple figures with different types. /summary>
|
Mixed | |
◆ ON_OutlineFigure() [1/2]
ON_OutlineFigure::ON_OutlineFigure |
( |
| ) |
|
|
default |
◆ ~ON_OutlineFigure()
ON_OutlineFigure::~ON_OutlineFigure |
( |
| ) |
|
|
default |
◆ ON_OutlineFigure() [2/2]
◆ AreaEstimate()
double ON_OutlineFigure::AreaEstimate |
( |
| ) |
const |
Returns: Signed area estimate. For simple closed curves, a positive area indicates a counter-clockwise orientation.
◆ BoundingBox()
◆ BoxArea()
double ON_OutlineFigure::BoxArea |
( |
| ) |
const |
Returns: Bounding box area >= 0
◆ DefaultPolylineTolerance() [1/2]
double ON_OutlineFigure::DefaultPolylineTolerance |
( |
| ) |
const |
◆ DefaultPolylineTolerance() [2/2]
static double ON_OutlineFigure::DefaultPolylineTolerance |
( |
double |
units_per_em | ) |
|
|
static |
◆ FigureIndex()
ON__UINT16 ON_OutlineFigure::FigureIndex |
( |
| ) |
const |
◆ FigureOrientation()
Returns: Figure orientation.
◆ FigureType()
◆ FigureTypeFromField10Description()
Description: Opennurbs searches the description saved in field 10 of the name table for the strings "Engraving - single stroke" / "Engraving - double stroke" / "Engraving" to identify fonts that are designed for engraving (and which tend to render poorly when used to display text devices like screens, monitors, and printers). The SLF (single line fonts) are examples of fonts that have Engraving in field 10. Parameters: field_10_description - [in] Field 10 string from the font name table. Returns: If the description contains "single stroke", returns ON_OutlineFigure::Type::SingleStroke. If the description contains "double stroke", returns ON_OutlineFigure::Type::DoubleStroke. Otherwise returns ON_OutlineFigure::Type::Unset;
◆ FigureTypeFromFontName()
◆ GetFigureCurves() [1/2]
unsigned int ON_OutlineFigure::GetFigureCurves |
( |
double |
scale, |
|
|
bool |
b3d, |
|
|
ON_SimpleArray< ON_Curve * > & |
figure_curves |
|
) |
| const |
◆ GetFigureCurves() [2/2]
◆ GetPolyline() [1/5]
Description: Get a polyline approximation of the figure. Parameters: tolerance - [in] If tolerance > 0, that value is used. Otherwise UnitsPerEM() / 256.0 is used, which gives course but recognizable decent results for glyph outlines. points - [out] polyline points are appended to this array. Returns: Number of points appended to oiunts[]
◆ GetPolyline() [2/5]
Description: Get a polyline approximation of the figure. Parameters: tolerance - [in] If tolerance > 0, that value is used. Otherwise UnitsPerEM() / 256.0 is used, which gives course but recognizable decent results for glyph outlines. points - [out] polyline points are appended to this array. Returns: Number of points appended to oiunts[]
◆ GetPolyline() [3/5]
Description: Get a polyline approximation of the figure. Parameters: tolerance - [in] If tolerance > 0, that value is used. Otherwise UnitsPerEM() / 256.0 is used, which gives course but recognizable decent results for glyph outlines. points - [out] polyline points are appended to this array. Returns: Number of points appended to oiunts[]
◆ GetPolyline() [4/5]
Description: Get a polyline approximation of the figure. Parameters: tolerance - [in] If tolerance > 0, that value is used. Otherwise UnitsPerEM() / 256.0 is used, which gives course but recognizable decent results for glyph outlines. points - [out] polyline points are appended to this array. Returns: Number of points appended to oiunts[]
◆ GetPolyline() [5/5]
unsigned int ON_OutlineFigure::GetPolyline |
( |
double |
tolerance, |
|
|
void(*)(float x, float y, void *) |
PointCallbackFunc, |
|
|
void * |
context |
|
) |
| const |
Description: Get a polyline approximation of the figure.
Parameters: tolerance - [in] If tolerance > 0, that value is used. Otherwise UnitsPerEM() / 256.0 is used, which gives course but recognizable decent results for glyph outlines.
PointCallbackFunc - [in] called once for each point in the polyline context - [in] third parameter to PointCallbackFunc() Returns: Number of points passed to PointCallbackFunc()
◆ GetUpToFourPointsOnFigure()
unsigned ON_OutlineFigure::GetUpToFourPointsOnFigure |
( |
ON_2fPoint |
p[4] | ) |
const |
Description: Get up to four distinct points on the figure. These are useful for winding number tests when sorting figures. Parameters: p - [out] the returned points will be on the figure (not bezier interior control points). Returns: Number of points.
◆ IsInsideOf()
bool ON_OutlineFigure::IsInsideOf |
( |
const ON_OutlineFigure * |
outer_figure, |
|
|
bool |
bPerformExtraChecking |
|
) |
| const |
Description: Determines if this ON_OutlineFigure is inside of outer_figure. Parameters: outer_figure - [in] When bPerformExtraChecking is false, outer_figure->FigureOrientation() should be set to what you plan on using when rendering the glyph. The orientation of outer_figure can be either clockwise or counterclockwise and, in the context of the entire glyph, outer_figure can be an inner or outer boundary. For example, the registered trademark glyph (UNICODE U+00AE) is an example where four nested figures with alternating orientations are common. bPerformExtraChecking - [in] In general, when sorting glyph outlines as they come froma font file, set outer_figure->FigureOrientation() to what will be used to render the glyph and pass false for bPerformExtraChecking. Details: In the case when bounding boxes and estimated areas and spot checks of winding numbers all indicate that this is inside of other_f, an additional time consuming intersection check is performed when this->FigureOrientation() == other_f->FigureOrientation(). When this->FigureOrientation() and other_f->FigureOrientation() are opposited, the additional intersection check is skipped unless bPerformExtraChecking is true. Returns: True if it is very likely that this is not empty and is inside of other_f. False otherwise Remarks:
◆ IsValidFigure()
bool ON_OutlineFigure::IsValidFigure |
( |
bool |
bLogErrors | ) |
const |
◆ NegateY()
bool ON_OutlineFigure::NegateY |
( |
| ) |
|
◆ operator=()
◆ OrientationToWideString()
◆ ReverseFigure()
bool ON_OutlineFigure::ReverseFigure |
( |
| ) |
|
◆ UnitsPerEM()
◆ WindingNumber()
int ON_OutlineFigure::WindingNumber |
( |
ON_2fPoint |
winding_point | ) |
const |
◆ ON_Outline
◆ m_figure_index
◆ m_points
◆ Unset