summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-05-05 14:09:24 +0200
committerNoel Grandin <noel@peralex.com>2015-05-06 09:01:30 +0200
commitb13fbd19b7282a1210a2e14bb5ede9ecdf944c1c (patch)
tree3db528acc23250ddcc3dbdc9b1e35a817d8de9ee /vcl
parentba121a3269d17f87c6d09b9e46aaaf921af40ef6 (diff)
convert BMP_SCALE constant to scoped enum
Change-Id: Ibc9f88d2588c028cd71aa86c26d970a73025ef22
Diffstat (limited to 'vcl')
-rw-r--r--vcl/headless/svpbmp.cxx2
-rw-r--r--vcl/inc/headless/svpbmp.hxx2
-rw-r--r--vcl/inc/impbmp.hxx2
-rw-r--r--vcl/inc/opengl/salbmp.hxx4
-rw-r--r--vcl/inc/salbmp.hxx3
-rw-r--r--vcl/inc/unx/salbmp.h2
-rw-r--r--vcl/opengl/scale.cxx36
-rw-r--r--vcl/qa/cppunit/BitmapTest.cxx2
-rw-r--r--vcl/qa/cppunit/graphicfilter/filters-test.cxx2
-rw-r--r--vcl/source/gdi/bitmap3.cxx34
-rw-r--r--vcl/source/gdi/bitmapex.cxx8
-rw-r--r--vcl/source/gdi/gdimtf.cxx2
-rw-r--r--vcl/source/gdi/impbmp.cxx2
-rw-r--r--vcl/source/gdi/impgraph.cxx2
-rw-r--r--vcl/source/gdi/pdfwriter_impl2.cxx2
-rw-r--r--vcl/source/helper/canvasbitmap.cxx2
-rw-r--r--vcl/source/window/menu.cxx2
-rw-r--r--vcl/source/window/printdlg.cxx2
-rw-r--r--vcl/source/window/toolbox2.cxx2
-rw-r--r--vcl/unx/generic/gdi/salbmp.cxx2
-rw-r--r--vcl/workben/vcldemo.cxx8
21 files changed, 62 insertions, 61 deletions
diff --git a/vcl/headless/svpbmp.cxx b/vcl/headless/svpbmp.cxx
index 23dae7e78352..901526ea7fea 100644
--- a/vcl/headless/svpbmp.cxx
+++ b/vcl/headless/svpbmp.cxx
@@ -360,7 +360,7 @@ bool SvpSalBitmap::Erase( const ::Color& /*rFillColor*/ )
return false;
}
-bool SvpSalBitmap::Scale( const double& /*rScaleX*/, const double& /*rScaleY*/, sal_uInt32 /*nScaleFlag*/ )
+bool SvpSalBitmap::Scale( const double& /*rScaleX*/, const double& /*rScaleY*/, BmpScaleFlag /*nScaleFlag*/ )
{
return false;
}
diff --git a/vcl/inc/headless/svpbmp.hxx b/vcl/inc/headless/svpbmp.hxx
index b0fc0769aa42..168852e3caf2 100644
--- a/vcl/inc/headless/svpbmp.hxx
+++ b/vcl/inc/headless/svpbmp.hxx
@@ -61,7 +61,7 @@ public:
virtual bool Crop( const Rectangle& rRectPixel ) SAL_OVERRIDE;
virtual bool Erase( const Color& rFillColor ) SAL_OVERRIDE;
- virtual bool Scale( const double& rScaleX, const double& rScaleY, sal_uInt32 nScaleFlag ) SAL_OVERRIDE;
+ virtual bool Scale( const double& rScaleX, const double& rScaleY, BmpScaleFlag nScaleFlag ) SAL_OVERRIDE;
virtual bool Replace( const Color& rSearchColor, const Color& rReplaceColor, sal_uLong nTol ) SAL_OVERRIDE;
static sal_uInt32 getBitCountFromScanlineFormat( basebmp::Format nFormat );
diff --git a/vcl/inc/impbmp.hxx b/vcl/inc/impbmp.hxx
index aebc89f00338..0dc9ec8bc974 100644
--- a/vcl/inc/impbmp.hxx
+++ b/vcl/inc/impbmp.hxx
@@ -65,7 +65,7 @@ public:
inline void ImplSetChecksum( sal_uLong nChecksum ) { mnChecksum = nChecksum; }
inline sal_uLong ImplGetChecksum() const { return mnChecksum; }
- bool ImplScale( const double& rScaleX, const double& rScaleY, sal_uInt32 nScaleFlag );
+ bool ImplScale( const double& rScaleX, const double& rScaleY, BmpScaleFlag nScaleFlag );
bool ImplReplace( const Color& rSearchColor, const Color& rReplaceColor, sal_uLong nTol );
};
diff --git a/vcl/inc/opengl/salbmp.hxx b/vcl/inc/opengl/salbmp.hxx
index 7536144e44ae..3df78c8b2051 100644
--- a/vcl/inc/opengl/salbmp.hxx
+++ b/vcl/inc/opengl/salbmp.hxx
@@ -81,7 +81,7 @@ public:
bool Crop( const Rectangle& rRectPixel ) SAL_OVERRIDE;
bool Erase( const Color& rFillColor ) SAL_OVERRIDE;
- bool Scale( const double& rScaleX, const double& rScaleY, sal_uInt32 nScaleFlag ) SAL_OVERRIDE;
+ bool Scale( const double& rScaleX, const double& rScaleY, BmpScaleFlag nScaleFlag ) SAL_OVERRIDE;
bool Replace( const Color& rSearchColor, const Color& rReplaceColor, sal_uLong nTol ) SAL_OVERRIDE;
public:
@@ -108,7 +108,7 @@ private:
public:
- bool ImplScale( const double& rScaleX, const double& rScaleY, sal_uInt32 nScaleFlag );
+ bool ImplScale( const double& rScaleX, const double& rScaleY, BmpScaleFlag nScaleFlag );
};
#endif // INCLUDED_VCL_INC_OPENGL_SALBMP_H
diff --git a/vcl/inc/salbmp.hxx b/vcl/inc/salbmp.hxx
index 432c4df72c2a..f89f4171072e 100644
--- a/vcl/inc/salbmp.hxx
+++ b/vcl/inc/salbmp.hxx
@@ -32,6 +32,7 @@ class Color;
class SalGraphics;
class BitmapPalette;
struct BitmapSystemData;
+enum class BmpScaleFlag;
class VCL_PLUGIN_PUBLIC SalBitmap
{
@@ -60,7 +61,7 @@ public:
virtual bool Crop( const Rectangle& rRectPixel ) = 0;
virtual bool Erase( const Color& rFillColor ) = 0;
- virtual bool Scale( const double& rScaleX, const double& rScaleY, sal_uInt32 nScaleFlag ) = 0;
+ virtual bool Scale( const double& rScaleX, const double& rScaleY, BmpScaleFlag nScaleFlag ) = 0;
virtual bool Replace( const Color& rSearchColor, const Color& rReplaceColor, sal_uLong nTol ) = 0;
};
diff --git a/vcl/inc/unx/salbmp.h b/vcl/inc/unx/salbmp.h
index 0dc5b362866f..65d85ba862e5 100644
--- a/vcl/inc/unx/salbmp.h
+++ b/vcl/inc/unx/salbmp.h
@@ -148,7 +148,7 @@ public:
virtual bool Crop( const Rectangle& rRectPixel ) SAL_OVERRIDE;
virtual bool Erase( const Color& rFillColor ) SAL_OVERRIDE;
- virtual bool Scale( const double& rScaleX, const double& rScaleY, sal_uInt32 nScaleFlag ) SAL_OVERRIDE;
+ virtual bool Scale( const double& rScaleX, const double& rScaleY, BmpScaleFlag nScaleFlag ) SAL_OVERRIDE;
virtual bool Replace( const Color& rSearchColor, const Color& rReplaceColor, sal_uLong nTol ) SAL_OVERRIDE;
};
diff --git a/vcl/opengl/scale.cxx b/vcl/opengl/scale.cxx
index 741d973514ba..950aa5078fc1 100644
--- a/vcl/opengl/scale.cxx
+++ b/vcl/opengl/scale.cxx
@@ -34,10 +34,10 @@ private:
OpenGLSalBitmap* mpBitmap;
double mfScaleX;
double mfScaleY;
- sal_uInt32 mnScaleFlag;
+ BmpScaleFlag mnScaleFlag;
public:
- ScaleOp( OpenGLSalBitmap* pBitmap, const double& rScaleX, const double& rScaleY, sal_uInt32 nScaleFlag );
+ ScaleOp( OpenGLSalBitmap* pBitmap, const double& rScaleX, const double& rScaleY, BmpScaleFlag nScaleFlag );
bool Execute() SAL_OVERRIDE;
void GetSize( Size& rSize ) const SAL_OVERRIDE;
@@ -261,32 +261,32 @@ bool OpenGLSalBitmap::ImplScaleArea( double rScaleX, double rScaleY )
return true;
}
-bool OpenGLSalBitmap::ImplScale( const double& rScaleX, const double& rScaleY, sal_uInt32 nScaleFlag )
+bool OpenGLSalBitmap::ImplScale( const double& rScaleX, const double& rScaleY, BmpScaleFlag nScaleFlag )
{
SAL_INFO( "vcl.opengl", "::ImplScale" );
maUserBuffer.reset();
makeCurrent();
- if( nScaleFlag == BMP_SCALE_FAST )
+ if( nScaleFlag == BmpScaleFlag::Fast )
{
return ImplScaleFilter( rScaleX, rScaleY, GL_NEAREST );
}
- if( nScaleFlag == BMP_SCALE_BILINEAR )
+ if( nScaleFlag == BmpScaleFlag::BiLinear )
{
return ImplScaleFilter( rScaleX, rScaleY, GL_LINEAR );
}
- else if( nScaleFlag == BMP_SCALE_SUPER || nScaleFlag == BMP_SCALE_DEFAULT )
+ else if( nScaleFlag == BmpScaleFlag::Super || nScaleFlag == BmpScaleFlag::Default )
{
const Lanczos3Kernel aKernel;
return ImplScaleConvolution( rScaleX, rScaleY, aKernel );
}
- else if( nScaleFlag == BMP_SCALE_BESTQUALITY && rScaleX <= 1 && rScaleY <= 1 )
+ else if( nScaleFlag == BmpScaleFlag::BestQuality && rScaleX <= 1 && rScaleY <= 1 )
{ // Use are scaling for best quality, but only if downscaling.
return ImplScaleArea( rScaleX, rScaleY );
}
- else if( nScaleFlag == BMP_SCALE_LANCZOS || nScaleFlag == BMP_SCALE_BESTQUALITY )
+ else if( nScaleFlag == BmpScaleFlag::Lanczos || nScaleFlag == BmpScaleFlag::BestQuality )
{
const Lanczos3Kernel aKernel;
@@ -301,7 +301,7 @@ ScaleOp::ScaleOp(
OpenGLSalBitmap* pBitmap,
const double& rScaleX,
const double& rScaleY,
- sal_uInt32 nScaleFlag )
+ BmpScaleFlag nScaleFlag )
: mpBitmap( pBitmap )
, mfScaleX( rScaleX )
, mfScaleY( rScaleY )
@@ -322,16 +322,16 @@ void ScaleOp::GetSize( Size& rSize ) const
rSize.setHeight( rSize.Height() * mfScaleY );
}
-bool OpenGLSalBitmap::Scale( const double& rScaleX, const double& rScaleY, sal_uInt32 nScaleFlag )
+bool OpenGLSalBitmap::Scale( const double& rScaleX, const double& rScaleY, BmpScaleFlag nScaleFlag )
{
- SAL_INFO( "vcl.opengl", "::Scale " << nScaleFlag );
-
- if( nScaleFlag == BMP_SCALE_FAST ||
- nScaleFlag == BMP_SCALE_BILINEAR ||
- nScaleFlag == BMP_SCALE_SUPER ||
- nScaleFlag == BMP_SCALE_LANCZOS ||
- nScaleFlag == BMP_SCALE_DEFAULT ||
- nScaleFlag == BMP_SCALE_BESTQUALITY )
+ SAL_INFO( "vcl.opengl", "::Scale " << static_cast<int>(nScaleFlag) );
+
+ if( nScaleFlag == BmpScaleFlag::Fast ||
+ nScaleFlag == BmpScaleFlag::BiLinear ||
+ nScaleFlag == BmpScaleFlag::Super ||
+ nScaleFlag == BmpScaleFlag::Lanczos ||
+ nScaleFlag == BmpScaleFlag::Default ||
+ nScaleFlag == BmpScaleFlag::BestQuality )
{
makeCurrent();
if( mpContext == NULL )
diff --git a/vcl/qa/cppunit/BitmapTest.cxx b/vcl/qa/cppunit/BitmapTest.cxx
index c52727bdfa61..306b0dfdbc2d 100644
--- a/vcl/qa/cppunit/BitmapTest.cxx
+++ b/vcl/qa/cppunit/BitmapTest.cxx
@@ -112,7 +112,7 @@ void BitmapTest::testScale()
rFilter.compressAsPNG(aBitmap24Bit, aStream, 9);
}
- aBitmap24Bit.Scale(2, 2, BMP_SCALE_FAST);
+ aBitmap24Bit.Scale(2, 2, BmpScaleFlag::Fast);
CPPUNIT_ASSERT_EQUAL(static_cast<long>(20), aBitmap24Bit.GetSizePixel().Width());
CPPUNIT_ASSERT_EQUAL(static_cast<long>(20), aBitmap24Bit.GetSizePixel().Height());
diff --git a/vcl/qa/cppunit/graphicfilter/filters-test.cxx b/vcl/qa/cppunit/graphicfilter/filters-test.cxx
index 81706f85a600..9e5f79882cdd 100644
--- a/vcl/qa/cppunit/graphicfilter/filters-test.cxx
+++ b/vcl/qa/cppunit/graphicfilter/filters-test.cxx
@@ -62,7 +62,7 @@ bool VclFiltersTest::load(const OUString &,
void VclFiltersTest::testScaling()
{
- for (unsigned int i = BMP_SCALE_NONE + 1; i <= BMP_SCALE_BOX; i++)
+ for (BmpScaleFlag i = BmpScaleFlag::Default; i <= BmpScaleFlag::Box; i = (BmpScaleFlag)((int)i + 1))
{
Bitmap aBitmap( Size( 413, 409 ), 24 );
BitmapEx aBitmapEx( aBitmap );
diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx
index 9451b160969e..f3dc33e89565 100644
--- a/vcl/source/gdi/bitmap3.cxx
+++ b/vcl/source/gdi/bitmap3.cxx
@@ -864,7 +864,7 @@ bool Bitmap::ImplConvertGhosted()
return bRet;
}
-bool Bitmap::Scale( const double& rScaleX, const double& rScaleY, sal_uInt32 nScaleFlag )
+bool Bitmap::Scale( const double& rScaleX, const double& rScaleY, BmpScaleFlag nScaleFlag )
{
bool bRetval(false);
@@ -904,7 +904,7 @@ bool Bitmap::Scale( const double& rScaleX, const double& rScaleY, sal_uInt32 nSc
//fdo#33455
//
//If we start with a 1 bit image, then after scaling it in any mode except
- //BMP_SCALE_FAST we have a 24bit image which is perfectly correct, but we
+ //BmpScaleFlag::Fast we have a 24bit image which is perfectly correct, but we
//are going to down-shift it to mono again and Bitmap::ImplMakeMono just
//has "Bitmap aNewBmp( GetSizePixel(), 1 );" to create a 1 bit bitmap which
//will default to black/white and the colors mapped to which ever is closer
@@ -914,28 +914,28 @@ bool Bitmap::Scale( const double& rScaleX, const double& rScaleY, sal_uInt32 nSc
//just use the fast scale rather than attempting to count unique colors in
//the other converters and pass all the info down through
//Bitmap::ImplMakeMono
- if (nStartCount == 1 && nScaleFlag != BMP_SCALE_NONE)
- nScaleFlag = BMP_SCALE_FAST;
+ if (nStartCount == 1 && nScaleFlag != BmpScaleFlag::NONE)
+ nScaleFlag = BmpScaleFlag::Fast;
switch(nScaleFlag)
{
- case BMP_SCALE_NONE :
+ case BmpScaleFlag::NONE :
{
bRetval = false;
break;
}
- case BMP_SCALE_FAST :
+ case BmpScaleFlag::Fast :
{
bRetval = ImplScaleFast( rScaleX, rScaleY );
break;
}
- case BMP_SCALE_INTERPOLATE :
+ case BmpScaleFlag::Interpolate :
{
bRetval = ImplScaleInterpolate( rScaleX, rScaleY );
break;
}
- case BMP_SCALE_SUPER:
- case BMP_SCALE_DEFAULT:
+ case BmpScaleFlag::Super:
+ case BmpScaleFlag::Default:
{
if (GetSizePixel().Width() < 2 || GetSizePixel().Height() < 2)
{
@@ -949,29 +949,29 @@ bool Bitmap::Scale( const double& rScaleX, const double& rScaleY, sal_uInt32 nSc
}
break;
}
- case BMP_SCALE_LANCZOS :
- case BMP_SCALE_BESTQUALITY:
+ case BmpScaleFlag::Lanczos :
+ case BmpScaleFlag::BestQuality:
{
const Lanczos3Kernel kernel;
bRetval = ImplScaleConvolution( rScaleX, rScaleY, kernel );
break;
}
- case BMP_SCALE_BICUBIC :
+ case BmpScaleFlag::BiCubic :
{
const BicubicKernel kernel;
bRetval = ImplScaleConvolution( rScaleX, rScaleY, kernel );
break;
}
- case BMP_SCALE_BILINEAR :
+ case BmpScaleFlag::BiLinear :
{
const BilinearKernel kernel;
bRetval = ImplScaleConvolution( rScaleX, rScaleY, kernel );
break;
}
- case BMP_SCALE_BOX :
+ case BmpScaleFlag::Box :
{
const BoxKernel kernel;
@@ -984,7 +984,7 @@ bool Bitmap::Scale( const double& rScaleX, const double& rScaleY, sal_uInt32 nSc
return bRetval;
}
-bool Bitmap::Scale( const Size& rNewSize, sal_uInt32 nScaleFlag )
+bool Bitmap::Scale( const Size& rNewSize, BmpScaleFlag nScaleFlag )
{
const Size aSize( GetSizePixel() );
bool bRet;
@@ -1556,8 +1556,8 @@ namespace
}
}
-// #i121233# Added BMP_SCALE_LANCZOS, BMP_SCALE_BICUBIC, BMP_SCALE_BILINEAR and
-// BMP_SCALE_BOX derived from the original commit from Tomas Vajngerl (see
+// #i121233# Added BmpScaleFlag::Lanczos, BmpScaleFlag::BiCubic, BmpScaleFlag::BiLinear and
+// BmpScaleFlag::Box derived from the original commit from Tomas Vajngerl (see
// bugzilla task for deitails) Thanks!
bool Bitmap::ImplScaleConvolution(
const double& rScaleX,
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index 41f1e9254d4d..38a770d47138 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -336,7 +336,7 @@ sal_uLong BitmapEx::GetChecksum() const
return nCrc;
}
-void BitmapEx::SetSizePixel( const Size& rNewSize, sal_uInt32 nScaleFlag )
+void BitmapEx::SetSizePixel( const Size& rNewSize, BmpScaleFlag nScaleFlag )
{
if(GetSizePixel() != rNewSize)
{
@@ -374,7 +374,7 @@ bool BitmapEx::Mirror( sal_uLong nMirrorFlags )
return bRet;
}
-bool BitmapEx::Scale( const double& rScaleX, const double& rScaleY, sal_uInt32 nScaleFlag )
+bool BitmapEx::Scale( const double& rScaleX, const double& rScaleY, BmpScaleFlag nScaleFlag )
{
bool bRet = false;
@@ -396,7 +396,7 @@ bool BitmapEx::Scale( const double& rScaleX, const double& rScaleY, sal_uInt32 n
return bRet;
}
-bool BitmapEx::Scale( const Size& rNewSize, sal_uInt32 nScaleFlag )
+bool BitmapEx::Scale( const Size& rNewSize, BmpScaleFlag nScaleFlag )
{
bool bRet;
@@ -695,7 +695,7 @@ BitmapEx BitmapEx:: AutoScaleBitmap(BitmapEx & aBitmap, const long aStandardSize
}
aScaledSize = Size( imgNewWidth, imgNewHeight );
- aRet.Scale( aScaledSize, BMP_SCALE_BESTQUALITY );
+ aRet.Scale( aScaledSize, BmpScaleFlag::BestQuality );
}
else
{
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index 0eafc4f67e38..f3a44928be90 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -2887,7 +2887,7 @@ SvStream& GDIMetaFile::Write( SvStream& rOStm )
return rOStm;
}
-bool GDIMetaFile::CreateThumbnail(BitmapEx& rBitmapEx, sal_uInt32 nMaximumExtent, BmpConversion eColorConversion, long nScaleFlag) const
+bool GDIMetaFile::CreateThumbnail(BitmapEx& rBitmapEx, sal_uInt32 nMaximumExtent, BmpConversion eColorConversion, BmpScaleFlag nScaleFlag) const
{
// initialization seems to be complicated but is used to avoid rounding errors
ScopedVclPtrInstance< VirtualDevice > aVDev;
diff --git a/vcl/source/gdi/impbmp.cxx b/vcl/source/gdi/impbmp.cxx
index 696ede09345c..298bfaa1cd0f 100644
--- a/vcl/source/gdi/impbmp.cxx
+++ b/vcl/source/gdi/impbmp.cxx
@@ -88,7 +88,7 @@ void ImpBitmap::ImplReleaseBuffer( BitmapBuffer* pBuffer, BitmapAccessMode nMode
mnChecksum = 0;
}
-bool ImpBitmap::ImplScale( const double& rScaleX, const double& rScaleY, sal_uInt32 nScaleFlag )
+bool ImpBitmap::ImplScale( const double& rScaleX, const double& rScaleY, BmpScaleFlag nScaleFlag )
{
return mpSalBitmap->Scale( rScaleX, rScaleY, nScaleFlag );
}
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index 58bb314a1a10..7758c6d32161 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -568,7 +568,7 @@ BitmapEx ImpGraphic::ImplGetBitmapEx(const GraphicConversionParameters& rParamet
{
aRetBmpEx.Scale(
rParameters.getSizePixel(),
- rParameters.getScaleHighQuality() ? BMP_SCALE_INTERPOLATE : BMP_SCALE_FAST);
+ rParameters.getScaleHighQuality() ? BmpScaleFlag::Interpolate : BmpScaleFlag::Fast);
}
}
else if( ( meType != GRAPHIC_DEFAULT ) && ImplIsSupportedGraphic() )
diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx
index 09c8d1b27997..837d69f9aa19 100644
--- a/vcl/source/gdi/pdfwriter_impl2.cxx
+++ b/vcl/source/gdi/pdfwriter_impl2.cxx
@@ -128,7 +128,7 @@ void PDFWriterImpl::implWriteBitmapEx( const Point& i_rPoint, const Size& i_rSiz
if( aNewBmpSize.Width() && aNewBmpSize.Height() )
{
// #i121233# Use best quality for PDF exports
- aBitmapEx.Scale( aNewBmpSize, BMP_SCALE_BESTQUALITY );
+ aBitmapEx.Scale( aNewBmpSize, BmpScaleFlag::BestQuality );
}
else
{
diff --git a/vcl/source/helper/canvasbitmap.cxx b/vcl/source/helper/canvasbitmap.cxx
index a1ebb5d39732..c532606b4eb8 100644
--- a/vcl/source/helper/canvasbitmap.cxx
+++ b/vcl/source/helper/canvasbitmap.cxx
@@ -448,7 +448,7 @@ uno::Reference< rendering::XBitmap > SAL_CALL VclCanvasBitmap::getScaledBitmap(
SolarMutexGuard aGuard;
BitmapEx aNewBmp( m_aBitmap );
- aNewBmp.Scale( sizeFromRealSize2D( newSize ), beFast ? BMP_SCALE_DEFAULT : BMP_SCALE_BESTQUALITY );
+ aNewBmp.Scale( sizeFromRealSize2D( newSize ), beFast ? BmpScaleFlag::Default : BmpScaleFlag::BestQuality );
return uno::Reference<rendering::XBitmap>( new VclCanvasBitmap( aNewBmp ) );
}
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index a70a3d0c1a17..5571d03ad70f 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -1947,7 +1947,7 @@ void Menu::ImplPaint( vcl::Window* pWin, sal_uInt16 nBorder, long nStartY, MenuI
if (nScaleFactor != 1)
{
BitmapEx aBitmap = aImage.GetBitmapEx();
- aBitmap.Scale(nScaleFactor, nScaleFactor, BMP_SCALE_FAST);
+ aBitmap.Scale(nScaleFactor, nScaleFactor, BmpScaleFlag::Fast);
aImage = Image(aBitmap);
}
aTmpPos = aOuterCheckRect.TopLeft();
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 2391f61ca8c2..ad18df4f507a 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -184,7 +184,7 @@ void PrintDialog::PrintPreviewWindow::Paint( vcl::RenderContext& /*rRenderContex
else
{
Bitmap aPreviewBitmap(maPreviewBitmap);
- aPreviewBitmap.Scale(maPreviewSize, BMP_SCALE_BESTQUALITY);
+ aPreviewBitmap.Scale(maPreviewSize, BmpScaleFlag::BestQuality);
DrawBitmap(aOffset, aPreviewBitmap);
}
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 4d3c80186d49..cedf3bd1b184 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -1124,7 +1124,7 @@ void ToolBox::SetItemImage( sal_uInt16 nItemId, const Image& rImage )
// FIXME find out what that code is & fix accordingly
if (aBitmap.GetSizePixel().Width() < 32)
{
- aBitmap.Scale(GetDPIScaleFactor(), GetDPIScaleFactor(), BMP_SCALE_FAST);
+ aBitmap.Scale(GetDPIScaleFactor(), GetDPIScaleFactor(), BmpScaleFlag::Fast);
aImage = Image(aBitmap);
}
}
diff --git a/vcl/unx/generic/gdi/salbmp.cxx b/vcl/unx/generic/gdi/salbmp.cxx
index fb003fb7ce7a..8087b2245be0 100644
--- a/vcl/unx/generic/gdi/salbmp.cxx
+++ b/vcl/unx/generic/gdi/salbmp.cxx
@@ -870,7 +870,7 @@ bool X11SalBitmap::Erase( const ::Color& /*rFillColor*/ )
return false;
}
-bool X11SalBitmap::Scale( const double& /*rScaleX*/, const double& /*rScaleY*/, sal_uInt32 /*nScaleFlag*/ )
+bool X11SalBitmap::Scale( const double& /*rScaleX*/, const double& /*rScaleY*/, BmpScaleFlag /*nScaleFlag*/ )
{
return false;
}
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index db73f57fe3d5..8ddfca088ca3 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -660,7 +660,7 @@ public:
for (size_t i = 0; i < SAL_N_ELEMENTS(aSizes); i++)
{
aShadowStretch.Scale(Size(aShadowStretch.GetSizePixel().Width(), aSizes[i]),
- BMP_SCALE_FAST);
+ BmpScaleFlag::Fast);
rDev.DrawBitmapEx(aRenderPt, aShadowStretch);
aRenderPt.Move(aShadowStretch.GetSizePixel().Width() + 4, 0);
@@ -685,7 +685,7 @@ public:
const RenderContext &rCtx) SAL_OVERRIDE
{
Bitmap aBitmap(rCtx.mpDemoRenderer->maIntroBW);
- aBitmap.Scale(r.GetSize(), BMP_SCALE_BESTQUALITY);
+ aBitmap.Scale(r.GetSize(), BmpScaleFlag::BestQuality);
rDev.DrawBitmap(r.TopLeft(), aBitmap);
SimulateBorderStretch(rDev, r);
@@ -702,7 +702,7 @@ public:
maCheckered.RenderRegion(rDev, r, rCtx);
BitmapEx aBitmap(rCtx.mpDemoRenderer->maIntro);
- aBitmap.Scale(r.GetSize(), BMP_SCALE_BESTQUALITY);
+ aBitmap.Scale(r.GetSize(), BmpScaleFlag::BestQuality);
AlphaMask aSemiTransp(aBitmap.GetSizePixel());
aSemiTransp.Erase(64);
rDev.DrawBitmapEx(r.TopLeft(), BitmapEx(aBitmap.GetBitmap(),
@@ -1069,7 +1069,7 @@ public:
const RenderContext &) SAL_OVERRIDE
{
Bitmap aBitmap(rDev.GetBitmap(Point(0,0),rDev.GetOutputSizePixel()));
- aBitmap.Scale(r.GetSize(), BMP_SCALE_BESTQUALITY);
+ aBitmap.Scale(r.GetSize(), BmpScaleFlag::BestQuality);
rDev.DrawBitmap(r.TopLeft(), aBitmap);
}
};