From 32551cf1ea342f7c4205a741b75f4d2964f94d93 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sun, 31 Jul 2022 18:35:37 +0200 Subject: [PATCH] minor coding style fix. --- common/font/outline_decomposer.cpp | 8 ++++---- common/font/outline_font.cpp | 8 ++++---- include/font/outline_decomposer.h | 10 +++++----- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/common/font/outline_decomposer.cpp b/common/font/outline_decomposer.cpp index adcff67df4..00e7a18516 100644 --- a/common/font/outline_decomposer.cpp +++ b/common/font/outline_decomposer.cpp @@ -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 ); } diff --git a/common/font/outline_font.cpp b/common/font/outline_font.cpp index edc89ca8e6..c9baaf35b9 100644 --- a/common/font/outline_font.cpp +++ b/common/font/outline_font.cpp @@ -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 GLYPH_POINTS; typedef std::vector GLYPH_POINTS_LIST; typedef std::vector 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 CONTOURS;