diff options
Diffstat (limited to 'vcl')
31 files changed, 142 insertions, 134 deletions
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 ); } |