Rhino C++ API  7.21
Public Member Functions | List of all members
ON_OutlineAccumulator Class Reference

#include <opennurbs_font.h>

Public Member Functions

 ON_OutlineAccumulator ()=default
 
 ~ON_OutlineAccumulator ()=default
 
void AbandonCurrentFigure ()
 
const ON_OutlineFigurePoint ActiveFigureCurrentPoint () const
 
const ON_OutlineFigurePoint ActiveFigureStartPoint () const
 
bool AppendCubicBezier (ON_2fPoint cv1, ON_2fPoint cv2, ON_2fPoint cv3)
 
bool AppendLine (ON_2fPoint line_end_point)
 
bool AppendQuadraticBezier (ON_2fPoint cv1, ON_2fPoint cv2)
 
bool BeginFigure (ON_OutlineFigurePoint::Type point_type, ON_2fPoint figure_starting_point)
 
bool BeginGlyphOutline (ON__UINT32 font_units_per_em, ON_OutlineFigure::Type figure_type, ON_Outline *destination_outline)
 
void Clear ()
 
const bool CurrentFigureAccumulating () const
 
const ON_OutlineFigurePoint CurrentFigurePoint () const
 
unsigned int CurrentFigurePointCount () const
 
const ON_OutlineFigurePoint CurrentFigurePreviousPoint () const
 
const ON_OutlineFigurePoint CurrentFigureStartPoint () const
 
bool EndFigure (ON_OutlineFigurePoint::Type point_type)
 
bool EndOutline ()
 
bool EndOutline (bool bNegatePointY, ON_OutlineFigure::Orientation outer_orientation)
 
unsigned int ErrorCount () const
 
ON_OutlineFigure::Type FigureType () const
 
ON_OutlineHarvestOutline ()
 
bool IsFinalized () const
 
bool IsInitialized () const
 
bool IsInitializedOrFinalized () const
 
const ON_OutlineOutline () const
 
ON__UINT32 UnitsPerEM () const
 

Constructor & Destructor Documentation

◆ ON_OutlineAccumulator()

ON_OutlineAccumulator::ON_OutlineAccumulator ( )
default

◆ ~ON_OutlineAccumulator()

ON_OutlineAccumulator::~ON_OutlineAccumulator ( )
default

Member Function Documentation

◆ AbandonCurrentFigure()

void ON_OutlineAccumulator::AbandonCurrentFigure ( )

◆ ActiveFigureCurrentPoint()

const ON_OutlineFigurePoint ON_OutlineAccumulator::ActiveFigureCurrentPoint ( ) const

Expert user tool for getting the curent point of the figure being accumulated.

◆ ActiveFigureStartPoint()

const ON_OutlineFigurePoint ON_OutlineAccumulator::ActiveFigureStartPoint ( ) const

Expert user tool for getting the start point of the figure currently being accumulated.

◆ AppendCubicBezier()

bool ON_OutlineAccumulator::AppendCubicBezier ( ON_2fPoint  cv1,
ON_2fPoint  cv2,
ON_2fPoint  cv3 
)

Description: Appends a cubic (degree = 3, order = 4) bezier to the current figure. The cubic bezier begins at the current_point and ends at cv3. The cubic bezier has four control points (current point, cv1, cv2, cv3). Parameters: cv1 - [in] cv2 - [in] cv3 - [in] end of the cubic bezier.

◆ AppendLine()

bool ON_OutlineAccumulator::AppendLine ( ON_2fPoint  line_end_point)

Description: Appends a line segment to the current figure. The line segment begins at the current_point and ends at line_end_point. Parameters: line_end_point - [in]

◆ AppendQuadraticBezier()

bool ON_OutlineAccumulator::AppendQuadraticBezier ( ON_2fPoint  cv1,
ON_2fPoint  cv2 
)

Description: Appends a quadratic (degree = 2, order = 3) bezier to the current figure. The quadratic bezier begins at the current_point and ends at cv2. The quadratic bezier has three control points (current point, cv1, cv2, cv3). Parameters: cv1 - [in] cv2 - [in] end of the quadratic bezier.

◆ BeginFigure()

bool ON_OutlineAccumulator::BeginFigure ( ON_OutlineFigurePoint::Type  point_type,
ON_2fPoint  figure_starting_point 
)

Tools for adding figures to the outline Description: Begins a figure. A glyph outline has zero or more figures. Parameters: point_type - [in] One of ON_OutlineFigurePoint::Type::BeginFigureUnknown ON_OutlineFigurePoint::Type::BeginFigureFilled ON_OutlineFigurePoint::Type::BeginFigureHollow ON_OutlineFigurePoint::Type::BeginFigureOpen ON_OutlineFigurePoint::Type::BeginFigureClosed figure_starting_point - [in] First point in the figure.

◆ BeginGlyphOutline()

