diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-12-05 12:47:37 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-12-07 10:34:17 +0000 |
commit | a08cb3b52ea4a071ce8eb5a1786ea45fd211ab78 (patch) | |
tree | 0667c60e438b660211a3df83c1b411e055b1de61 | |
parent | crashtesting: "use" loop in moz325427-1.svg (diff) | |
download | core-a08cb3b52ea4a071ce8eb5a1786ea45fd211ab78.tar.gz core-a08cb3b52ea4a071ce8eb5a1786ea45fd211ab78.zip |
convert PolyFlags to scoped enum
and remove the XPolyFlags enum, which has the same values and was being
converted to PolyFlags anyhow
Change-Id: Iaead84933c79a7603698a4e50257dd944df89c41
Reviewed-on: https://gerrit.libreoffice.org/31627
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
50 files changed, 308 insertions, 307 deletions
diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx index ea67fa1f1ecb..90c399b15e3f 100644 --- a/canvas/source/vcl/canvashelper.cxx +++ b/canvas/source/vcl/canvashelper.cxx @@ -261,13 +261,13 @@ namespace vclcanvas ::tools::Polygon aPoly(4); aPoly.SetPoint( rStartPoint, 0 ); - aPoly.SetFlags( 0, POLY_NORMAL ); + aPoly.SetFlags( 0, PolyFlags::Normal ); aPoly.SetPoint( rCtrlPoint1, 1 ); - aPoly.SetFlags( 1, POLY_CONTROL ); + aPoly.SetFlags( 1, PolyFlags::Control ); aPoly.SetPoint( rCtrlPoint2, 2 ); - aPoly.SetFlags( 2, POLY_CONTROL ); + aPoly.SetFlags( 2, PolyFlags::Control ); aPoly.SetPoint( rEndPoint, 3 ); - aPoly.SetFlags( 3, POLY_NORMAL ); + aPoly.SetFlags( 3, PolyFlags::Normal ); // TODO(F2): alpha mpOutDev->getOutDev().DrawPolygon( aPoly ); diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx index f5d4dba7a09f..ef3bbf5118bf 100644 --- a/filter/source/flash/swfwriter1.cxx +++ b/filter/source/flash/swfwriter1.cxx @@ -127,10 +127,10 @@ void Writer::Impl_addPolygon( BitStream& rBits, const tools::Polygon& rPoly, boo PolyFlags P1( rPoly.GetFlags( i ) ); PolyFlags P4( rPoly.GetFlags( i + 3 ) ); - if( ( POLY_NORMAL == P1 || POLY_SMOOTH == P1 || POLY_SYMMTR == P1 ) && - ( POLY_CONTROL == rPoly.GetFlags( i + 1 ) ) && - ( POLY_CONTROL == rPoly.GetFlags( i + 2 ) ) && - ( POLY_NORMAL == P4 || POLY_SMOOTH == P4 || POLY_SYMMTR == P4 ) ) + if( ( PolyFlags::Normal == P1 || PolyFlags::Smooth == P1 || PolyFlags::Symmetric == P1 ) && + ( PolyFlags::Control == rPoly.GetFlags( i + 1 ) ) && + ( PolyFlags::Control == rPoly.GetFlags( i + 2 ) ) && + ( PolyFlags::Normal == P4 || PolyFlags::Smooth == P4 || PolyFlags::Symmetric == P4 ) ) { Impl_quadBezierApprox( rBits, aLastPoint, d*d, rPoly.GetPoint( i ).X(), rPoly.GetPoint( i ).Y(), diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx index 4b79fbc67f41..46a5ebf28b3b 100644 --- a/filter/source/graphicfilter/eps/eps.cxx +++ b/filter/source/graphicfilter/eps/eps.cxx @@ -718,9 +718,9 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) for(sal_uInt16 a(0); a + 1 < nPoints; a++) { if(bCurve - && POLY_NORMAL != aPoly.GetFlags(a + 1) + && PolyFlags::Normal != aPoly.GetFlags(a + 1) && a + 2 < nPoints - && POLY_NORMAL != aPoly.GetFlags(a + 2) + && PolyFlags::Normal != aPoly.GetFlags(a + 2) && a + 3 < nPoints) { const tools::Polygon aSnippet(4, @@ -1503,10 +1503,10 @@ void PSWriter::ImplAddPath( const tools::Polygon & rPolygon ) ImplMoveTo( rPolygon.GetPoint( 0 ) ); while ( i < nPointCount ) { - if ( ( rPolygon.GetFlags( i ) == POLY_CONTROL ) + if ( ( rPolygon.GetFlags( i ) == PolyFlags::Control ) && ( ( i + 2 ) < nPointCount ) - && ( rPolygon.GetFlags( i + 1 ) == POLY_CONTROL ) - && ( rPolygon.GetFlags( i + 2 ) != POLY_CONTROL ) ) + && ( rPolygon.GetFlags( i + 1 ) == PolyFlags::Control ) + && ( rPolygon.GetFlags( i + 2 ) != PolyFlags::Control ) ) { ImplCurveTo( rPolygon[ i ], rPolygon[ i + 1 ], rPolygon[ i + 2 ], PS_WRAP ); i += 3; @@ -1591,10 +1591,10 @@ void PSWriter::ImplPolyLine( const tools::Polygon & rPoly ) i = 1; while ( i < nPointCount ) { - if ( ( rPoly.GetFlags( i ) == POLY_CONTROL ) + if ( ( rPoly.GetFlags( i ) == PolyFlags::Control ) && ( ( i + 2 ) < nPointCount ) - && ( rPoly.GetFlags( i + 1 ) == POLY_CONTROL ) - && ( rPoly.GetFlags( i + 2 ) != POLY_CONTROL ) ) + && ( rPoly.GetFlags( i + 1 ) == PolyFlags::Control ) + && ( rPoly.GetFlags( i + 2 ) != PolyFlags::Control ) ) { ImplCurveTo( rPoly[ i ], rPoly[ i + 1 ], rPoly[ i + 2 ], PS_WRAP ); i += 3; diff --git a/filter/source/graphicfilter/icgm/actimpr.cxx b/filter/source/graphicfilter/icgm/actimpr.cxx index 1ad3c3089f5f..0a63a8ea15dc 100644 --- a/filter/source/graphicfilter/icgm/actimpr.cxx +++ b/filter/source/graphicfilter/icgm/actimpr.cxx @@ -61,7 +61,7 @@ CGMImpressOutAct::CGMImpressOutAct( CGM& rCGM, const uno::Reference< frame::XMod mnGroupActCount = mnGroupLevel = 0; mpGroupLevel = new sal_uInt32[CGM_OUTACT_MAX_GROUP_LEVEL] (); mpPoints = reinterpret_cast<Point*>(new sal_Int8[ 0x2000 * sizeof( Point ) ]); - mpFlags = new sal_uInt8[ 0x2000 ]; + mpFlags = new PolyFlags[ 0x2000 ]; mnIndex = 0; mpGradient = nullptr; @@ -941,7 +941,7 @@ void CGMImpressOutAct::RegPolyLine( tools::Polygon& rPolygon, bool bReverse ) for ( sal_uInt16 i = 0; i < nPoints; i++ ) { mpPoints[ mnIndex + i ] = rPolygon.GetPoint( nPoints - i - 1 ); - mpFlags[ mnIndex + i ] = (sal_Int8)rPolygon.GetFlags( nPoints - i - 1 ); + mpFlags[ mnIndex + i ] = rPolygon.GetFlags( nPoints - i - 1 ); } } else @@ -949,7 +949,7 @@ void CGMImpressOutAct::RegPolyLine( tools::Polygon& rPolygon, bool bReverse ) for ( sal_uInt16 i = 0; i < nPoints; i++ ) { mpPoints[ mnIndex + i ] = rPolygon.GetPoint( i ); - mpFlags[ mnIndex + i ] = (sal_Int8)rPolygon.GetFlags( i ); + mpFlags[ mnIndex + i ] = rPolygon.GetFlags( i ); } } mnIndex = mnIndex + nPoints; diff --git a/filter/source/graphicfilter/icgm/class4.cxx b/filter/source/graphicfilter/icgm/class4.cxx index b215b40f03f9..805b92785fd3 100644 --- a/filter/source/graphicfilter/icgm/class4.cxx +++ b/filter/source/graphicfilter/icgm/class4.cxx @@ -715,9 +715,9 @@ void CGM::ImplDoClass4() for ( sal_uInt16 i = 0; i < nNumberOfPoints; i++ ) { if ( ( i % 3 ) == 0 ) - aPolygon.SetFlags( i, POLY_NORMAL ); + aPolygon.SetFlags( i, PolyFlags::Normal ); else - aPolygon.SetFlags( i, POLY_CONTROL ); + aPolygon.SetFlags( i, PolyFlags::Control ); } } else @@ -727,8 +727,8 @@ void CGM::ImplDoClass4() switch ( i & 3 ) { case 0 : - case 3 : aPolygon.SetFlags( i, POLY_NORMAL ); break; - default : aPolygon.SetFlags( i, POLY_CONTROL ); break; + case 3 : aPolygon.SetFlags( i, PolyFlags::Normal ); break; + default : aPolygon.SetFlags( i, PolyFlags::Control ); break; } } } diff --git a/filter/source/graphicfilter/icgm/outact.hxx b/filter/source/graphicfilter/icgm/outact.hxx index a94a4991c872..a83d3b199635 100644 --- a/filter/source/graphicfilter/icgm/outact.hxx +++ b/filter/source/graphicfilter/icgm/outact.hxx @@ -46,7 +46,7 @@ class CGMImpressOutAct sal_uInt32* mpGroupLevel; sal_uInt16 mnIndex; // figure - sal_uInt8* mpFlags; + PolyFlags* mpFlags; Point* mpPoints; tools::PolyPolygon maPolyPolygon; css::awt::Gradient* mpGradient; diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 8810f9fd57d1..c7d31c423a91 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -1951,7 +1951,7 @@ bool EscherPropertyContainer::CreatePolygonProperties( nTotalPoints += k; for (sal_uInt16 j = 0; j < k; ++j) { - if ( aPolyPolygon[ i ].GetFlags( j ) != POLY_CONTROL ) + if ( aPolyPolygon[ i ].GetFlags( j ) != PolyFlags::Control ) nTotalBezPoints++; } } @@ -2013,7 +2013,7 @@ bool EscherPropertyContainer::CreatePolygonProperties( if ( ( i + 1 ) != nPoints ) { *pPtr++ = 1; - if ( aPolygon.GetFlags( i + 1 ) == POLY_CONTROL ) + if ( aPolygon.GetFlags( i + 1 ) == PolyFlags::Control ) { *pPtr++ = 0x20; i += 2; @@ -4669,7 +4669,7 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( bool bFirst ) const tools::Polygon& rPoly = aPolyPoly.GetObject( a ); for ( b = 0; b < rPoly.GetSize(); b++ ) { - if ( rPoly.GetFlags( b ) != POLY_NORMAL ) + if ( rPoly.GetFlags( b ) != PolyFlags::Normal ) continue; const Point& rPt = rPoly[ b ]; sal_uInt32 nDist = (sal_uInt32)hypot( aRefPoint.X - rPt.X(), aRefPoint.Y - rPt.Y() ); diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 517a7e5b4fc1..841c546df0bd 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -545,7 +545,7 @@ void SvxMSDffManager::SolveSolver( const SvxMSDffSolverContainer& rSolver ) for ( j = 0; bNotFound && ( j < rPolygon.GetSize() ); j++ ) { PolyFlags eFlags = rPolygon.GetFlags( j ); - if ( eFlags == POLY_NORMAL ) + if ( eFlags == PolyFlags::Normal ) { if ( nC == nPointCount ) { diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index a12fc06e3d52..0fdfaa046dc0 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -1833,7 +1833,7 @@ OUString SVGActionWriter::GetPathString( const tools::PolyPolygon& rPolyPoly, bo { aPathData += aBlank; - if ( ( rPoly.GetFlags( n ) == POLY_CONTROL ) && ( ( n + 2 ) < nSize ) ) + if ( ( rPoly.GetFlags( n ) == PolyFlags::Control ) && ( ( n + 2 ) < nSize ) ) { if ( nCurrentMode != 'C' ) { diff --git a/include/svx/xpoly.hxx b/include/svx/xpoly.hxx index e9fe31f67ff0..430df7b6ffb2 100644 --- a/include/svx/xpoly.hxx +++ b/include/svx/xpoly.hxx @@ -22,6 +22,7 @@ #include <basegfx/polygon/b2dpolypolygon.hxx> #include <svx/svxdllapi.h> #include <o3tl/cow_wrapper.hxx> +#include <tools/poly.hxx> class Point; class Rectangle; @@ -36,15 +37,7 @@ class OutputDevice; #define XPOLY_APPEND 0xFFFF -// point-styles in XPolygon: -// Normal : start-/endpoint of a curve or a line -// Smooth : smooth transition between curves -// Control: control handles of a Bezier curve -// Symmetric : smooth and symmetrical transition between curves - -enum class XPolyFlags { Normal, Smooth, Control, Symmetric }; - -// Class XPolygon;has a point-array and a flag-array, which contains information about a particular point +// Class XPolygon has a point-array and a flag-array, which contains information about a particular point class ImpXPolygon; @@ -77,7 +70,7 @@ public: void SetPointCount( sal_uInt16 nPoints ); sal_uInt16 GetPointCount() const; - void Insert( sal_uInt16 nPos, const Point& rPt, XPolyFlags eFlags ); + void Insert( sal_uInt16 nPos, const Point& rPt, PolyFlags eFlags ); void Insert( sal_uInt16 nPos, const XPolygon& rXPoly ); void Remove( sal_uInt16 nPos, sal_uInt16 nCount ); void Move( long nHorzMove, long nVertMove ); @@ -89,8 +82,8 @@ public: XPolygon& operator=( XPolygon&& rXPoly ); bool operator==( const XPolygon& rXPoly ) const; - XPolyFlags GetFlags( sal_uInt16 nPos ) const; - void SetFlags( sal_uInt16 nPos, XPolyFlags eFlags ); + PolyFlags GetFlags( sal_uInt16 nPos ) const; + void SetFlags( sal_uInt16 nPos, PolyFlags eFlags ); bool IsControl(sal_uInt16 nPos) const; bool IsSmooth(sal_uInt16 nPos) const; diff --git a/include/tools/poly.hxx b/include/tools/poly.hxx index 383a8f76d0f8..065eb6cb1cb8 100644 --- a/include/tools/poly.hxx +++ b/include/tools/poly.hxx @@ -49,12 +49,12 @@ enum class PolyStyle Chord = 3 }; -enum PolyFlags +enum class PolyFlags : sal_uInt8 { - POLY_NORMAL, - POLY_SMOOTH, - POLY_CONTROL, - POLY_SYMMTR + Normal, // start-/endpoint of a curve or a line + Smooth, // smooth transition between curves + Control, // control handles of a Bezier curve + Symmetric // smooth and symmetrical transition between curves }; class SvStream; @@ -86,7 +86,7 @@ public: Polygon(); Polygon( sal_uInt16 nSize ); Polygon( sal_uInt16 nPoints, const Point* pPtAry, - const sal_uInt8* pFlagAry = nullptr ); + const PolyFlags* pFlagAry = nullptr ); Polygon( const Rectangle& rRect ); Polygon( const Rectangle& rRect, sal_uInt32 nHorzRound, sal_uInt32 nVertRound ); @@ -174,7 +174,7 @@ public: void Write( SvStream& rOStream ) const; const Point* GetConstPointAry() const; - const sal_uInt8* GetConstFlagAry() const; + const PolyFlags* GetConstFlagAry() const; // convert to ::basegfx::B2DPolygon and return ::basegfx::B2DPolygon getB2DPolygon() const; diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 8d0256594be4..6bd90d5c3550 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -2586,11 +2586,11 @@ void DrawingML::WritePolyPolygon( const tools::PolyPolygon& rPolyPolygon ) for( sal_uInt16 j = 1; j < rPoly.GetSize(); j ++ ) { - enum PolyFlags flags = rPoly.GetFlags(j); - if( flags == POLY_CONTROL ) + PolyFlags flags = rPoly.GetFlags(j); + if( flags == PolyFlags::Control ) { // a:cubicBezTo can only contain 3 a:pt elements, so we need to make sure of this - if( j+2 < rPoly.GetSize() && rPoly.GetFlags(j+1) == POLY_CONTROL && rPoly.GetFlags(j+2) != POLY_CONTROL ) + if( j+2 < rPoly.GetSize() && rPoly.GetFlags(j+1) == PolyFlags::Control && rPoly.GetFlags(j+2) != PolyFlags::Control ) { mpFS->startElementNS( XML_a, XML_cubicBezTo, FSEND ); @@ -2606,7 +2606,7 @@ void DrawingML::WritePolyPolygon( const tools::PolyPolygon& rPolyPolygon ) j += 2; } } - else if( flags == POLY_NORMAL ) + else if( flags == PolyFlags::Normal ) { mpFS->startElementNS( XML_a, XML_lnTo, FSEND ); mpFS->singleElementNS( XML_a, XML_pt, diff --git a/sd/source/ui/func/fucon3d.cxx b/sd/source/ui/func/fucon3d.cxx index 0fed0a33d3b1..22480c2b2f5c 100644 --- a/sd/source/ui/func/fucon3d.cxx +++ b/sd/source/ui/func/fucon3d.cxx @@ -128,14 +128,14 @@ E3dCompoundObject* FuConstruct3dObject::ImpCreateBasic3DShape() XPolygon aXPoly(Point (0, 1250), 2500, 2500, 0, 900, false); aXPoly.Scale(5.0, 5.0); - aXPoly.Insert(0, Point (2400*5, 1250*5), XPolyFlags::Normal); - aXPoly.Insert(0, Point (2000*5, 1250*5), XPolyFlags::Normal); - aXPoly.Insert(0, Point (1500*5, 1250*5), XPolyFlags::Normal); - aXPoly.Insert(0, Point (1000*5, 1250*5), XPolyFlags::Normal); - aXPoly.Insert(0, Point (500*5, 1250*5), XPolyFlags::Normal); - aXPoly.Insert(0, Point (250*5, 1250*5), XPolyFlags::Normal); - aXPoly.Insert(0, Point (50*5, 1250*5), XPolyFlags::Normal); - aXPoly.Insert(0, Point (0*5, 1250*5), XPolyFlags::Normal); + aXPoly.Insert(0, Point (2400*5, 1250*5), PolyFlags::Normal); + aXPoly.Insert(0, Point (2000*5, 1250*5), PolyFlags::Normal); + aXPoly.Insert(0, Point (1500*5, 1250*5), PolyFlags::Normal); + aXPoly.Insert(0, Point (1000*5, 1250*5), PolyFlags::Normal); + aXPoly.Insert(0, Point (500*5, 1250*5), PolyFlags::Normal); + aXPoly.Insert(0, Point (250*5, 1250*5), PolyFlags::Normal); + aXPoly.Insert(0, Point (50*5, 1250*5), PolyFlags::Normal); + aXPoly.Insert(0, Point (0*5, 1250*5), PolyFlags::Normal); ::basegfx::B2DPolygon aB2DPolygon(aXPoly.getB2DPolygon()); if(aB2DPolygon.areControlPointsUsed()) diff --git a/svx/inc/xpolyimp.hxx b/svx/inc/xpolyimp.hxx index 0fbd187e4479..35ead6c9a87a 100644 --- a/svx/inc/xpolyimp.hxx +++ b/svx/inc/xpolyimp.hxx @@ -29,7 +29,7 @@ class ImpXPolygon { public: Point* pPointAry; - sal_uInt8* pFlagAry; + PolyFlags* pFlagAry; Point* pOldPointAry; bool bDeleteOldPoints; sal_uInt16 nSize; diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx index ff76043a7b66..5b7c594e5730 100644 --- a/svx/source/svdraw/svdoedge.cxx +++ b/svx/source/svdraw/svdoedge.cxx @@ -630,7 +630,7 @@ SdrEscapeDirection SdrEdgeObj::ImpCalcEscAngle(SdrObject* pObj, const Point& rPt XPolygon SdrEdgeObj::ImpCalcObjToCenter(const Point& rStPt, long nEscAngle, const Rectangle& rRect, const Point& rMeeting) { XPolygon aXP; - aXP.Insert(XPOLY_APPEND,rStPt,XPolyFlags::Normal); + aXP.Insert(XPOLY_APPEND,rStPt,PolyFlags::Normal); bool bRts=nEscAngle==0; bool bObn=nEscAngle==9000; bool bLks=nEscAngle==18000; @@ -647,7 +647,7 @@ XPolygon SdrEdgeObj::ImpCalcObjToCenter(const Point& rStPt, long nEscAngle, cons if (bRts && rMeeting.X()>=aP2.X()) aP2.X()=rMeeting.X(); if (bObn && rMeeting.Y()<=aP2.Y()) aP2.Y()=rMeeting.Y(); if (bUnt && rMeeting.Y()>=aP2.Y()) aP2.Y()=rMeeting.Y(); - aXP.Insert(XPOLY_APPEND,aP2,XPolyFlags::Normal); + aXP.Insert(XPOLY_APPEND,aP2,PolyFlags::Normal); Point aP3(aP2); if ((bLks && rMeeting.X()>aP2.X()) || (bRts && rMeeting.X()<aP2.X())) { // around @@ -658,10 +658,10 @@ XPolygon SdrEdgeObj::ImpCalcObjToCenter(const Point& rStPt, long nEscAngle, cons aP3.Y()=rRect.Bottom(); if (rMeeting.Y()>aP3.Y()) aP3.Y()=rMeeting.Y(); } - aXP.Insert(XPOLY_APPEND,aP3,XPolyFlags::Normal); + aXP.Insert(XPOLY_APPEND,aP3,PolyFlags::Normal); if (aP3.Y()!=rMeeting.Y()) { aP3.X()=rMeeting.X(); - aXP.Insert(XPOLY_APPEND,aP3,XPolyFlags::Normal); + aXP.Insert(XPOLY_APPEND,aP3,PolyFlags::Normal); } } if ((bObn && rMeeting.Y()>aP2.Y()) || (bUnt && rMeeting.Y()<aP2.Y())) { // around @@ -672,10 +672,10 @@ XPolygon SdrEdgeObj::ImpCalcObjToCenter(const Point& rStPt, long nEscAngle, cons aP3.X()=rRect.Right(); if (rMeeting.X()>aP3.X()) aP3.X()=rMeeting.X(); } - aXP.Insert(XPOLY_APPEND,aP3,XPolyFlags::Normal); + aXP.Insert(XPOLY_APPEND,aP3,PolyFlags::Normal); if (aP3.X()!=rMeeting.X()) { aP3.Y()=rMeeting.Y(); - aXP.Insert(XPOLY_APPEND,aP3,XPolyFlags::Normal); + aXP.Insert(XPOLY_APPEND,aP3,PolyFlags::Normal); } } #ifdef DBG_UTIL @@ -1229,7 +1229,7 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec nXP2Anz--; aXP2.Remove(nXP2Anz,1); } if (bInsMeetingPoint) { - aXP1.Insert(XPOLY_APPEND,aMeeting,XPolyFlags::Normal); + aXP1.Insert(XPOLY_APPEND,aMeeting,PolyFlags::Normal); if (bInfo) { // Inserting a MeetingPoint adds 2 new lines, // either might become the center line. @@ -1254,7 +1254,7 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec if (aXP1[nXP1Anz-1]==aXP2[nXP2Anz-1] && nXP1Anz>1 && nXP2Anz>1) nNum--; while (nNum>0) { nNum--; - aXP1.Insert(XPOLY_APPEND,aXP2[nNum],XPolyFlags::Normal); + aXP1.Insert(XPOLY_APPEND,aXP2[nNum],PolyFlags::Normal); } sal_uInt16 nPointCount=aXP1.GetPointCount(); char cForm; @@ -1460,9 +1460,9 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec long dx2=pPt3->X()-pPt4->X(); long dy2=pPt3->Y()-pPt4->Y(); if (cForm=='L') { // nPointCount==3 - aXP1.SetFlags(1,XPolyFlags::Control); + aXP1.SetFlags(1,PolyFlags::Control); Point aPt3(*pPt2); - aXP1.Insert(2,aPt3,XPolyFlags::Control); + aXP1.Insert(2,aPt3,PolyFlags::Control); nPointCount=aXP1.GetPointCount(); pPt2=&aXP1[1]; pPt3=&aXP1[nPointCount-2]; @@ -1473,8 +1473,8 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec } else if (nPointCount>=4 && nPointCount<=6) { // Z or U or ... // To all others, the end points of the original lines become control // points for now. Thus, we need to do some more work for nPointCount>4! - aXP1.SetFlags(1,XPolyFlags::Control); - aXP1.SetFlags(nPointCount-2,XPolyFlags::Control); + aXP1.SetFlags(1,PolyFlags::Control); + aXP1.SetFlags(nPointCount-2,PolyFlags::Control); // distance x1.5 pPt2->X()+=dx1/2; pPt2->Y()+=dy1/2; @@ -1487,9 +1487,9 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec long dy1b=aCenter.Y()-aXP1[1].Y(); long dx2b=aCenter.X()-aXP1[3].X(); long dy2b=aCenter.Y()-aXP1[3].Y(); - aXP1.Insert(2,aCenter,XPolyFlags::Control); - aXP1.SetFlags(3,XPolyFlags::Symmetric); - aXP1.Insert(4,aCenter,XPolyFlags::Control); + aXP1.Insert(2,aCenter,PolyFlags::Control); + aXP1.SetFlags(3,PolyFlags::Symmetric); + aXP1.Insert(4,aCenter,PolyFlags::Control); aXP1[2].X()-=dx1b/2; aXP1[2].Y()-=dy1b/2; aXP1[3].X()-=(dx1b+dx2b)/4; @@ -1500,13 +1500,13 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec if (nPointCount==6) { Point aPt1b(aXP1[2]); Point aPt2b(aXP1[3]); - aXP1.Insert(2,aPt1b,XPolyFlags::Control); - aXP1.Insert(5,aPt2b,XPolyFlags::Control); + aXP1.Insert(2,aPt1b,PolyFlags::Control); + aXP1.Insert(5,aPt2b,PolyFlags::Control); long dx=aPt1b.X()-aPt2b.X(); long dy=aPt1b.Y()-aPt2b.Y(); aXP1[3].X()-=dx/2; aXP1[3].Y()-=dy/2; - aXP1.SetFlags(3,XPolyFlags::Symmetric); + aXP1.SetFlags(3,PolyFlags::Symmetric); aXP1.Remove(4,1); // because it's identical with aXP1[3] } } diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx index 1ba7ff83f623..0d8429396e3b 100644 --- a/svx/source/svdraw/svdopath.cxx +++ b/svx/source/svdraw/svdopath.cxx @@ -199,8 +199,8 @@ ImpSdrPathDragData::ImpSdrPathDragData(const SdrPathObj& rPO, const SdrHdl& rHdl bIsPrevControl=aTmpXP.IsControl(nPrevPnt); bIsNextControl=!bIsPrevControl; } else { - bPrevIsControl=!bBegPnt && !bPrevIsBegPnt && aTmpXP.GetFlags(nPrevPnt)==XPolyFlags::Control; - bNextIsControl=!bEndPnt && !bNextIsEndPnt && aTmpXP.GetFlags(nNextPnt)==XPolyFlags::Control; + bPrevIsControl=!bBegPnt && !bPrevIsBegPnt && aTmpXP.GetFlags(nPrevPnt)==PolyFlags::Control; + bNextIsControl=!bEndPnt && !bNextIsEndPnt && aTmpXP.GetFlags(nNextPnt)==PolyFlags::Control; } nPrevPrevPnt0=nPrevPrevPnt; nPrevPnt0 =nPrevPnt; @@ -303,9 +303,9 @@ void ImpPathCreateUser::CalcBezier(const Point& rP1, const Point& rP2, const Poi XPolygon ImpPathCreateUser::GetBezierPoly() const { XPolygon aXP(4); - aXP[0]=aBezStart; aXP.SetFlags(0,XPolyFlags::Smooth); - aXP[1]=aBezCtrl1; aXP.SetFlags(1,XPolyFlags::Control); - aXP[2]=aBezCtrl2; aXP.SetFlags(2,XPolyFlags::Control); + aXP[0]=aBezStart; aXP.SetFlags(0,PolyFlags::Smooth); + aXP[1]=aBezCtrl1; aXP.SetFlags(1,PolyFlags::Control); + aXP[2]=aBezCtrl2; aXP.SetFlags(2,PolyFlags::Control); aXP[3]=aBezEnd; return aXP; } @@ -362,7 +362,7 @@ XPolygon ImpPathCreateUser::GetCirclePoly() const if (nCircRelAngle>=0) { XPolygon aXP(aCircCenter,nCircRadius,nCircRadius, sal_uInt16((nCircStAngle+5)/10),sal_uInt16((nCircStAngle+nCircRelAngle+5)/10),false); - aXP[0]=aCircStart; aXP.SetFlags(0,XPolyFlags::Smooth); + aXP[0]=aCircStart; aXP.SetFlags(0,PolyFlags::Smooth); if (!bAngleSnap) aXP[aXP.GetPointCount()-1]=aCircEnd; return aXP; } else { @@ -376,7 +376,7 @@ XPolygon ImpPathCreateUser::GetCirclePoly() const aXP[nNum]=aXP[n2]; aXP[n2]=aPt; } - aXP[0]=aCircStart; aXP.SetFlags(0,XPolyFlags::Smooth); + aXP[0]=aCircStart; aXP.SetFlags(0,PolyFlags::Smooth); if (!bAngleSnap) aXP[aXP.GetPointCount()-1]=aCircEnd; return aXP; } @@ -430,7 +430,7 @@ void ImpPathCreateUser::CalcLine(const Point& rP1, const Point& rP2, const Point XPolygon ImpPathCreateUser::GetLinePoly() const { XPolygon aXP(2); - aXP[0]=aLineStart; if (!bLine90) aXP.SetFlags(0,XPolyFlags::Smooth); + aXP[0]=aLineStart; if (!bLine90) aXP.SetFlags(0,PolyFlags::Smooth); aXP[1]=aLineEnd; return aXP; } @@ -490,7 +490,7 @@ void ImpPathCreateUser::CalcRect(const Point& rP1, const Point& rP2, const Point XPolygon ImpPathCreateUser::GetRectPoly() const { XPolygon aXP(3); - aXP[0]=aRectP1; aXP.SetFlags(0,XPolyFlags::Smooth); + aXP[0]=aRectP1; aXP.SetFlags(0,PolyFlags::Smooth); aXP[1]=aRectP2; if (aRectP3!=aRectP2) aXP[2]=aRectP3; return aXP; @@ -1196,8 +1196,8 @@ basegfx::B2DPolyPolygon ImpPathForDragAndCreate::getSpecialDragPoly(const SdrDra aLine2[0]=mpSdrPathDragData->aXP[nNextNextPnt]; aLine2[1]=mpSdrPathDragData->aXP[nNextPnt]; if (mpSdrPathDragData->aXP.IsSmooth(nPrevPnt) && !bPrevIsBegPnt && mpSdrPathDragData->aXP.IsControl(nPrevPrevPnt)) { - aXPoly.Insert(0,rXP[mpSdrPathDragData->nPrevPrevPnt0-1],XPolyFlags::Control); - aXPoly.Insert(0,rXP[mpSdrPathDragData->nPrevPrevPnt0-2],XPolyFlags::Normal); + aXPoly.Insert(0,rXP[mpSdrPathDragData->nPrevPrevPnt0-1],PolyFlags::Control); + aXPoly.Insert(0,rXP[mpSdrPathDragData->nPrevPrevPnt0-2],PolyFlags::Normal); // leverage lines for the opposing curve segment aLine3[0]=mpSdrPathDragData->aXP[nPrevPnt]; aLine3[1]=mpSdrPathDragData->aXP[nPrevPrevPnt]; @@ -1211,8 +1211,8 @@ basegfx::B2DPolyPolygon ImpPathForDragAndCreate::getSpecialDragPoly(const SdrDra aLine2[0]=mpSdrPathDragData->aXP[nPrevPrevPnt]; aLine2[1]=mpSdrPathDragData->aXP[nPrevPnt]; if (mpSdrPathDragData->aXP.IsSmooth(nNextPnt) && !bNextIsEndPnt && mpSdrPathDragData->aXP.IsControl(nNextNextPnt)) { - aXPoly.Insert(XPOLY_APPEND,rXP[mpSdrPathDragData->nNextNextPnt0+1],XPolyFlags::Control); - aXPoly.Insert(XPOLY_APPEND,rXP[mpSdrPathDragData->nNextNextPnt0+2],XPolyFlags::Normal); + aXPoly.Insert(XPOLY_APPEND,rXP[mpSdrPathDragData->nNextNextPnt0+1],PolyFlags::Control); + aXPoly.Insert(XPOLY_APPEND,rXP[mpSdrPathDragData->nNextNextPnt0+2],PolyFlags::Normal); // leverage lines for the opposing curve segment aLine3[0]=mpSdrPathDragData->aXP[nNextPnt]; aLine3[1]=mpSdrPathDragData->aXP[nNextNextPnt]; @@ -1226,18 +1226,18 @@ basegfx::B2DPolyPolygon ImpPathForDragAndCreate::getSpecialDragPoly(const SdrDra if (mpSdrPathDragData->bEliminate) { aXPoly.Remove(2,1); } - if (bPrevIsControl) aXPoly.Insert(0,rXP[mpSdrPathDragData->nPrevPrevPnt0-1],XPolyFlags::Normal); + if (bPrevIsControl) aXPoly.Insert(0,rXP[mpSdrPathDragData->nPrevPrevPnt0-1],PolyFlags::Normal); else if (!bBegPnt && !bPrevIsBegPnt && mpSdrPathDragData->aXP.IsControl(nPrevPrevPnt)) { - aXPoly.Insert(0,rXP[mpSdrPathDragData->nPrevPrevPnt0-1],XPolyFlags::Control); - aXPoly.Insert(0,rXP[mpSdrPathDragData->nPrevPrevPnt0-2],XPolyFlags::Normal); + aXPoly.Insert(0,rXP[mpSdrPathDragData->nPrevPrevPnt0-1],PolyFlags::Control); + aXPoly.Insert(0,rXP[mpSdrPathDragData->nPrevPrevPnt0-2],PolyFlags::Normal); } else { aXPoly.Remove(0,1); if (bBegPnt) aXPoly.Remove(0,1); } - if (bNextIsControl) aXPoly.Insert(XPOLY_APPEND,rXP[mpSdrPathDragData->nNextNextPnt0+1],XPolyFlags::Normal); + if (bNextIsControl) aXPoly.Insert(XPOLY_APPEND,rXP[mpSdrPathDragData->nNextNextPnt0+1],PolyFlags::Normal); else if (!bEndPnt && !bNextIsEndPnt && mpSdrPathDragData->aXP.IsControl(nNextNextPnt)) { - aXPoly.Insert(XPOLY_APPEND,rXP[mpSdrPathDragData->nNextNextPnt0+1],XPolyFlags::Control); - aXPoly.Insert(XPOLY_APPEND,rXP[mpSdrPathDragData->nNextNextPnt0+2],XPolyFlags::Normal); + aXPoly.Insert(XPOLY_APPEND,rXP[mpSdrPathDragData->nNextNextPnt0+1],PolyFlags::Control); + aXPoly.Insert(XPOLY_APPEND,rXP[mpSdrPathDragData->nNextNextPnt0+2],PolyFlags::Normal); } else { aXPoly.Remove(aXPoly.GetPointCount()-1,1); if (bEndPnt) aXPoly.Remove(aXPoly.GetPointCount()-1,1); @@ -1366,12 +1366,12 @@ bool ImpPathForDragAndCreate::MovCreate(SdrDragStat& rStat) if (nActPoint-pU->nBezierStartPoint>=3 && ((nActPoint-pU->nBezierStartPoint)%3)==0) { rXPoly.PointsToBezier(nActPoint-3); - rXPoly.SetFlags(nActPoint-1,XPolyFlags::Control); - rXPoly.SetFlags(nActPoint-2,XPolyFlags::Control); + rXPoly.SetFlags(nActPoint-1,PolyFlags::Control); + rXPoly.SetFlags(nActPoint-2,PolyFlags::Control); if (nActPoint>=6 && rXPoly.IsControl(nActPoint-4)) { rXPoly.CalcTangent(nActPoint-3,nActPoint-4,nActPoint-2); - rXPoly.SetFlags(nActPoint-3,XPolyFlags::Smooth); + rXPoly.SetFlags(nActPoint-3,PolyFlags::Smooth); } } rXPoly[nActPoint+1]=rStat.Now(); @@ -1439,12 +1439,12 @@ bool ImpPathForDragAndCreate::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) if (pU->nBezierStartPoint>nActPoint) pU->nBezierStartPoint=nActPoint; if (IsBezier(pU->eAktKind) && nActPoint-pU->nBezierStartPoint>=3 && ((nActPoint-pU->nBezierStartPoint)%3)==0) { rXPoly.PointsToBezier(nActPoint-3); - rXPoly.SetFlags(nActPoint-1,XPolyFlags::Control); - rXPoly.SetFlags(nActPoint-2,XPolyFlags::Control); + rXPoly.SetFlags(nActPoint-1,PolyFlags::Control); + rXPoly.SetFlags(nActPoint-2,PolyFlags::Control); if (nActPoint>=6 && rXPoly.IsControl(nActPoint-4)) { rXPoly.CalcTangent(nActPoint-3,nActPoint-4,nActPoint-2); - rXPoly.SetFlags(nActPoint-3,XPolyFlags::Smooth); + rXPoly.SetFlags(nActPoint-3,PolyFlags::Smooth); } } } else { @@ -2061,7 +2061,7 @@ void SdrPathObj::AddToHdlList(SdrHdlList& rHdlList) const if (bClosed && nPntCnt>1) nPntCnt--; for (sal_uInt16 j=0; j<nPntCnt; j++) { - if (rXPoly.GetFlags(j)!=XPolyFlags::Control) { + if (rXPoly.GetFlags(j)!=PolyFlags::Control) { const Point& rPnt=rXPoly[j]; SdrHdl* pHdl=new SdrHdl(rPnt,SdrHdlKind::Poly); pHdl->SetPolyNum(i); @@ -2092,12 +2092,12 @@ sal_uInt32 SdrPathObj::GetPlusHdlCount(const SdrHdl& rHdl) const nPntMax--; if (nPnt<=nPntMax) { - if (rXPoly.GetFlags(nPnt)!=XPolyFlags::Control) + if (rXPoly.GetFlags(nPnt)!=PolyFlags::Control) { if (nPnt==0 && IsClosed()) nPnt=nPntMax; - if (nPnt>0 && rXPoly.GetFlags(nPnt-1)==XPolyFlags::Control) nCnt++; + if (nPnt>0 && rXPoly.GetFlags(nPnt-1)==PolyFlags::Control) nCnt++; if (nPnt==nPntMax && IsClosed()) nPnt=0; - if (nPnt<nPntMax && rXPoly.GetFlags(nPnt+1)==XPolyFlags::Control) nCnt++; + if (nPnt<nPntMax && rXPoly.GetFlags(nPnt+1)==PolyFlags::Control) nCnt++; } } } @@ -2128,7 +2128,7 @@ SdrHdl* SdrPathObj::GetPlusHdl(const SdrHdl& rHdl, sal_uInt32 nPlusNum) const pHdl->SetPolyNum(rHdl.GetPolyNum()); if (nPnt==0 && IsClosed()) nPnt=nPntMax; - if (nPnt>0 && rXPoly.GetFlags(nPnt-1)==XPolyFlags::Control && nPlusNum==0) + if (nPnt>0 && rXPoly.GetFlags(nPnt-1)==PolyFlags::Control && nPlusNum==0) { pHdl->SetPos(rXPoly[nPnt-1]); pHdl->SetPointNum(nPnt-1); @@ -2136,7 +2136,7 @@ SdrHdl* SdrPathObj::GetPlusHdl(const SdrHdl& rHdl, sal_uInt32 nPlusNum) const else { if (nPnt==nPntMax && IsClosed()) nPnt=0; - if (nPnt<rXPoly.GetPointCount()-1 && rXPoly.GetFlags(nPnt+1)==XPolyFlags::Control) + if (nPnt<rXPoly.GetPointCount()-1 && rXPoly.GetFlags(nPnt+1)==PolyFlags::Control) { pHdl->SetPos(rXPoly[nPnt+1]); pHdl->SetPointNum(nPnt+1); diff --git a/svx/source/xoutdev/_xpoly.cxx b/svx/source/xoutdev/_xpoly.cxx index 711a57c8724b..e289a45627d6 100644 --- a/svx/source/xoutdev/_xpoly.cxx +++ b/svx/source/xoutdev/_xpoly.cxx @@ -97,7 +97,7 @@ void ImpXPolygon::Resize( sal_uInt16 nNewSize, bool bDeletePoints ) if( nNewSize == nSize ) return; - sal_uInt8* pOldFlagAry = pFlagAry; + PolyFlags* pOldFlagAry = pFlagAry; sal_uInt16 nOldSize = nSize; CheckPointDelete(); @@ -116,7 +116,7 @@ void ImpXPolygon::Resize( sal_uInt16 nNewSize, bool bDeletePoints ) memset( pPointAry, 0, nSize*sizeof( Point ) ); // create flag array - pFlagAry = new sal_uInt8[ nSize ]; + pFlagAry = new PolyFlags[ nSize ]; memset( pFlagAry, 0, nSize ); // copy if needed @@ -227,7 +227,7 @@ XPolygon::XPolygon( const tools::Polygon& rPoly ) for( sal_uInt16 i = 0; i < nSize; i++ ) { pImpXPolygon->pPointAry[i] = rPoly[i]; - pImpXPolygon->pFlagAry[i] = (sal_uInt8) rPoly.GetFlags( i ); + pImpXPolygon->pFlagAry[i] = rPoly.GetFlags( i ); } } @@ -275,8 +275,8 @@ XPolygon::XPolygon(const Rectangle& rRect, long nRx, long nRy) break; } GenBezArc(aCenter, nRx, nRy, nXHdl, nYHdl, 0, 900, nQuad, nPos); - pImpXPolygon->pFlagAry[nPos ] = (sal_uInt8) XPolyFlags::Smooth; - pImpXPolygon->pFlagAry[nPos+3] = (sal_uInt8) XPolyFlags::Smooth; + pImpXPolygon->pFlagAry[nPos ] = PolyFlags::Smooth; + pImpXPolygon->pFlagAry[nPos+3] = PolyFlags::Smooth; nPos += 4; } } @@ -315,7 +315,7 @@ XPolygon::XPolygon(const Point& rCenter, long nRx, long nRy, GenBezArc(rCenter, nRx, nRy, nXHdl, nYHdl, nA1, nA2, nQuad, nPos); nPos += 3; if ( !bLoopEnd ) - pImpXPolygon->pFlagAry[nPos] = (sal_uInt8) XPolyFlags::Smooth; + pImpXPolygon->pFlagAry[nPos] = PolyFlags::Smooth; } while ( !bLoopEnd ); @@ -325,8 +325,8 @@ XPolygon::XPolygon(const Point& rCenter, long nRx, long nRy, if ( bFull ) { - pImpXPolygon->pFlagAry[0 ] = (sal_uInt8) XPolyFlags::Smooth; - pImpXPolygon->pFlagAry[nPos] = (sal_uInt8) XPolyFlags::Smooth; + pImpXPolygon->pFlagAry[0 ] = PolyFlags::Smooth; + pImpXPolygon->pFlagAry[nPos] = PolyFlags::Smooth; } pImpXPolygon->nPoints = nPos + 1; } @@ -363,12 +363,12 @@ sal_uInt16 XPolygon::GetPointCount() const return pImpXPolygon->nPoints; } -void XPolygon::Insert( sal_uInt16 nPos, const Point& rPt, XPolyFlags eFlags ) +void XPolygon::Insert( sal_uInt16 nPos, const Point& rPt, PolyFlags eFlags ) { if (nPos>pImpXPolygon->nPoints) nPos=pImpXPolygon->nPoints; pImpXPolygon->InsertSpace( nPos, 1 ); pImpXPolygon->pPointAry[nPos] = rPt; - pImpXPolygon->pFlagAry[nPos] = (sal_uInt8)eFlags; + pImpXPolygon->pFlagAry[nPos] = eFlags; } void XPolygon::Insert( sal_uInt16 nPos, const XPolygon& rXPoly ) @@ -471,30 +471,30 @@ bool XPolygon::operator==( const XPolygon& rXPoly ) const } /// get the flags for the point at the given position -XPolyFlags XPolygon::GetFlags( sal_uInt16 nPos ) const +PolyFlags XPolygon::GetFlags( sal_uInt16 nPos ) const { pImpXPolygon->CheckPointDelete(); - return (XPolyFlags) pImpXPolygon->pFlagAry[nPos]; + return (PolyFlags) pImpXPolygon->pFlagAry[nPos]; } /// set the flags for the point at the given position -void XPolygon::SetFlags( sal_uInt16 nPos, XPolyFlags eFlags ) +void XPolygon::SetFlags( sal_uInt16 nPos, PolyFlags eFlags ) { pImpXPolygon->CheckPointDelete(); - pImpXPolygon->pFlagAry[nPos] = (sal_uInt8) eFlags; + pImpXPolygon->pFlagAry[nPos] = eFlags; } /// short path to read the CONTROL flag directly (TODO: better explain what the sense behind this flag is!) bool XPolygon::IsControl(sal_uInt16 nPos) const { - return ( (XPolyFlags) pImpXPolygon->pFlagAry[nPos] == XPolyFlags::Control ); + return ( (PolyFlags) pImpXPolygon->pFlagAry[nPos] == PolyFlags::Control ); } /// short path to read the SMOOTH and SYMMTR flag directly (TODO: better explain what the sense behind these flags is!) bool XPolygon::IsSmooth(sal_uInt16 nPos) const { - XPolyFlags eFlag = (XPolyFlags) pImpXPolygon->pFlagAry[nPos]; - return ( eFlag == XPolyFlags::Smooth || eFlag == XPolyFlags::Symmetric ); + PolyFlags eFlag = (PolyFlags) pImpXPolygon->pFlagAry[nPos]; + return ( eFlag == PolyFlags::Smooth || eFlag == PolyFlags::Symmetric ); } /** calculate the euclidean distance between two points @@ -598,8 +598,8 @@ void XPolygon::GenBezArc(const Point& rCenter, long nRx, long nRy, SubdivideBezier(nFirst, false, (double)nStart / 900); if ( nEnd < 900 ) SubdivideBezier(nFirst, true, (double)(nEnd-nStart) / (900-nStart)); - SetFlags(nFirst+1, XPolyFlags::Control); - SetFlags(nFirst+2, XPolyFlags::Control); + SetFlags(nFirst+1, PolyFlags::Control); + SetFlags(nFirst+2, PolyFlags::Control); } bool XPolygon::CheckAngles(sal_uInt16& nStart, sal_uInt16 nEnd, sal_uInt16& nA1, sal_uInt16& nA2) @@ -648,7 +648,7 @@ void XPolygon::CalcSmoothJoin(sal_uInt16 nCenter, sal_uInt16 nDrag, sal_uInt16 n { double fRatio = CalcDistance(nCenter, nPnt) / fDiv; // keep the length if SMOOTH - if ( GetFlags(nCenter) == XPolyFlags::Smooth || !IsControl(nDrag) ) + if ( GetFlags(nCenter) == PolyFlags::Smooth || !IsControl(nDrag) ) { aDiff.X() = (long) (fRatio * aDiff.X()); aDiff.Y() = (long) (fRatio * aDiff.Y()); @@ -677,7 +677,7 @@ void XPolygon::CalcTangent(sal_uInt16 nCenter, sal_uInt16 nPrev, sal_uInt16 nNex double fPrevLen = CalcDistance(nCenter, nPrev) / fAbsLen; // same length for both sides if SYMMTR - if ( GetFlags(nCenter) == XPolyFlags::Symmetric ) + if ( GetFlags(nCenter) == PolyFlags::Symmetric ) { fPrevLen = (fNextLen + fPrevLen) / 2; fNextLen = fPrevLen; @@ -752,8 +752,8 @@ void XPolygon::PointsToBezier(sal_uInt16 nFirst) pPoints[nFirst+1] = Point((long) fX1, (long) fY1); pPoints[nFirst+2] = Point((long) fX2, (long) fY2); - SetFlags(nFirst+1, XPolyFlags::Control); - SetFlags(nFirst+2, XPolyFlags::Control); + SetFlags(nFirst+1, PolyFlags::Control); + SetFlags(nFirst+2, PolyFlags::Control); } /// scale in X- and/or Y-direction @@ -854,7 +854,7 @@ XPolygon::XPolygon(const basegfx::B2DPolygon& rPolygon) for( sal_uInt16 i = 0; i < nSize; i++ ) { pImpXPolygon->pPointAry[i] = aSource[i]; - pImpXPolygon->pFlagAry[i] = (sal_uInt8) aSource.GetFlags( i ); + pImpXPolygon->pFlagAry[i] = aSource.GetFlags( i ); } } diff --git a/tools/inc/poly.h b/tools/inc/poly.h index 3be118927435..6ad1b5b82ceb 100644 --- a/tools/inc/poly.h +++ b/tools/inc/poly.h @@ -20,6 +20,7 @@ #define INCLUDED_TOOLS_INC_POLY_H #include <sal/types.h> +#include <tools/poly.hxx> class Point; @@ -27,8 +28,8 @@ class SAL_WARN_UNUSED ImplPolygonData { public: Point* mpPointAry; - sal_uInt8* mpFlagAry; - sal_uInt16 mnPoints; + PolyFlags* mpFlagAry; + sal_uInt16 mnPoints; sal_uInt32 mnRefCount; }; @@ -36,7 +37,7 @@ class SAL_WARN_UNUSED ImplPolygon : public ImplPolygonData { public: ImplPolygon( sal_uInt16 nInitSize, bool bFlags = false ); - ImplPolygon( sal_uInt16 nPoints, const Point* pPtAry, const sal_uInt8* pInitFlags ); + ImplPolygon( sal_uInt16 nPoints, const Point* pPtAry, const PolyFlags* pInitFlags ); ImplPolygon( const ImplPolygon& rImplPoly ); ~ImplPolygon(); diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx index 20391e3df398..b327569487b5 100644 --- a/tools/source/generic/poly.cxx +++ b/tools/source/generic/poly.cxx @@ -70,7 +70,7 @@ ImplPolygon::ImplPolygon( sal_uInt16 nInitSize, bool bFlags ) if( bFlags ) { - mpFlagAry = new sal_uInt8[ nInitSize ]; + mpFlagAry = new PolyFlags[ nInitSize ]; memset( mpFlagAry, 0, nInitSize ); } else @@ -90,7 +90,7 @@ ImplPolygon::ImplPolygon( const ImplPolygon& rImpPoly ) if( rImpPoly.mpFlagAry ) { - mpFlagAry = new sal_uInt8[ rImpPoly.mnPoints ]; + mpFlagAry = new PolyFlags[ rImpPoly.mnPoints ]; memcpy( mpFlagAry, rImpPoly.mpFlagAry, rImpPoly.mnPoints ); } else @@ -106,7 +106,7 @@ ImplPolygon::ImplPolygon( const ImplPolygon& rImpPoly ) mnPoints = rImpPoly.mnPoints; } -ImplPolygon::ImplPolygon( sal_uInt16 nInitSize, const Point* pInitAry, const sal_uInt8* pInitFlags ) +ImplPolygon::ImplPolygon( sal_uInt16 nInitSize, const Point* pInitAry, const PolyFlags* pInitFlags ) { if ( nInitSize ) { @@ -116,7 +116,7 @@ ImplPolygon::ImplPolygon( sal_uInt16 nInitSize, const Point* pInitAry, const sal if( pInitFlags ) { - mpFlagAry = new sal_uInt8[ nInitSize ]; + mpFlagAry = new PolyFlags[ nInitSize ]; memcpy( mpFlagAry, pInitFlags, nInitSize ); } else @@ -182,11 +182,11 @@ void ImplPolygon::ImplSetSize( sal_uInt16 nNewSize, bool bResize ) // ggf. FlagArray beruecksichtigen if( mpFlagAry ) { - sal_uInt8* pNewFlagAry; + PolyFlags* pNewFlagAry; if( nNewSize ) { - pNewFlagAry = new sal_uInt8[ nNewSize ]; + pNewFlagAry = new PolyFlags[ nNewSize ]; if( bResize ) { @@ -255,7 +255,7 @@ void ImplPolygon::ImplSplit( sal_uInt16 nPos, sal_uInt16 nSpace, ImplPolygon con // consider FlagArray if( mpFlagAry ) { - sal_uInt8* pNewFlagAry = new sal_uInt8[ nNewSize ]; + PolyFlags* pNewFlagAry = new PolyFlags[ nNewSize ]; memcpy( pNewFlagAry, mpFlagAry, nPos ); @@ -278,7 +278,7 @@ void ImplPolygon::ImplCreateFlagArray() { if( !mpFlagAry ) { - mpFlagAry = new sal_uInt8[ mnPoints ]; + mpFlagAry = new PolyFlags[ mnPoints ]; memset( mpFlagAry, 0, mnPoints ); } } @@ -534,9 +534,8 @@ Polygon::Polygon( sal_uInt16 nSize ) mpImplPolygon = static_cast<ImplPolygon*>(&aStaticImplPolygon); } -Polygon::Polygon( sal_uInt16 nPoints, const Point* pPtAry, const sal_uInt8* pFlagAry ) +Polygon::Polygon( sal_uInt16 nPoints, const Point* pPtAry, const PolyFlags* pFlagAry ) { - if( nPoints ) mpImplPolygon = new ImplPolygon( nPoints, pPtAry, pFlagAry ); else @@ -798,7 +797,7 @@ const Point* Polygon::GetConstPointAry() const return mpImplPolygon->mpPointAry; } -const sal_uInt8* Polygon::GetConstFlagAry() const +const PolyFlags* Polygon::GetConstFlagAry() const { return mpImplPolygon->mpFlagAry; } @@ -818,12 +817,12 @@ void Polygon::SetFlags( sal_uInt16 nPos, PolyFlags eFlags ) "Polygon::SetFlags(): nPos >= nPoints" ); // we do only want to create the flag array if there - // is at least one flag different to POLY_NORMAL - if ( eFlags != POLY_NORMAL ) + // is at least one flag different to PolyFlags::Normal + if ( eFlags != PolyFlags::Normal ) { ImplMakeUnique(); mpImplPolygon->ImplCreateFlagArray(); - mpImplPolygon->mpFlagAry[ nPos ] = (sal_uInt8) eFlags; + mpImplPolygon->mpFlagAry[ nPos ] = eFlags; } } @@ -841,7 +840,7 @@ PolyFlags Polygon::GetFlags( sal_uInt16 nPos ) const "Polygon::GetFlags(): nPos >= nPoints" ); return( mpImplPolygon->mpFlagAry ? (PolyFlags) mpImplPolygon->mpFlagAry[ nPos ] : - POLY_NORMAL ); + PolyFlags::Normal ); } bool Polygon::HasFlags() const @@ -1083,13 +1082,13 @@ void Polygon::AdaptiveSubdivide( Polygon& rResult, const double d ) const { if( ( i + 3 ) < nPts ) { - sal_uInt8 P1( mpImplPolygon->mpFlagAry[ i ] ); - sal_uInt8 P4( mpImplPolygon->mpFlagAry[ i + 3 ] ); + PolyFlags P1( mpImplPolygon->mpFlagAry[ i ] ); + PolyFlags P4( mpImplPolygon->mpFlagAry[ i + 3 ] ); - if( ( POLY_NORMAL == P1 || POLY_SMOOTH == P1 || POLY_SYMMTR == P1 ) && - ( POLY_CONTROL == mpImplPolygon->mpFlagAry[ i + 1 ] ) && - ( POLY_CONTROL == mpImplPolygon->mpFlagAry[ i + 2 ] ) && - ( POLY_NORMAL == P4 || POLY_SMOOTH == P4 || POLY_SYMMTR == P4 ) ) + if( ( PolyFlags::Normal == P1 || PolyFlags::Smooth == P1 || PolyFlags::Symmetric == P1 ) && + ( PolyFlags::Control == mpImplPolygon->mpFlagAry[ i + 1 ] ) && + ( PolyFlags::Control == mpImplPolygon->mpFlagAry[ i + 2 ] ) && + ( PolyFlags::Normal == P4 || PolyFlags::Smooth == P4 || PolyFlags::Symmetric == P4 ) ) { ImplAdaptiveSubdivide( aPointIter, d*d+1.0, 0, d*d, mpImplPolygon->mpPointAry[ i ].X(), mpImplPolygon->mpPointAry[ i ].Y(), @@ -1653,7 +1652,7 @@ void Polygon::ImplRead( SvStream& rIStream ) if ( bHasPolyFlags ) { - mpImplPolygon->mpFlagAry = new sal_uInt8[ mpImplPolygon->mnPoints ]; + mpImplPolygon->mpFlagAry = new PolyFlags[ mpImplPolygon->mnPoints ]; rIStream.ReadBytes(mpImplPolygon->mpFlagAry, mpImplPolygon->mnPoints); } } @@ -1683,12 +1682,12 @@ void Polygon::Write( SvStream& rOStream ) const } // #i74631#/#i115917# numerical correction method for B2DPolygon -void impCorrectContinuity(basegfx::B2DPolygon& roPolygon, sal_uInt32 nIndex, sal_uInt8 nCFlag) +void impCorrectContinuity(basegfx::B2DPolygon& roPolygon, sal_uInt32 nIndex, PolyFlags nCFlag) { const sal_uInt32 nPointCount(roPolygon.count()); OSL_ENSURE(nIndex < nPointCount, "impCorrectContinuity: index access out of range (!)"); - if(nIndex < nPointCount && (POLY_SMOOTH == nCFlag || POLY_SYMMTR == nCFlag)) + if(nIndex < nPointCount && (PolyFlags::Smooth == nCFlag || PolyFlags::Symmetric == nCFlag)) { if(roPolygon.isPrevControlPointUsed(nIndex) && roPolygon.isNextControlPointUsed(nIndex)) { @@ -1718,14 +1717,14 @@ void impCorrectContinuity(basegfx::B2DPolygon& roPolygon, sal_uInt32 nIndex, sal // calculate common direction vector, normalize const basegfx::B2DVector aDirection(aNext + aPrev); - if(POLY_SMOOTH == nCFlag) + if(PolyFlags::Smooth == nCFlag) { // C1: apply common direction vector, preserve individual lengths const double fInvDirectionLen(1.0 / aDirection.getLength()); roPolygon.setNextControlPoint(nIndex, basegfx::B2DPoint(aPoint + (aDirection * (aNext.getLength() * fInvDirectionLen)))); roPolygon.setPrevControlPoint(nIndex, basegfx::B2DPoint(aPoint - (aDirection * (aPrev.getLength() * fInvDirectionLen)))); } - else // POLY_SYMMTR + else // PolyFlags::Symmetric { // C2: get mediated length. Taking half of the unnormalized direction would be // an approximation, but not correct. @@ -1752,7 +1751,7 @@ basegfx::B2DPolygon Polygon::getB2DPolygon() const { // handling for curves. Add start point const Point aStartPoint(mpImplPolygon->mpPointAry[0]); - sal_uInt8 nPointFlag(mpImplPolygon->mpFlagAry[0]); + PolyFlags nPointFlag(mpImplPolygon->mpFlagAry[0]); aRetval.append(basegfx::B2DPoint(aStartPoint.X(), aStartPoint.Y())); Point aControlA, aControlB; @@ -1761,13 +1760,13 @@ basegfx::B2DPolygon Polygon::getB2DPolygon() const bool bControlA(false); bool bControlB(false); - if(POLY_CONTROL == mpImplPolygon->mpFlagAry[a]) + if(PolyFlags::Control == mpImplPolygon->mpFlagAry[a]) { aControlA = mpImplPolygon->mpPointAry[a++]; bControlA = true; } - if(a < nCount && POLY_CONTROL == mpImplPolygon->mpFlagAry[a]) + if(a < nCount && PolyFlags::Control == mpImplPolygon->mpFlagAry[a]) { aControlB = mpImplPolygon->mpPointAry[a++]; bControlB = true; @@ -1871,7 +1870,7 @@ Polygon::Polygon(const basegfx::B2DPolygon& rPolygon) const Point aStartPoint(FRound(aBezier.getStartPoint().getX()), FRound(aBezier.getStartPoint().getY())); const sal_uInt32 nStartPointIndex(nArrayInsert); mpImplPolygon->mpPointAry[nStartPointIndex] = aStartPoint; - mpImplPolygon->mpFlagAry[nStartPointIndex] = (sal_uInt8)POLY_NORMAL; + mpImplPolygon->mpFlagAry[nStartPointIndex] = PolyFlags::Normal; nArrayInsert++; // prepare next segment @@ -1884,11 +1883,11 @@ Polygon::Polygon(const basegfx::B2DPolygon& rPolygon) { // if one is used, add always two control points due to the old schema mpImplPolygon->mpPointAry[nArrayInsert] = Point(FRound(aBezier.getControlPointA().getX()), FRound(aBezier.getControlPointA().getY())); - mpImplPolygon->mpFlagAry[nArrayInsert] = (sal_uInt8)POLY_CONTROL; + mpImplPolygon->mpFlagAry[nArrayInsert] = PolyFlags::Control; nArrayInsert++; mpImplPolygon->mpPointAry[nArrayInsert] = Point(FRound(aBezier.getControlPointB().getX()), FRound(aBezier.getControlPointB().getY())); - mpImplPolygon->mpFlagAry[nArrayInsert] = (sal_uInt8)POLY_CONTROL; + mpImplPolygon->mpFlagAry[nArrayInsert] = PolyFlags::Control; nArrayInsert++; } @@ -1899,11 +1898,11 @@ Polygon::Polygon(const basegfx::B2DPolygon& rPolygon) if(basegfx::B2VectorContinuity::C1 == eCont) { - mpImplPolygon->mpFlagAry[nStartPointIndex] = (sal_uInt8)POLY_SMOOTH; + mpImplPolygon->mpFlagAry[nStartPointIndex] = PolyFlags::Smooth; } else if(basegfx::B2VectorContinuity::C2 == eCont) { - mpImplPolygon->mpFlagAry[nStartPointIndex] = (sal_uInt8)POLY_SYMMTR; + mpImplPolygon->mpFlagAry[nStartPointIndex] = PolyFlags::Symmetric; } } @@ -1915,7 +1914,7 @@ Polygon::Polygon(const basegfx::B2DPolygon& rPolygon) { // add first point again as closing point due to old definition mpImplPolygon->mpPointAry[nArrayInsert] = mpImplPolygon->mpPointAry[0]; - mpImplPolygon->mpFlagAry[nArrayInsert] = (sal_uInt8)POLY_NORMAL; + mpImplPolygon->mpFlagAry[nArrayInsert] = PolyFlags::Normal; nArrayInsert++; } else @@ -1924,7 +1923,7 @@ Polygon::Polygon(const basegfx::B2DPolygon& rPolygon) const basegfx::B2DPoint aClosingPoint(rPolygon.getB2DPoint(nB2DLocalCount - 1L)); const Point aEnd(FRound(aClosingPoint.getX()), FRound(aClosingPoint.getY())); mpImplPolygon->mpPointAry[nArrayInsert] = aEnd; - mpImplPolygon->mpFlagAry[nArrayInsert] = (sal_uInt8)POLY_NORMAL; + mpImplPolygon->mpFlagAry[nArrayInsert] = PolyFlags::Normal; nArrayInsert++; } diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx index 3f4a042e3d2e..de5596f1cf13 100644 --- a/vcl/headless/svpgdi.cxx +++ b/vcl/headless/svpgdi.cxx @@ -814,7 +814,7 @@ bool SvpSalGraphics::drawPolyLine( bool SvpSalGraphics::drawPolyLineBezier( sal_uInt32, const SalPoint*, - const sal_uInt8* ) + const PolyFlags* ) { SAL_INFO("vcl.gdi", "unsupported SvpSalGraphics::drawPolyLineBezier case"); return false; @@ -822,7 +822,7 @@ bool SvpSalGraphics::drawPolyLineBezier( sal_uInt32, bool SvpSalGraphics::drawPolygonBezier( sal_uInt32, const SalPoint*, - const sal_uInt8* ) + const PolyFlags* ) { SAL_INFO("vcl.gdi", "unsupported SvpSalGraphics::drawPolygonBezier case"); return false; @@ -831,7 +831,7 @@ bool SvpSalGraphics::drawPolygonBezier( sal_uInt32, bool SvpSalGraphics::drawPolyPolygonBezier( sal_uInt32, const sal_uInt32*, const SalPoint* const*, - const sal_uInt8* const* ) + const PolyFlags* const* ) { SAL_INFO("vcl.gdi", "unsupported SvpSalGraphics::drawPolyPolygonBezier case"); return false; diff --git a/vcl/inc/headless/svpgdi.hxx b/vcl/inc/headless/svpgdi.hxx index ad6e4bfb9969..a8f33621643b 100644 --- a/vcl/inc/headless/svpgdi.hxx +++ b/vcl/inc/headless/svpgdi.hxx @@ -182,14 +182,14 @@ public: PCONSTSALPOINT* pPtAry ) override; virtual bool drawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, - const sal_uInt8* pFlgAry ) override; + const PolyFlags* pFlgAry ) override; virtual bool drawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, - const sal_uInt8* pFlgAry ) override; + const PolyFlags* pFlgAry ) override; virtual bool drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, - const sal_uInt8* const* pFlgAry ) override; + const PolyFlags* const* pFlgAry ) override; virtual bool drawGradient( const tools::PolyPolygon&, const Gradient& ) override { return false; }; virtual void copyArea( long nDestX, diff --git a/vcl/inc/openglgdiimpl.hxx b/vcl/inc/openglgdiimpl.hxx index 1457004e9ddc..ea79b6cb82e8 100644 --- a/vcl/inc/openglgdiimpl.hxx +++ b/vcl/inc/openglgdiimpl.hxx @@ -260,18 +260,18 @@ public: virtual bool drawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, - const sal_uInt8* pFlgAry ) override; + const PolyFlags* pFlgAry ) override; virtual bool drawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, - const sal_uInt8* pFlgAry ) override; + const PolyFlags* pFlgAry ) override; virtual bool drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, - const sal_uInt8* const* pFlgAry ) override; + const PolyFlags* const* pFlgAry ) override; // CopyArea --> No RasterOp, but ClipRegion virtual void copyArea( diff --git a/vcl/inc/quartz/salgdi.h b/vcl/inc/quartz/salgdi.h index 382641e68776..6ea5bf3e444c 100644 --- a/vcl/inc/quartz/salgdi.h +++ b/vcl/inc/quartz/salgdi.h @@ -232,9 +232,9 @@ public: virtual void drawPolygon( sal_uInt32 nPoints, const SalPoint* pPtAry ) override; virtual void drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints, PCONSTSALPOINT* pPtAry ) override; virtual bool drawPolyPolygon( const basegfx::B2DPolyPolygon&, double fTransparency ) override; - virtual bool drawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry ) override; - virtual bool drawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry ) override; - virtual bool drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, const sal_uInt8* const* pFlgAry ) override; + virtual bool drawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const PolyFlags* pFlgAry ) override; + virtual bool drawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const PolyFlags* pFlgAry ) override; + virtual bool drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, const PolyFlags* const* pFlgAry ) override; virtual bool drawPolyLine( const basegfx::B2DPolygon&, double fTransparency, diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx index 13e5e716be3f..ef228fa865b6 100644 --- a/vcl/inc/salgdi.hxx +++ b/vcl/inc/salgdi.hxx @@ -252,20 +252,20 @@ public: bool DrawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, - const sal_uInt8* pFlgAry, + const PolyFlags* pFlgAry, const OutputDevice *pOutDev ); bool DrawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, - const sal_uInt8* pFlgAry, + const PolyFlags* pFlgAry, const OutputDevice *pOutDev ); bool DrawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, - const sal_uInt8* const* pFlgAry, + const PolyFlags* const* pFlgAry, const OutputDevice *pOutDev ); bool DrawGradient( @@ -449,18 +449,18 @@ protected: virtual bool drawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, - const sal_uInt8* pFlgAry ) = 0; + const PolyFlags* pFlgAry ) = 0; virtual bool drawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, - const sal_uInt8* pFlgAry ) = 0; + const PolyFlags* pFlgAry ) = 0; virtual bool drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, - const sal_uInt8* const* pFlgAry ) = 0; + const PolyFlags* const* pFlgAry ) = 0; virtual bool drawGradient( diff --git a/vcl/inc/salgdiimpl.hxx b/vcl/inc/salgdiimpl.hxx index 35ce26b351ce..1771afaeaee8 100644 --- a/vcl/inc/salgdiimpl.hxx +++ b/vcl/inc/salgdiimpl.hxx @@ -24,6 +24,7 @@ #include <rtl/ustring.hxx> +#include <tools/poly.hxx> #include <tools/solar.h> #include <vcl/salgtype.hxx> @@ -111,18 +112,18 @@ public: virtual bool drawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, - const sal_uInt8* pFlgAry ) = 0; + const PolyFlags* pFlgAry ) = 0; virtual bool drawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, - const sal_uInt8* pFlgAry ) = 0; + const PolyFlags* pFlgAry ) = 0; virtual bool drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, - const sal_uInt8* const* pFlgAry ) = 0; + const PolyFlags* const* pFlgAry ) = 0; // CopyArea --> No RasterOp, but ClipRegion virtual void copyArea( diff --git a/vcl/inc/unx/genpspgraphics.h b/vcl/inc/unx/genpspgraphics.h index 71bd81fbe804..1dcb7ab18be3 100644 --- a/vcl/inc/unx/genpspgraphics.h +++ b/vcl/inc/unx/genpspgraphics.h @@ -139,14 +139,14 @@ public: double fMiterMinimumAngle) override; virtual bool drawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, - const sal_uInt8* pFlgAry ) override; + const PolyFlags* pFlgAry ) override; virtual bool drawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, - const sal_uInt8* pFlgAry ) override; + const PolyFlags* pFlgAry ) override; virtual bool drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, - const sal_uInt8* const* pFlgAry ) override; + const PolyFlags* const* pFlgAry ) override; virtual bool drawGradient( const tools::PolyPolygon&, const Gradient& ) override { return false; }; virtual void copyArea( long nDestX, diff --git a/vcl/inc/unx/printergfx.hxx b/vcl/inc/unx/printergfx.hxx index 7f8a7354b96c..871469e8d567 100644 --- a/vcl/inc/unx/printergfx.hxx +++ b/vcl/inc/unx/printergfx.hxx @@ -300,14 +300,14 @@ public: const Point** pPolygonList); void DrawPolyLineBezier (sal_uInt32 nPoints, const Point* pPath, - const sal_uInt8* pFlgAry ); + const PolyFlags* pFlgAry ); void DrawPolygonBezier (sal_uInt32 nPoints, const Point* pPath, - const sal_uInt8* pFlgAry); + const PolyFlags* pFlgAry); void DrawPolyPolygonBezier (sal_uInt32 nPoly, const sal_uInt32* pPoints, const Point* const* pPtAry, - const sal_uInt8* const* pFlgAry); + const PolyFlags* const* pFlgAry); // eps bool DrawEPS ( const Rectangle& rBoundingBox, void* pPtr, sal_uInt32 nSize); diff --git a/vcl/inc/unx/salgdi.h b/vcl/inc/unx/salgdi.h index 27b0c8436c3c..b3de804c5089 100644 --- a/vcl/inc/unx/salgdi.h +++ b/vcl/inc/unx/salgdi.h @@ -174,18 +174,18 @@ public: virtual bool drawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, - const sal_uInt8* pFlgAry ) override; + const PolyFlags* pFlgAry ) override; virtual bool drawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, - const sal_uInt8* pFlgAry ) override; + const PolyFlags* pFlgAry ) override; virtual bool drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, - const sal_uInt8* const* pFlgAry ) override; + const PolyFlags* const* pFlgAry ) override; #endif virtual void copyArea( diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h index d3a7185877f0..198c61c3ce3e 100644 --- a/vcl/inc/win/salgdi.h +++ b/vcl/inc/win/salgdi.h @@ -237,9 +237,9 @@ protected: basegfx::B2DLineJoin, css::drawing::LineCap, double fMiterMinimumAngle) override; - virtual bool drawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry ) override; - virtual bool drawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry ) override; - virtual bool drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, const BYTE* const* pFlgAry ) override; + virtual bool drawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const PolyFlags* pFlgAry ) override; + virtual bool drawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const PolyFlags* pFlgAry ) override; + virtual bool drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, const PolyFlags* const* pFlgAry ) override; virtual bool drawGradient( const tools::PolyPolygon&, const Gradient& ) override { return false; }; // CopyArea --> No RasterOp, but ClipRegion diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx index 006b5c620453..61fb63df8fd7 100644 --- a/vcl/opengl/gdiimpl.cxx +++ b/vcl/opengl/gdiimpl.cxx @@ -1608,7 +1608,7 @@ bool OpenGLSalGraphicsImpl::drawPolyLine(const basegfx::B2DPolygon& rPolygon, do bool OpenGLSalGraphicsImpl::drawPolyLineBezier( sal_uInt32 /*nPoints*/, const SalPoint* /*pPtAry*/, - const sal_uInt8* /*pFlgAry*/ ) + const PolyFlags* /*pFlgAry*/ ) { return false; } @@ -1616,7 +1616,7 @@ bool OpenGLSalGraphicsImpl::drawPolyLineBezier( bool OpenGLSalGraphicsImpl::drawPolygonBezier( sal_uInt32 /*nPoints*/, const SalPoint* /*pPtAry*/, - const sal_uInt8* /*pFlgAry*/ ) + const PolyFlags* /*pFlgAry*/ ) { return false; } @@ -1625,7 +1625,7 @@ bool OpenGLSalGraphicsImpl::drawPolyPolygonBezier( sal_uInt32 /*nPoly*/, const sal_uInt32* /*pPoints*/, const SalPoint* const* /*pPtAry*/, - const sal_uInt8* const* /*pFlgAry*/ ) + const PolyFlags* const* /*pFlgAry*/ ) { return false; } diff --git a/vcl/quartz/salgdicommon.cxx b/vcl/quartz/salgdicommon.cxx index d289e010e162..57a930ab4a41 100644 --- a/vcl/quartz/salgdicommon.cxx +++ b/vcl/quartz/salgdicommon.cxx @@ -1053,7 +1053,7 @@ bool AquaSalGraphics::drawPolyLine( const basegfx::B2DPolygon& rPolyLine, return true; } -bool AquaSalGraphics::drawPolyLineBezier( sal_uInt32, const SalPoint*, const sal_uInt8* ) +bool AquaSalGraphics::drawPolyLineBezier( sal_uInt32, const SalPoint*, const PolyFlags* ) { return false; } @@ -1349,13 +1349,13 @@ void AquaSalGraphics::drawPolygon( sal_uInt32 nPoints, const SalPoint *pPtAry ) DBG_DRAW_OPERATION_EXIT("drawPolygon"); } -bool AquaSalGraphics::drawPolygonBezier( sal_uInt32, const SalPoint*, const sal_uInt8* ) +bool AquaSalGraphics::drawPolygonBezier( sal_uInt32, const SalPoint*, const PolyFlags* ) { return false; } bool AquaSalGraphics::drawPolyPolygonBezier( sal_uInt32, const sal_uInt32*, - const SalPoint* const*, const sal_uInt8* const* ) + const SalPoint* const*, const PolyFlags* const* ) { return false; } diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx index 9b7afb04daff..947d1392e30f 100644 --- a/vcl/source/filter/wmf/emfwr.cxx +++ b/vcl/source/filter/wmf/emfwr.cxx @@ -715,7 +715,7 @@ void EMFWriter::ImplWritePath( const tools::PolyPolygon& rPolyPoly, bool bClosed sal_uInt16 nBezPoints = 0; - while ( ( ( nBezPoints + n + 2 ) < rPoly.GetSize() ) && ( rPoly.GetFlags( nBezPoints + n ) == POLY_CONTROL ) ) + while ( ( ( nBezPoints + n + 2 ) < rPoly.GetSize() ) && ( rPoly.GetFlags( nBezPoints + n ) == PolyFlags::Control ) ) nBezPoints += 3; if ( nBezPoints ) @@ -735,7 +735,7 @@ void EMFWriter::ImplWritePath( const tools::PolyPolygon& rPolyPoly, bool bClosed else { sal_uInt16 nPoints = 1; - while( ( nPoints + n ) < rPoly.GetSize() && ( rPoly.GetFlags( nPoints + n ) != POLY_CONTROL ) ) + while( ( nPoints + n ) < rPoly.GetSize() && ( rPoly.GetFlags( nPoints + n ) != PolyFlags::Control ) ) nPoints++; if ( nPoints > 1 ) diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx index d855a2971bfe..c318956d40d9 100644 --- a/vcl/source/filter/wmf/winmtf.cxx +++ b/vcl/source/filter/wmf/winmtf.cxx @@ -1334,9 +1334,9 @@ void WinMtfOutput::DrawPolyBezier( tools::Polygon& rPolygon, bool bTo, bool bRec sal_uInt16 i; for ( i = 0; ( i + 2 ) < nPoints; ) { - rPolygon.SetFlags( i++, POLY_NORMAL ); - rPolygon.SetFlags( i++, POLY_CONTROL ); - rPolygon.SetFlags( i++, POLY_CONTROL ); + rPolygon.SetFlags( i++, PolyFlags::Normal ); + rPolygon.SetFlags( i++, PolyFlags::Control ); + rPolygon.SetFlags( i++, PolyFlags::Control ); } if ( bRecordPath ) aPathObj.AddPolyLine( rPolygon ); diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 01d60bb8080f..d7544287cd80 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -1440,15 +1440,15 @@ void PDFWriterImpl::PDFPage::appendPolygon( const tools::Polygon& rPoly, OString sal_uInt32 nBufLen = rBuffer.getLength(); if( nPoints > 0 ) { - const sal_uInt8* pFlagArray = rPoly.GetConstFlagAry(); + const PolyFlags* pFlagArray = rPoly.GetConstFlagAry(); appendPoint( rPoly[0], rBuffer ); rBuffer.append( " m\n" ); for( sal_uInt16 i = 1; i < nPoints; i++ ) { - if( pFlagArray && pFlagArray[i] == POLY_CONTROL && nPoints-i > 2 ) + if( pFlagArray && pFlagArray[i] == PolyFlags::Control && nPoints-i > 2 ) { // bezier - SAL_WARN_IF( pFlagArray[i+1] != POLY_CONTROL || pFlagArray[i+2] == POLY_CONTROL, "vcl", "unexpected sequence of control points" ); + SAL_WARN_IF( pFlagArray[i+1] != PolyFlags::Control || pFlagArray[i+2] == PolyFlags::Control, "vcl", "unexpected sequence of control points" ); appendPoint( rPoly[i], rBuffer ); rBuffer.append( " " ); appendPoint( rPoly[i+1], rBuffer ); diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx index 84e0ed4443ba..8afd8b70cdc0 100644 --- a/vcl/source/gdi/pdfwriter_impl2.cxx +++ b/vcl/source/gdi/pdfwriter_impl2.cxx @@ -628,9 +628,9 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa for(sal_uInt16 a(0); a + 1 < nPoints; a++) { if(bCurve - && POLY_NORMAL != aPath.GetFlags(a + 1) + && PolyFlags::Normal != aPath.GetFlags(a + 1) && a + 2 < nPoints - && POLY_NORMAL != aPath.GetFlags(a + 2) + && PolyFlags::Normal != aPath.GetFlags(a + 2) && a + 3 < nPoints) { const tools::Polygon aSnippet(4, diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx index 4d0746fd2107..28e19b083fc3 100644 --- a/vcl/source/gdi/salgdilayout.cxx +++ b/vcl/source/gdi/salgdilayout.cxx @@ -422,7 +422,7 @@ bool SalGraphics::DrawPolyPolygon( const basegfx::B2DPolyPolygon& i_rPolyPolygon return bRet; } -bool SalGraphics::DrawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry, const OutputDevice* pOutDev ) +bool SalGraphics::DrawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const PolyFlags* pFlgAry, const OutputDevice* pOutDev ) { bool bResult = false; if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && pOutDev->IsRTLEnabled()) ) @@ -436,7 +436,7 @@ bool SalGraphics::DrawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry return bResult; } -bool SalGraphics::DrawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry, const OutputDevice* pOutDev ) +bool SalGraphics::DrawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const PolyFlags* pFlgAry, const OutputDevice* pOutDev ) { bool bResult = false; if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && pOutDev->IsRTLEnabled()) ) @@ -451,7 +451,7 @@ bool SalGraphics::DrawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, } bool SalGraphics::DrawPolyPolygonBezier( sal_uInt32 i_nPoly, const sal_uInt32* i_pPoints, - const SalPoint* const* i_pPtAry, const sal_uInt8* const* i_pFlgAry, const OutputDevice* i_pOutDev ) + const SalPoint* const* i_pPtAry, const PolyFlags* const* i_pFlgAry, const OutputDevice* i_pOutDev ) { bool bRet = false; if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (i_pOutDev && i_pOutDev->IsRTLEnabled()) ) diff --git a/vcl/source/gdi/svmconverter.cxx b/vcl/source/gdi/svmconverter.cxx index 6c6790352333..2eb763093c25 100644 --- a/vcl/source/gdi/svmconverter.cxx +++ b/vcl/source/gdi/svmconverter.cxx @@ -376,7 +376,7 @@ bool ImplWriteExtendedPolyPolygonAction(SvStream& rOStm, const tools::PolyPolygo for(sal_uInt16 c(0); c < nPointCount; c++) { - rOStm.WriteUChar( rCandidate.GetFlags(c) ); + rOStm.WriteUChar( (sal_uInt8)rCandidate.GetFlags(c) ); } } else diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx index 5763c8ec5c14..9b0a5ddc4823 100644 --- a/vcl/source/outdev/font.cxx +++ b/vcl/source/outdev/font.cxx @@ -292,9 +292,16 @@ void OutputDevice::ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPo FontEmphasisMark eEmphasis, long nHeight, short /*nOrient*/ ) { - static const sal_uInt8 aAccentPolyFlags[24] = + static const PolyFlags aAccentPolyFlags[24] = { - 0, 2, 2, 0, 2, 2, 0, 2, 2, 0, 2, 2, 0, 2, 2, 0, 2, 2, 0, 0, 2, 0, 2, 2 + PolyFlags::Normal, PolyFlags::Control, PolyFlags::Control, + PolyFlags::Normal, PolyFlags::Control, PolyFlags::Control, + PolyFlags::Normal, PolyFlags::Control, PolyFlags::Control, + PolyFlags::Normal, PolyFlags::Control, PolyFlags::Control, + PolyFlags::Normal, PolyFlags::Control, PolyFlags::Control, + PolyFlags::Normal, PolyFlags::Control, PolyFlags::Control, + PolyFlags::Normal, PolyFlags::Normal, PolyFlags::Control, + PolyFlags::Normal, PolyFlags::Control, PolyFlags::Control }; static const long aAccentPos[48] = diff --git a/vcl/source/outdev/polygon.cxx b/vcl/source/outdev/polygon.cxx index 76d9ec6e6963..e20caaf28d86 100644 --- a/vcl/source/outdev/polygon.cxx +++ b/vcl/source/outdev/polygon.cxx @@ -226,7 +226,7 @@ void OutputDevice::DrawPolygon( const tools::Polygon& rPoly ) // #100127# Forward beziers to sal, if any if( aPoly.HasFlags() ) { - const sal_uInt8* pFlgAry = aPoly.GetConstFlagAry(); + const PolyFlags* pFlgAry = aPoly.GetConstFlagAry(); if( !mpGraphics->DrawPolygonBezier( nPoints, pPtAry, pFlgAry, this ) ) { aPoly = tools::Polygon::SubdivideBezier(aPoly); @@ -339,10 +339,10 @@ void OutputDevice::ImplDrawPolyPolygon( sal_uInt16 nPoly, const tools::PolyPolyg sal_uInt32 aStackAry1[OUTDEV_POLYPOLY_STACKBUF]; PCONSTSALPOINT aStackAry2[OUTDEV_POLYPOLY_STACKBUF]; - sal_uInt8* aStackAry3[OUTDEV_POLYPOLY_STACKBUF]; + PolyFlags* aStackAry3[OUTDEV_POLYPOLY_STACKBUF]; sal_uInt32* pPointAry; - PCONSTSALPOINT* pPointAryAry; - const sal_uInt8** pFlagAryAry; + PCONSTSALPOINT* pPointAryAry; + const PolyFlags** pFlagAryAry; sal_uInt16 i = 0; sal_uInt16 j = 0; sal_uInt16 last = 0; @@ -351,13 +351,13 @@ void OutputDevice::ImplDrawPolyPolygon( sal_uInt16 nPoly, const tools::PolyPolyg { pPointAry = new sal_uInt32[nPoly]; pPointAryAry = new PCONSTSALPOINT[nPoly]; - pFlagAryAry = new const sal_uInt8*[nPoly]; + pFlagAryAry = new const PolyFlags*[nPoly]; } else { pPointAry = aStackAry1; pPointAryAry = aStackAry2; - pFlagAryAry = const_cast<const sal_uInt8**>(aStackAry3); + pFlagAryAry = const_cast<const PolyFlags**>(aStackAry3); } do diff --git a/vcl/source/outdev/polyline.cxx b/vcl/source/outdev/polyline.cxx index b3e47804ef75..c69621b9ae37 100644 --- a/vcl/source/outdev/polyline.cxx +++ b/vcl/source/outdev/polyline.cxx @@ -91,7 +91,7 @@ void OutputDevice::DrawPolyLine( const tools::Polygon& rPoly ) // #100127# Forward beziers to sal, if any if( aPoly.HasFlags() ) { - const sal_uInt8* pFlgAry = aPoly.GetConstFlagAry(); + const PolyFlags* pFlgAry = aPoly.GetConstFlagAry(); if( !mpGraphics->DrawPolyLineBezier( nPoints, pPtAry, pFlgAry, this ) ) { aPoly = tools::Polygon::SubdivideBezier(aPoly); diff --git a/vcl/unx/generic/gdi/gdiimpl.cxx b/vcl/unx/generic/gdi/gdiimpl.cxx index 4e367a62736d..134ef02faf85 100644 --- a/vcl/unx/generic/gdi/gdiimpl.cxx +++ b/vcl/unx/generic/gdi/gdiimpl.cxx @@ -1386,18 +1386,18 @@ void X11SalGraphicsImpl::drawPolyPolygon( sal_uInt32 nPoly, drawPolyLine( pPoints[i], pPtAry[i], true ); } -bool X11SalGraphicsImpl::drawPolyLineBezier( sal_uInt32, const SalPoint*, const sal_uInt8* ) +bool X11SalGraphicsImpl::drawPolyLineBezier( sal_uInt32, const SalPoint*, const PolyFlags* ) { return false; } -bool X11SalGraphicsImpl::drawPolygonBezier( sal_uInt32, const SalPoint*, const sal_uInt8* ) +bool X11SalGraphicsImpl::drawPolygonBezier( sal_uInt32, const SalPoint*, const PolyFlags* ) { return false; } bool X11SalGraphicsImpl::drawPolyPolygonBezier( sal_uInt32, const sal_uInt32*, - const SalPoint* const*, const sal_uInt8* const* ) + const SalPoint* const*, const PolyFlags* const* ) { return false; } diff --git a/vcl/unx/generic/gdi/gdiimpl.hxx b/vcl/unx/generic/gdi/gdiimpl.hxx index 84e5ee8c39ab..b277b9a885a4 100644 --- a/vcl/unx/generic/gdi/gdiimpl.hxx +++ b/vcl/unx/generic/gdi/gdiimpl.hxx @@ -170,18 +170,18 @@ public: virtual bool drawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, - const sal_uInt8* pFlgAry ) override; + const PolyFlags* pFlgAry ) override; virtual bool drawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, - const sal_uInt8* pFlgAry ) override; + const PolyFlags* pFlgAry ) override; virtual bool drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, - const sal_uInt8* const* pFlgAry ) override; + const PolyFlags* const* pFlgAry ) override; // CopyArea --> No RasterOp, but ClipRegion virtual void copyArea( diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx index 915ff3728c03..a7c7df80fc7b 100644 --- a/vcl/unx/generic/gdi/salgdi.cxx +++ b/vcl/unx/generic/gdi/salgdi.cxx @@ -448,18 +448,18 @@ void X11SalGraphics::drawPolyPolygon( sal_uInt32 nPoly, mxImpl->drawPolyPolygon( nPoly, pPoints, pPtAry ); } -bool X11SalGraphics::drawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry ) +bool X11SalGraphics::drawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const PolyFlags* pFlgAry ) { return mxImpl->drawPolyLineBezier( nPoints, pPtAry, pFlgAry ); } -bool X11SalGraphics::drawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry ) +bool X11SalGraphics::drawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const PolyFlags* pFlgAry ) { return mxImpl->drawPolygonBezier( nPoints, pPtAry, pFlgAry ); } bool X11SalGraphics::drawPolyPolygonBezier( sal_uInt32 nPoints, const sal_uInt32* pPoints, - const SalPoint* const* pPtAry, const sal_uInt8* const* pFlgAry) + const SalPoint* const* pPtAry, const PolyFlags* const* pFlgAry) { return mxImpl->drawPolyPolygonBezier( nPoints, pPoints, pPtAry, pFlgAry ); } diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx index 0d19d8269ee4..36b262fd3e29 100644 --- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx +++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx @@ -862,14 +862,14 @@ public: private: tools::PolyPolygon& mrPolyPoly; - Point* mpPointAry; - sal_uInt8* mpFlagAry; + Point* mpPointAry; + PolyFlags* mpFlagAry; - FT_Vector maPosition; + FT_Vector maPosition; sal_uInt16 mnMaxPoints; sal_uInt16 mnPoints; sal_uInt16 mnPoly; - bool bHasOffline; + bool bHasOffline; PolyArgs(const PolyArgs&) = delete; PolyArgs& operator=(const PolyArgs&) = delete; @@ -883,7 +883,7 @@ PolyArgs::PolyArgs( tools::PolyPolygon& rPolyPoly, sal_uInt16 nMaxPoints ) bHasOffline(false) { mpPointAry = new Point[ mnMaxPoints ]; - mpFlagAry = new sal_uInt8 [ mnMaxPoints ]; + mpFlagAry = new PolyFlags [ mnMaxPoints ]; maPosition.x = maPosition.y = 0; } @@ -903,7 +903,7 @@ void PolyArgs::AddPoint( long nX, long nY, PolyFlags aFlag ) maPosition.y = nY; mpPointAry[ mnPoints ] = Point( nX, nY ); mpFlagAry[ mnPoints++ ]= aFlag; - bHasOffline |= (aFlag != POLY_NORMAL); + bHasOffline |= (aFlag != PolyFlags::Normal); } void PolyArgs::ClosePolygon() @@ -916,8 +916,8 @@ void PolyArgs::ClosePolygon() SAL_WARN_IF( (mnPoints < 2), "vcl", "FTGlyphOutline: PolyFinishNum failed!" ); --mnPoints; SAL_WARN_IF( (mpPointAry[0]!=mpPointAry[mnPoints]), "vcl", "FTGlyphOutline: PolyFinishEq failed!" ); - SAL_WARN_IF( (mpFlagAry[0]!=POLY_NORMAL), "vcl", "FTGlyphOutline: PolyFinishFE failed!" ); - SAL_WARN_IF( (mpFlagAry[mnPoints]!=POLY_NORMAL), "vcl", "FTGlyphOutline: PolyFinishFS failed!" ); + SAL_WARN_IF( (mpFlagAry[0]!=PolyFlags::Normal), "vcl", "FTGlyphOutline: PolyFinishFE failed!" ); + SAL_WARN_IF( (mpFlagAry[mnPoints]!=PolyFlags::Normal), "vcl", "FTGlyphOutline: PolyFinishFS failed!" ); tools::Polygon aPoly( mnPoints, mpPointAry, (bHasOffline ? mpFlagAry : nullptr) ); @@ -928,11 +928,11 @@ void PolyArgs::ClosePolygon() // #i48298# // Now really duplicating the first point, to close or correct the // polygon. Also no longer duplicating the flags, but enforcing - // POLY_NORMAL for the newly added last point. + // PolyFlags::Normal for the newly added last point. const sal_uInt16 nPolySize(aPoly.GetSize()); if(nPolySize) { - if((aPoly.HasFlags() && POLY_CONTROL == aPoly.GetFlags(nPolySize - 1)) + if((aPoly.HasFlags() && PolyFlags::Control == aPoly.GetFlags(nPolySize - 1)) || (aPoly.GetPoint(nPolySize - 1) != aPoly.GetPoint(0))) { aPoly.SetSize(nPolySize + 1); @@ -940,7 +940,7 @@ void PolyArgs::ClosePolygon() if(aPoly.HasFlags()) { - aPoly.SetFlags(nPolySize, POLY_NORMAL); + aPoly.SetFlags(nPolySize, PolyFlags::Normal); } } } @@ -962,14 +962,14 @@ static int FT_move_to( const FT_Vector* p0, void* vpPolyArgs ) // move_to implies a new polygon => finish old polygon first rA.ClosePolygon(); - rA.AddPoint( p0->x, p0->y, POLY_NORMAL ); + rA.AddPoint( p0->x, p0->y, PolyFlags::Normal ); return 0; } static int FT_line_to( const FT_Vector* p1, void* vpPolyArgs ) { PolyArgs& rA = *static_cast<PolyArgs*>(vpPolyArgs); - rA.AddPoint( p1->x, p1->y, POLY_NORMAL ); + rA.AddPoint( p1->x, p1->y, PolyFlags::Normal ); return 0; } @@ -980,22 +980,22 @@ static int FT_conic_to( const FT_Vector* p1, const FT_Vector* p2, void* vpPolyAr // VCL's Polygon only knows cubic beziers const long nX1 = (2 * rA.GetPosX() + 4 * p1->x + 3) / 6; const long nY1 = (2 * rA.GetPosY() + 4 * p1->y + 3) / 6; - rA.AddPoint( nX1, nY1, POLY_CONTROL ); + rA.AddPoint( nX1, nY1, PolyFlags::Control ); const long nX2 = (2 * p2->x + 4 * p1->x + 3) / 6; const long nY2 = (2 * p2->y + 4 * p1->y + 3) / 6; - rA.AddPoint( nX2, nY2, POLY_CONTROL ); + rA.AddPoint( nX2, nY2, PolyFlags::Control ); - rA.AddPoint( p2->x, p2->y, POLY_NORMAL ); + rA.AddPoint( p2->x, p2->y, PolyFlags::Normal ); return 0; } static int FT_cubic_to( const FT_Vector* p1, const FT_Vector* p2, const FT_Vector* p3, void* vpPolyArgs ) { PolyArgs& rA = *static_cast<PolyArgs*>(vpPolyArgs); - rA.AddPoint( p1->x, p1->y, POLY_CONTROL ); - rA.AddPoint( p2->x, p2->y, POLY_CONTROL ); - rA.AddPoint( p3->x, p3->y, POLY_NORMAL ); + rA.AddPoint( p1->x, p1->y, PolyFlags::Control ); + rA.AddPoint( p2->x, p2->y, PolyFlags::Control ); + rA.AddPoint( p3->x, p3->y, PolyFlags::Normal ); return 0; } diff --git a/vcl/unx/generic/print/common_gfx.cxx b/vcl/unx/generic/print/common_gfx.cxx index b771073ed958..793bd3cc19c4 100644 --- a/vcl/unx/generic/print/common_gfx.cxx +++ b/vcl/unx/generic/print/common_gfx.cxx @@ -477,7 +477,7 @@ PrinterGfx::DrawPolyPolygon (sal_uInt32 nPoly, const sal_uInt32* pSizes, const P */ void -PrinterGfx::DrawPolyLineBezier (sal_uInt32 nPoints, const Point* pPath, const sal_uInt8* pFlgAry) +PrinterGfx::DrawPolyLineBezier (sal_uInt32 nPoints, const Point* pPath, const PolyFlags* pFlgAry) { const sal_uInt32 nBezString= 1024; sal_Char pString[nBezString]; @@ -496,7 +496,7 @@ PrinterGfx::DrawPolyLineBezier (sal_uInt32 nPoints, const Point* pPath, const sa // - a normal point followed by 2 control points and a normal point is a curve for (unsigned int i=1; i<nPoints;) { - if (pFlgAry[i] != POLY_CONTROL) //If the next point is a POLY_NORMAL, we're drawing a line + if (pFlgAry[i] != PolyFlags::Control) //If the next point is a PolyFlags::Normal, we're drawing a line { snprintf(pString, nBezString, "%li %li lineto\n", pPath[i].X(), pPath[i].Y()); i++; @@ -505,8 +505,8 @@ PrinterGfx::DrawPolyLineBezier (sal_uInt32 nPoints, const Point* pPath, const sa { if (i+2 >= nPoints) return; //Error: wrong sequence of contol/normal points somehow - if ((pFlgAry[i] == POLY_CONTROL) && (pFlgAry[i+1] == POLY_CONTROL) && - (pFlgAry[i+2] != POLY_CONTROL)) + if ((pFlgAry[i] == PolyFlags::Control) && (pFlgAry[i+1] == PolyFlags::Control) && + (pFlgAry[i+2] != PolyFlags::Control)) { snprintf(pString, nBezString, "%li %li %li %li %li %li curveto\n", pPath[i].X(), pPath[i].Y(), @@ -528,7 +528,7 @@ PrinterGfx::DrawPolyLineBezier (sal_uInt32 nPoints, const Point* pPath, const sa } void -PrinterGfx::DrawPolygonBezier (sal_uInt32 nPoints, const Point* pPath, const sal_uInt8* pFlgAry) +PrinterGfx::DrawPolygonBezier (sal_uInt32 nPoints, const Point* pPath, const PolyFlags* pFlgAry) { const sal_uInt32 nBezString = 1024; sal_Char pString[nBezString]; @@ -540,7 +540,7 @@ PrinterGfx::DrawPolygonBezier (sal_uInt32 nPoints, const Point* pPath, const sal WritePS(mpPageBody, pString); //Move to the starting point for the PolyPoygon for (unsigned int i=1; i < nPoints;) { - if (pFlgAry[i] != POLY_CONTROL) + if (pFlgAry[i] != PolyFlags::Control) { snprintf(pString, nBezString, "%li %li lineto\n", pPath[i].X(), pPath[i].Y()); WritePS(mpPageBody, pString); @@ -550,8 +550,8 @@ PrinterGfx::DrawPolygonBezier (sal_uInt32 nPoints, const Point* pPath, const sal { if (i+2 >= nPoints) return; //Error: wrong sequence of contol/normal points somehow - if ((pFlgAry[i] == POLY_CONTROL) && (pFlgAry[i+1] == POLY_CONTROL) && - (pFlgAry[i+2] != POLY_CONTROL)) + if ((pFlgAry[i] == PolyFlags::Control) && (pFlgAry[i+1] == PolyFlags::Control) && + (pFlgAry[i+2] != PolyFlags::Control)) { snprintf(pString, nBezString, "%li %li %li %li %li %li curveto\n", pPath[i].X(), pPath[i].Y(), @@ -584,7 +584,7 @@ PrinterGfx::DrawPolygonBezier (sal_uInt32 nPoints, const Point* pPath, const sal } void -PrinterGfx::DrawPolyPolygonBezier (sal_uInt32 nPoly, const sal_uInt32 * pPoints, const Point* const * pPtAry, const sal_uInt8* const* pFlgAry) +PrinterGfx::DrawPolyPolygonBezier (sal_uInt32 nPoly, const sal_uInt32 * pPoints, const Point* const * pPtAry, const PolyFlags* const* pFlgAry) { const sal_uInt32 nBezString = 1024; sal_Char pString[nBezString]; @@ -604,7 +604,7 @@ PrinterGfx::DrawPolyPolygonBezier (sal_uInt32 nPoly, const sal_uInt32 * pPoints, { // if no flag array exists for this polygon, then it must be a regular // polygon without beziers - if ( ! pFlgAry[i] || pFlgAry[i][j] != POLY_CONTROL) + if ( ! pFlgAry[i] || pFlgAry[i][j] != PolyFlags::Control) { snprintf(pString, nBezString, "%li %li lineto\n", pPtAry[i][j].X(), pPtAry[i][j].Y()); WritePS(mpPageBody, pString); @@ -614,7 +614,7 @@ PrinterGfx::DrawPolyPolygonBezier (sal_uInt32 nPoly, const sal_uInt32 * pPoints, { if (j+2 >= nPoints) break; //Error: wrong sequence of contol/normal points somehow - if ((pFlgAry[i][j] == POLY_CONTROL) && (pFlgAry[i][j+1] == POLY_CONTROL) && (pFlgAry[i][j+2] != POLY_CONTROL)) + if ((pFlgAry[i][j] == PolyFlags::Control) && (pFlgAry[i][j+1] == PolyFlags::Control) && (pFlgAry[i][j+2] != PolyFlags::Control)) { snprintf(pString, nBezString, "%li %li %li %li %li %li curveto\n", pPtAry[i][j].X(), pPtAry[i][j].Y(), diff --git a/vcl/unx/generic/print/genpspgraphics.cxx b/vcl/unx/generic/print/genpspgraphics.cxx index 37887685d2a9..b1e4435ba6f7 100644 --- a/vcl/unx/generic/print/genpspgraphics.cxx +++ b/vcl/unx/generic/print/genpspgraphics.cxx @@ -439,13 +439,13 @@ bool GenPspGraphics::drawPolyLine( return false; } -bool GenPspGraphics::drawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry ) +bool GenPspGraphics::drawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const PolyFlags* pFlgAry ) { m_pPrinterGfx->DrawPolyLineBezier (nPoints, reinterpret_cast<Point const *>(pPtAry), pFlgAry); return true; } -bool GenPspGraphics::drawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry ) +bool GenPspGraphics::drawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const PolyFlags* pFlgAry ) { m_pPrinterGfx->DrawPolygonBezier (nPoints, reinterpret_cast<Point const *>(pPtAry), pFlgAry); return true; @@ -454,7 +454,7 @@ bool GenPspGraphics::drawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtA bool GenPspGraphics::drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, - const sal_uInt8* const* pFlgAry ) + const PolyFlags* const* pFlgAry ) { // Point must be equal to SalPoint! see include/vcl/salgtype.hxx m_pPrinterGfx->DrawPolyPolygonBezier (nPoly, pPoints, reinterpret_cast<Point const * const *>(pPtAry), pFlgAry); diff --git a/vcl/win/gdi/gdiimpl.cxx b/vcl/win/gdi/gdiimpl.cxx index 82c03ff2fe44..9c054665d0c0 100644 --- a/vcl/win/gdi/gdiimpl.cxx +++ b/vcl/win/gdi/gdiimpl.cxx @@ -74,7 +74,7 @@ namespace { // #100127# draw an array of points which might also contain bezier control points -void ImplRenderPath( HDC hdc, sal_uLong nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ) +void ImplRenderPath( HDC hdc, sal_uLong nPoints, const SalPoint* pPtAry, const PolyFlags* pFlgAry ) { if( nPoints ) { @@ -88,7 +88,7 @@ void ImplRenderPath( HDC hdc, sal_uLong nPoints, const SalPoint* pPtAry, const B for( i=1; i<nPoints; ++i, ++pPtAry, ++pFlgAry ) { - if( *pFlgAry != POLY_CONTROL ) + if( *pFlgAry != PolyFlags::Control ) { LineTo( hdc, pPtAry->mnX, pPtAry->mnY ); } @@ -105,10 +105,10 @@ void ImplRenderPath( HDC hdc, sal_uLong nPoints, const SalPoint* pPtAry, const B // might also contain bezier control points for the PolyDraw() GDI method // Make sure pWinPointAry and pWinFlagAry are big enough void ImplPreparePolyDraw( bool bCloseFigures, - sal_uLong nPoly, + sal_uLong nPoly, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, - const BYTE* const* pFlgAry, + const PolyFlags* const* pFlgAry, POINT* pWinPointAry, BYTE* pWinFlagAry ) { @@ -116,7 +116,7 @@ void ImplPreparePolyDraw( bool bCloseFigures, for( nCurrPoly=0; nCurrPoly<nPoly; ++nCurrPoly ) { const POINT* pCurrPoint = reinterpret_cast<const POINT*>( *pPtAry++ ); - const BYTE* pCurrFlag = *pFlgAry++; + const PolyFlags* pCurrFlag = *pFlgAry++; const sal_uInt32 nCurrPoints = *pPoints++; const bool bHaveFlagArray( pCurrFlag ); sal_uLong nCurrPoint; @@ -134,11 +134,11 @@ void ImplPreparePolyDraw( bool bCloseFigures, if( bHaveFlagArray && ( nCurrPoint + 2 ) < nCurrPoints ) { - BYTE P4( pCurrFlag[ 2 ] ); + PolyFlags P4( pCurrFlag[ 2 ] ); - if( ( POLY_CONTROL == pCurrFlag[ 0 ] ) && - ( POLY_CONTROL == pCurrFlag[ 1 ] ) && - ( POLY_NORMAL == P4 || POLY_SMOOTH == P4 || POLY_SYMMTR == P4 ) ) + if( ( PolyFlags::Control == pCurrFlag[ 0 ] ) && + ( PolyFlags::Control == pCurrFlag[ 1 ] ) && + ( PolyFlags::Normal == P4 || PolyFlags::Smooth == P4 || PolyFlags::Symmetric == P4 ) ) { // control point one *pWinPointAry++ = *pCurrPoint++; @@ -1792,7 +1792,7 @@ void WinSalGraphicsImpl::drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pP delete [] pWinPointAryAry; } -bool WinSalGraphicsImpl::drawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ) +bool WinSalGraphicsImpl::drawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const PolyFlags* pFlgAry ) { static_assert( sizeof( POINT ) == sizeof( SalPoint ), "must be the same size" ); @@ -1801,7 +1801,7 @@ bool WinSalGraphicsImpl::drawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* return true; } -bool WinSalGraphicsImpl::drawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ) +bool WinSalGraphicsImpl::drawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const PolyFlags* pFlgAry ) { static_assert( sizeof( POINT ) == sizeof( SalPoint ), "must be the same size" ); @@ -1846,7 +1846,7 @@ bool WinSalGraphicsImpl::drawPolygonBezier( sal_uInt32 nPoints, const SalPoint* } bool WinSalGraphicsImpl::drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, - const SalPoint* const* pPtAry, const BYTE* const* pFlgAry ) + const SalPoint* const* pPtAry, const PolyFlags* const* pFlgAry ) { static_assert( sizeof( POINT ) == sizeof( SalPoint ), "must be the same size" ); @@ -1855,10 +1855,10 @@ bool WinSalGraphicsImpl::drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt for( nCurrPoly=0, nTotalPoints=0; nCurrPoly<nPoly; ++nCurrPoly ) nTotalPoints += *pCurrPoints++; - POINT aStackAry1[SAL_POLY_STACKBUF]; - BYTE aStackAry2[SAL_POLY_STACKBUF]; - POINT* pWinPointAry; - BYTE* pWinFlagAry; + POINT aStackAry1[SAL_POLY_STACKBUF]; + BYTE aStackAry2[SAL_POLY_STACKBUF]; + POINT* pWinPointAry; + BYTE* pWinFlagAry; if( nTotalPoints > SAL_POLY_STACKBUF ) { pWinPointAry = new POINT[ nTotalPoints ]; diff --git a/vcl/win/gdi/gdiimpl.hxx b/vcl/win/gdi/gdiimpl.hxx index f8f0ae4b1991..e8235c79f746 100644 --- a/vcl/win/gdi/gdiimpl.hxx +++ b/vcl/win/gdi/gdiimpl.hxx @@ -117,18 +117,18 @@ public: virtual bool drawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, - const sal_uInt8* pFlgAry ) override; + const PolyFlags* pFlgAry ) override; virtual bool drawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, - const sal_uInt8* pFlgAry ) override; + const PolyFlags* pFlgAry ) override; virtual bool drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, - const sal_uInt8* const* pFlgAry ) override; + const PolyFlags* const* pFlgAry ) override; // CopyArea --> No RasterOp, but ClipRegion virtual void copyArea( diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx index 301260477888..fef9bbf27723 100644 --- a/vcl/win/gdi/salfont.cxx +++ b/vcl/win/gdi/salfont.cxx @@ -1416,7 +1416,7 @@ bool WinSalGraphics::GetGlyphOutline( sal_GlyphId aGlyphId, // TODO: avoid tools polygon by creating B2DPolygon directly int nPtSize = 512; Point* pPoints = new Point[ nPtSize ]; - BYTE* pFlags = new BYTE[ nPtSize ]; + PolyFlags* pFlags = new PolyFlags[ nPtSize ]; TTPOLYGONHEADER* pHeader = reinterpret_cast<TTPOLYGONHEADER*>(pData); while( reinterpret_cast<BYTE*>(pHeader) < pData+nSize2 ) @@ -1432,7 +1432,7 @@ bool WinSalGraphics::GetGlyphOutline( sal_GlyphId aGlyphId, long nX = IntTimes256FromFixed( pHeader->pfxStart.x ); long nY = IntTimes256FromFixed( pHeader->pfxStart.y ); pPoints[ nPnt ] = Point( nX, nY ); - pFlags[ nPnt++ ] = POLY_NORMAL; + pFlags[ nPnt++ ] = PolyFlags::Normal; bool bHasOfflinePoints = false; TTPOLYCURVE* pCurve = reinterpret_cast<TTPOLYCURVE*>( pHeader + 1 ); @@ -1443,10 +1443,10 @@ bool WinSalGraphics::GetGlyphOutline( sal_GlyphId aGlyphId, if( nPtSize < nNeededSize ) { Point* pOldPoints = pPoints; - BYTE* pOldFlags = pFlags; + PolyFlags* pOldFlags = pFlags; nPtSize = 2 * nNeededSize; pPoints = new Point[ nPtSize ]; - pFlags = new BYTE[ nPtSize ]; + pFlags = new PolyFlags[ nPtSize ]; for( sal_uInt16 i = 0; i < nPnt; ++i ) { pPoints[ i ] = pOldPoints[ i ]; @@ -1465,7 +1465,7 @@ bool WinSalGraphics::GetGlyphOutline( sal_GlyphId aGlyphId, nY = IntTimes256FromFixed( pCurve->apfx[ i ].y ); ++i; pPoints[ nPnt ] = Point( nX, nY ); - pFlags[ nPnt ] = POLY_NORMAL; + pFlags[ nPnt ] = PolyFlags::Normal; ++nPnt; } } @@ -1485,7 +1485,7 @@ bool WinSalGraphics::GetGlyphOutline( sal_GlyphId aGlyphId, nX = pPoints[ nPnt-1 ].X() + 2 * aControlP.X(); nY = pPoints[ nPnt-1 ].Y() + 2 * aControlP.Y(); pPoints[ nPnt+0 ] = Point( (2*nX+3)/6, (2*nY+3)/6 ); - pFlags[ nPnt+0 ] = POLY_CONTROL; + pFlags[ nPnt+0 ] = PolyFlags::Control; // calculate endpoint of segment nX = IntTimes256FromFixed( pCurve->apfx[ i ].x ); @@ -1508,14 +1508,14 @@ bool WinSalGraphics::GetGlyphOutline( sal_GlyphId aGlyphId, } pPoints[ nPnt+2 ] = Point( nX, nY ); - pFlags[ nPnt+2 ] = POLY_NORMAL; + pFlags[ nPnt+2 ] = PolyFlags::Normal; // calculate second cubic control point // P1 = 1/3 * (PEnd + 2 * PQControl) nX = pPoints[ nPnt+2 ].X() + 2 * aControlP.X(); nY = pPoints[ nPnt+2 ].Y() + 2 * aControlP.Y(); pPoints[ nPnt+1 ] = Point( (2*nX+3)/6, (2*nY+3)/6 ); - pFlags[ nPnt+1 ] = POLY_CONTROL; + pFlags[ nPnt+1 ] = PolyFlags::Control; nPnt += 3; } diff --git a/vcl/win/gdi/salgdi.cxx b/vcl/win/gdi/salgdi.cxx index 4c63eeaade00..50cfdb771bd6 100644 --- a/vcl/win/gdi/salgdi.cxx +++ b/vcl/win/gdi/salgdi.cxx @@ -799,18 +799,18 @@ void WinSalGraphics::drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoint mpImpl->drawPolyPolygon( nPoly, pPoints, pPtAry ); } -bool WinSalGraphics::drawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ) +bool WinSalGraphics::drawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const PolyFlags* pFlgAry ) { return mpImpl->drawPolyLineBezier( nPoints, pPtAry, pFlgAry ); } -bool WinSalGraphics::drawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ) +bool WinSalGraphics::drawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const PolyFlags* pFlgAry ) { return mpImpl->drawPolygonBezier( nPoints, pPtAry, pFlgAry ); } bool WinSalGraphics::drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, - const SalPoint* const* pPtAry, const BYTE* const* pFlgAry ) + const SalPoint* const* pPtAry, const PolyFlags* const* pFlgAry ) { return mpImpl->drawPolyPolygonBezier( nPoly, pPoints, pPtAry, pFlgAry ); } |