diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2012-06-22 17:19:12 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2012-06-22 17:40:09 +0200 |
commit | ceb8b18f5b7437ba7438c428c3c78e4d8d67fee3 (patch) | |
tree | d37c8b63df0d31eceabb9976bc0a642699b9e658 /vcl/inc | |
parent | 7cb232e6ee80994cf1f8cb17d34e09eb98fdabc7 (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 'vcl/inc')
-rw-r--r-- | vcl/inc/vcl/bitmap.hxx | 9 | ||||
-rw-r--r-- | vcl/inc/vcl/bitmapex.hxx | 4 |
2 files changed, 9 insertions, 4 deletions
diff --git a/vcl/inc/vcl/bitmap.hxx b/vcl/inc/vcl/bitmap.hxx index 2fbe1848c427..06f2bf1b7ae0 100644 --- a/vcl/inc/vcl/bitmap.hxx +++ b/vcl/inc/vcl/bitmap.hxx @@ -54,6 +54,11 @@ #define BMP_SCALE_BILINEAR 0x00000005UL #define BMP_SCALE_BOX 0x00000006UL +// Aliases, try to use these two (or BMP_SCALE_FAST/BMP_SCALE_NONE), +// use a specific algorithm only if you really need to. +#define BMP_SCALE_BEST BMP_SCALE_LANCZOS +#define BMP_SCALE_DEFAULT BMP_SCALE_BOX + // ----------------------------------------------------------------------------- #define BMP_DITHER_NONE 0x00000000UL @@ -630,7 +635,7 @@ public: @return sal_True, if the operation was completed successfully. */ sal_Bool Scale( const Size& rNewSize, - sal_uLong nScaleFlag = BMP_SCALE_LANCZOS ); + sal_uLong nScaleFlag = BMP_SCALE_DEFAULT ); /** Scale the bitmap @@ -643,7 +648,7 @@ public: @return sal_True, if the operation was completed successfully. */ sal_Bool Scale( const double& rScaleX, const double& rScaleY, - sal_uLong nScaleFlag = BMP_SCALE_LANCZOS ); + sal_uLong nScaleFlag = BMP_SCALE_DEFAULT ); /** Rotate bitmap by the specified angle diff --git a/vcl/inc/vcl/bitmapex.hxx b/vcl/inc/vcl/bitmapex.hxx index f1f46d3aec35..845981aa5c1e 100644 --- a/vcl/inc/vcl/bitmapex.hxx +++ b/vcl/inc/vcl/bitmapex.hxx @@ -254,7 +254,7 @@ public: @return sal_True, if the operation was completed successfully. */ - sal_Bool Scale( const Size& rNewSize, sal_uLong nScaleFlag = BMP_SCALE_LANCZOS ); + sal_Bool Scale( const Size& rNewSize, sal_uLong nScaleFlag = BMP_SCALE_DEFAULT ); /** Scale the bitmap @@ -266,7 +266,7 @@ public: @return sal_True, if the operation was completed successfully. */ - sal_Bool Scale( const double& rScaleX, const double& rScaleY, sal_uLong nScaleFlag = BMP_SCALE_LANCZOS ); + sal_Bool Scale( const double& rScaleX, const double& rScaleY, sal_uLong nScaleFlag = BMP_SCALE_DEFAULT ); /** Rotate bitmap by the specified angle |