summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2012-06-22 17:19:12 +0200
committerLuboš Luňák <l.lunak@suse.cz>2012-06-22 17:40:09 +0200
commitceb8b18f5b7437ba7438c428c3c78e4d8d67fee3 (patch)
treed37c8b63df0d31eceabb9976bc0a642699b9e658 /svtools
parent7cb232e6ee80994cf1f8cb17d34e09eb98fdabc7 (diff)
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
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/graphic/grfmgr2.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx
index f4ab6ca32971..8c2052367db4 100644
--- a/svtools/source/graphic/grfmgr2.cxx
+++ b/svtools/source/graphic/grfmgr2.cxx
@@ -428,7 +428,7 @@ sal_Bool GraphicManager::ImplCreateOutput( OutputDevice* pOut,
}
else if( nFlags & GRFMGR_DRAW_SMOOTHSCALE )
{
- // Scale using the Box filter, rather than this algorithm, as that one provides
+ // Scale using Bitmap::Scale() rather than this algorithm, as that one provides
// better quality, while being somewhat slower (the result should be cached though).
aOutBmpEx = aBmpEx;
bRet = true;
@@ -438,8 +438,7 @@ sal_Bool GraphicManager::ImplCreateOutput( OutputDevice* pOut,
if( bRet )
bRet = aOutBmpEx.Rotate( nRot10, COL_TRANSPARENT );
if( bRet ) // scale as last (rotating would destroy the smooth scaling)
- bRet = aOutBmpEx.Scale( Size( nEndX - nStartX + 1, nEndY - nStartY + 1 ),
- BMP_SCALE_BOX );
+ bRet = aOutBmpEx.Scale( Size( nEndX - nStartX + 1, nEndY - nStartY + 1 ));
}
else
{
@@ -467,11 +466,10 @@ sal_Bool GraphicManager::ImplCreateOutput( OutputDevice* pOut,
bRet = ( aOutBmpEx = aBmpEx ).Scale( Size( nEndX - nStartX + 1, nEndY - nStartY + 1 ) );
else if( nFlags & GRFMGR_DRAW_SMOOTHSCALE )
{
- // Scale using the Box filter, rather than this algorithm, as that one provides
+ // Scale using Bitmap::Scale() rather than this algorithm, as that one provides
// better quality, while being somewhat slower (the result should be cached though).
aOutBmpEx = aBmpEx;
- bRet = aOutBmpEx.Scale( Size( nEndX - nStartX + 1, nEndY - nStartY + 1 ),
- BMP_SCALE_BOX );
+ bRet = aOutBmpEx.Scale( Size( nEndX - nStartX + 1, nEndY - nStartY + 1 ));
if( bRet && ( bHMirr || bVMirr ))
bRet = aOutBmpEx.Mirror(( bHMirr ? BMP_MIRROR_HORZ : BMP_MIRROR_NONE )
| ( bVMirr ? BMP_MIRROR_VERT : BMP_MIRROR_NONE ));