minor coding style fix.

This commit is contained in:
jean-pierre charras 2022-07-31 18:35:37 +02:00
parent 578b13c041
commit 32551cf1ea
3 changed files with 13 additions and 13 deletions

View File

@ -46,7 +46,7 @@ static VECTOR2D toVector2D( const FT_Vector* aFreeTypeVector )
void OUTLINE_DECOMPOSER::newContour()
{
CONTOUR contour;
contour.orientation = FT_Outline_Get_Orientation( &m_outline );
contour.m_Orientation = FT_Outline_Get_Orientation( &m_outline );
m_contours->push_back( contour );
}
@ -54,8 +54,8 @@ void OUTLINE_DECOMPOSER::newContour()
void OUTLINE_DECOMPOSER::addContourPoint( const VECTOR2D& p )
{
// don't add repeated points
if( m_contours->back().points.empty() || m_contours->back().points.back() != p )
m_contours->back().points.push_back( p );
if( m_contours->back().m_Points.empty() || m_contours->back().m_Points.back() != p )
m_contours->back().m_Points.push_back( p );
}
@ -141,7 +141,7 @@ void OUTLINE_DECOMPOSER::OutlineToSegments( CONTOURS* aContours )
}
for( CONTOUR& c : *m_contours )
c.winding = winding( c.points );
c.m_Winding = winding( c.m_Points );
}

View File

@ -164,10 +164,10 @@ double OUTLINE_FONT::GetInterline( double aGlyphHeight, double aLineSpacing ) co
static bool contourIsFilled( const CONTOUR& c )
{
switch( c.orientation )
switch( c.m_Orientation )
{
case FT_ORIENTATION_TRUETYPE: return c.winding == 1;
case FT_ORIENTATION_POSTSCRIPT: return c.winding == -1;
case FT_ORIENTATION_TRUETYPE: return c.m_Winding == 1;
case FT_ORIENTATION_POSTSCRIPT: return c.m_Winding == -1;
default: return false;
}
}
@ -343,7 +343,7 @@ VECTOR2I OUTLINE_FONT::getTextAsGlyphs( BOX2I* aBBox, std::vector<std::unique_pt
for( CONTOUR& c : contours )
{
GLYPH_POINTS points = c.points;
GLYPH_POINTS points = c.m_Points;
SHAPE_LINE_CHAIN shape;
for( const VECTOR2D& v : points )

View File

@ -45,12 +45,12 @@ typedef std::vector<VECTOR2D> GLYPH_POINTS;
typedef std::vector<GLYPH_POINTS> GLYPH_POINTS_LIST;
typedef std::vector<BOX2D> GLYPH_BOUNDING_BOX_LIST;
typedef struct
struct CONTOUR
{
GLYPH_POINTS points;
int winding;
FT_Orientation orientation;
} CONTOUR;
GLYPH_POINTS m_Points;
int m_Winding = 0;
FT_Orientation m_Orientation;
};
typedef std::vector<CONTOUR> CONTOURS;