From ceb8b18f5b7437ba7438c428c3c78e4d8d67fee3 Mon Sep 17 00:00:00 2001 From: Luboš Luňák Date: Fri, 22 Jun 2012 17:19:12 +0200 Subject: use generic names rather than specific algorithm names when scaling The Lanczos scaling is of very good quality, but it's rather slow, which can be very noticeable with large images, so it's not a very good default for everything. And in general, it's not good to refer to a specific algorithm when all one usually wants is fast/default/best. Some of these changes are a bit of a guess between default/best, but the general logic is that best should be used only for images that won't be large or where the possible waiting does not matter. Change-Id: I53765507ecb7ed167890f6dd05e73fe53ffd0231 --- canvas/source/vcl/canvasbitmaphelper.cxx | 2 +- canvas/source/vcl/canvashelper.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'canvas') diff --git a/canvas/source/vcl/canvasbitmaphelper.cxx b/canvas/source/vcl/canvasbitmaphelper.cxx index cceaf7b93b9a..e86b629acfbc 100644 --- a/canvas/source/vcl/canvasbitmaphelper.cxx +++ b/canvas/source/vcl/canvasbitmaphelper.cxx @@ -129,7 +129,7 @@ namespace vclcanvas BitmapEx aRes( mpBackBuffer->getBitmapReference() ); aRes.Scale( ::vcl::unotools::sizeFromRealSize2D(newSize), - beFast ? BMP_SCALE_FAST : BMP_SCALE_LANCZOS ); + beFast ? BMP_SCALE_FAST : BMP_SCALE_DEFAULT ); return uno::Reference< rendering::XBitmap >( new CanvasBitmap( aRes, *mpDevice, mpOutDevReference ) ); diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx index ba36f4082fa1..7dc47519682c 100644 --- a/canvas/source/vcl/canvashelper.cxx +++ b/canvas/source/vcl/canvashelper.cxx @@ -927,7 +927,7 @@ namespace vclcanvas Bitmap aBitmap( rOutDev.GetBitmap(aEmptyPoint, aBmpSize) ); aBitmap.Scale( ::vcl::unotools::sizeFromRealSize2D(newSize), - beFast ? BMP_SCALE_FAST : BMP_SCALE_LANCZOS ); + beFast ? BMP_SCALE_FAST : BMP_SCALE_DEFAULT ); return uno::Reference< rendering::XBitmap >( new CanvasBitmap( aBitmap, *mpDevice, mpOutDev ) ); -- cgit