bool ON_OutlineAccumulator::BeginGlyphOutline ( ON__UINT32  font_units_per_em,
ON_OutlineFigure::Type  figure_type,
ON_Outline destination_outline 
)

Parameters: font_units_per_em - [in] This is the height and width of the square font design grid. In TrueType fonts, font_units_per_em is often a power of two and generally 1024 or 2048. In OpenType fonts, font_units_per_em is often 1000. In PostScript fonts, font_units_per_em is often 1000. figure_type - [in] True if the glyphs are single stroke and open glyphs should not be closed. coordinate_type - [in] ON_OutlineAccumulator::Coordinate::Integer The points passed to the figure drawing methods will be ON_2iPoint values. The resulting outline will contain ON_2iPoint values. ON_OutlineAccumulator::Coordinate::Float The points passed to the figure drawing methods will be ON_2fPoint values. The resulting outline will contain ON_2fPoint values. ON_OutlineAccumulator::Coordinate::Float The points passed to the figure drawing methods will be ON_2fPoint values that should be rounded to the nearest integer. The resulting outline will contain ON_2iPoint values. bAccumulatePoints - [in] True if the points should be accumulated in the m_outline_points[] array. False if the points are not accumulated. In all cases, the outline bounding box is calculated. Remarks: Typically both the width and the height of the 'M' glyph in the font are less than font_units_per_em.

◆ Clear()

void ON_OutlineAccumulator::Clear ( )

◆ CurrentFigureAccumulating()

const bool ON_OutlineAccumulator::CurrentFigureAccumulating ( ) const

◆ CurrentFigurePoint()

const ON_OutlineFigurePoint ON_OutlineAccumulator::CurrentFigurePoint ( ) const

◆ CurrentFigurePointCount()

unsigned int ON_OutlineAccumulator::CurrentFigurePointCount ( ) const

Returns: Number of points in the current figure.

◆ CurrentFigurePreviousPoint()

const ON_OutlineFigurePoint ON_OutlineAccumulator::CurrentFigurePreviousPoint ( ) const

◆ CurrentFigureStartPoint()

const ON_OutlineFigurePoint ON_OutlineAccumulator::CurrentFigureStartPoint ( ) const

◆ EndFigure()

bool ON_OutlineAccumulator::EndFigure ( ON_OutlineFigurePoint::Type  point_type)

Description: Terminates a figure that was started with the previous call to BeginFigure2i() or BeginFigure2f(). The locations of the figure's starting and final points are always identical. The point_type parameter is used to indicate if a line segment from the starting point to the final point is included in the figure. Parameters: point_type - [in] One of ON_OutlineFigurePoint::Type::EndFigureUnknown If FigureType() is SingleStroke, this value is treated as if it were ON_OutlineFigurePoint::Type::EndFigureOpen. Otherwise, the final point in the figure will have this type. ON_OutlineFigurePoint::Type::EndFigureClosed If FigureType() is SingleStroke is true, this value is treated as if it were ON_OutlineFigurePoint::Type::EndFigureOpen. Otherwise, the final point in the figure will have this type. ON_OutlineFigurePoint::Type::EndFigureOpen The final point in the figure will have this type.

◆ EndOutline() [1/2]

bool ON_OutlineAccumulator::EndOutline ( )

Returns: EndOutline(false,ON_Outline::DefaultOuterOrientation);

◆ EndOutline() [2/2]

bool ON_OutlineAccumulator::EndOutline ( bool  bNegatePointY,
ON_OutlineFigure::Orientation  outer_orientation 
)

Parameters: bNegatePointY - [in] If true, the y coordinate of the accumulated points is negated. This is done before any orientation adjustments are performed. outer_orientation - [in] If outer_orientation is ON_OutlineFigure::Orientation::Clockwise, or ON_OutlineFigure::Orientation::CounterClockwise, then the figures are oriented so that outer boundaries have the specified orientation. Otherwise this parameter is ignored.

◆ ErrorCount()

unsigned int ON_OutlineAccumulator::ErrorCount ( ) const

Returns: Number of input errors that have occured. Remarks: When an error occurs, the current figure is terminated.

◆ FigureType()

ON_OutlineFigure::Type ON_OutlineAccumulator::FigureType ( ) const

◆ HarvestOutline()

ON_Outline* ON_OutlineAccumulator::HarvestOutline ( )

◆ IsFinalized()

bool ON_OutlineAccumulator::IsFinalized ( ) const

◆ IsInitialized()

bool ON_OutlineAccumulator::IsInitialized ( ) const

◆ IsInitializedOrFinalized()

bool ON_OutlineAccumulator::IsInitializedOrFinalized ( ) const

◆ Outline()

const ON_Outline& ON_OutlineAccumulator::Outline ( ) const

◆ UnitsPerEM()

ON__UINT32 ON_OutlineAccumulator::UnitsPerEM ( ) const

Returns: Outline design units per em.