diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-06 11:45:37 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-05-07 09:19:16 +0000 |
commit | 220c9fc2e9fa8c83a1851e3f73682d8300f6dff1 (patch) | |
tree | 5d0eeba84bc1d69fb2bac1e9ce1cf8532d84a1fb /vcl | |
parent | 08967d36ba0da5bf85e52ff64f41732a12b37a2e (diff) |
convert BMP_VECTORIZE constants to scoped enum
Change-Id: Ifa6614f6a17356481a335a686e9ea0f9b983c5c5
Reviewed-on: https://gerrit.libreoffice.org/15647
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/bitmap3.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/impvect.cxx | 14 | ||||
-rw-r--r-- | vcl/source/gdi/impvect.hxx | 4 | ||||
-rw-r--r-- | vcl/source/outdev/text.cxx | 2 |
4 files changed, 12 insertions, 12 deletions
diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx index 4ed1aab1143f..9a656d60daa6 100644 --- a/vcl/source/gdi/bitmap3.cxx +++ b/vcl/source/gdi/bitmap3.cxx @@ -2445,12 +2445,12 @@ void Bitmap::ImplMedianCut( sal_uLong* pColBuf, BitmapPalette& rPal, } } -bool Bitmap::Vectorize( tools::PolyPolygon& rPolyPoly, sal_uLong nFlags, const Link<>* pProgress ) +bool Bitmap::Vectorize( tools::PolyPolygon& rPolyPoly, BmpVectorizeFlags nFlags, const Link<>* pProgress ) { return ImplVectorizer::ImplVectorize( *this, rPolyPoly, nFlags, pProgress ); } -bool Bitmap::Vectorize( GDIMetaFile& rMtf, sal_uInt8 cReduce, sal_uLong nFlags, const Link<>* pProgress ) +bool Bitmap::Vectorize( GDIMetaFile& rMtf, sal_uInt8 cReduce, BmpVectorizeFlags nFlags, const Link<>* pProgress ) { return ImplVectorizer::ImplVectorize( *this, rMtf, cReduce, nFlags, pProgress ); } diff --git a/vcl/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx index fb640216d483..166f0be37148 100644 --- a/vcl/source/gdi/impvect.cxx +++ b/vcl/source/gdi/impvect.cxx @@ -52,7 +52,7 @@ class ImplChain; namespace ImplVectorizer { ImplVectMap* ImplExpand( BitmapReadAccess* pRAcc, const Color& rColor ); - void ImplCalculate( ImplVectMap* pMap, tools::PolyPolygon& rPolyPoly, sal_uInt8 cReduce, sal_uLong nFlags ); + void ImplCalculate( ImplVectMap* pMap, tools::PolyPolygon& rPolyPoly, sal_uInt8 cReduce, BmpVectorizeFlags nFlags ); bool ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain ); bool ImplIsUp( ImplVectMap* pMap, long nY, long nX ); void ImplLimitPolyPoly( tools::PolyPolygon& rPolyPoly ); @@ -634,7 +634,7 @@ void ImplChain::ImplPostProcess( const ImplPointArray& rArr ) namespace ImplVectorizer { bool ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf, - sal_uInt8 cReduce, sal_uLong nFlags, const Link<>* pProgress ) + sal_uInt8 cReduce, BmpVectorizeFlags nFlags, const Link<>* pProgress ) { bool bRet = false; @@ -697,7 +697,7 @@ bool ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf, { ImplLimitPolyPoly( aPolyPoly ); - if( nFlags & BMP_VECTORIZE_REDUCE_EDGES ) + if( nFlags & BmpVectorizeFlags::ReduceEdges ) aPolyPoly.Optimize( PolyOptimizeFlags::EDGES ); if( aPolyPoly.Count() ) @@ -737,7 +737,7 @@ bool ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf, bool ImplVectorize( const Bitmap& rMonoBmp, tools::PolyPolygon& rPolyPoly, - sal_uLong nFlags, const Link<>* pProgress ) + BmpVectorizeFlags nFlags, const Link<>* pProgress ) { std::unique_ptr<Bitmap> xBmp(new Bitmap( rMonoBmp )); BitmapReadAccess* pRAcc; @@ -764,7 +764,7 @@ bool ImplVectorize( const Bitmap& rMonoBmp, xMap.reset(); ImplLimitPolyPoly( rPolyPoly ); - if( nFlags & BMP_VECTORIZE_REDUCE_EDGES ) + if( nFlags & BmpVectorizeFlags::ReduceEdges ) rPolyPoly.Optimize( PolyOptimizeFlags::EDGES ); // #i14895#:setting the correct direction for polygons @@ -948,7 +948,7 @@ ImplVectMap* ImplExpand( BitmapReadAccess* pRAcc, const Color& rColor ) return pMap; } -void ImplCalculate( ImplVectMap* pMap, tools::PolyPolygon& rPolyPoly, sal_uInt8 cReduce, sal_uLong nFlags ) +void ImplCalculate( ImplVectMap* pMap, tools::PolyPolygon& rPolyPoly, sal_uInt8 cReduce, BmpVectorizeFlags nFlags ) { const long nWidth = pMap->Width(), nHeight= pMap->Height(); @@ -976,7 +976,7 @@ void ImplCalculate( ImplVectMap* pMap, tools::PolyPolygon& rPolyPoly, sal_uInt8 aChain.ImplBeginAdd( aStartPt ); ImplGetChain( pMap, aStartPt, aChain ); - if( nFlags & BMP_VECTORIZE_INNER ) + if( nFlags & BmpVectorizeFlags::Inner ) aChain.ImplEndAdd( bInner ? VECT_POLY_INLINE_INNER : VECT_POLY_INLINE_OUTER ); else aChain.ImplEndAdd( bInner ? VECT_POLY_OUTLINE_INNER : VECT_POLY_OUTLINE_OUTER ); diff --git a/vcl/source/gdi/impvect.hxx b/vcl/source/gdi/impvect.hxx index c2e7a48b7e43..297023dbaf88 100644 --- a/vcl/source/gdi/impvect.hxx +++ b/vcl/source/gdi/impvect.hxx @@ -27,9 +27,9 @@ namespace ImplVectorizer { bool ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf, - sal_uInt8 cReduce, sal_uLong nFlags, const Link<>* pProgress ); + sal_uInt8 cReduce, BmpVectorizeFlags nFlags, const Link<>* pProgress ); bool ImplVectorize( const Bitmap& rMonoBmp, tools::PolyPolygon& rPolyPoly, - sal_uLong nFlags, const Link<>* pProgress ); + BmpVectorizeFlags nFlags, const Link<>* pProgress ); }; #endif diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx index 79588dd1fdd7..7d2e65f91610 100644 --- a/vcl/source/outdev/text.cxx +++ b/vcl/source/outdev/text.cxx @@ -2797,7 +2797,7 @@ bool OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector, Bitmap aBmp( aVDev->GetBitmap(Point(0, 0), aSize)); tools::PolyPolygon aPolyPoly; - bool bVectorized = aBmp.Vectorize(aPolyPoly, BMP_VECTORIZE_OUTER | BMP_VECTORIZE_REDUCE_EDGES); + bool bVectorized = aBmp.Vectorize(aPolyPoly, BmpVectorizeFlags::Outer | BmpVectorizeFlags::ReduceEdges); if( !bVectorized ) bSuccess = false; else |