summaryrefslogtreecommitdiff
path: root/include/vcl/bitmap.hxx
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2019-07-02 17:11:57 +0900
committerTomaž Vajngerl <quikee@gmail.com>2019-07-17 14:25:57 +0200
commit9fd53538f9ecd2c6a935be1958b9f8dafeab8740 (patch)
tree3b28a16faa9824fa19fe6e69faa53aefc69a9310 /include/vcl/bitmap.hxx
parent6375774faa22a82477681b8737f6109d21599025 (diff)
vcl: make it possible to select specific scaling algorithm
Default, Fast, BestQuality scaling flags are used for selecting the best sclaing algorithm for a specific task, but not all specialized sclaing algorithms have its own flag (Super, NearestNeighbor) and are just selectable using one of the above. This adds the missing flags so it's possible to select a specific algorithm. Change-Id: Ied41f27a21a4fcc799537396f9077a9c77cc1c60 Reviewed-on: https://gerrit.libreoffice.org/75759 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include/vcl/bitmap.hxx')
-rw-r--r--include/vcl/bitmap.hxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/include/vcl/bitmap.hxx b/include/vcl/bitmap.hxx
index dcc862ed7779..59c6c9ac28d6 100644
--- a/include/vcl/bitmap.hxx
+++ b/include/vcl/bitmap.hxx
@@ -39,26 +39,27 @@ enum class BmpMirrorFlags
Horizontal = 0x01,
Vertical = 0x02,
};
+
namespace o3tl
{
template<> struct typed_flags<BmpMirrorFlags> : is_typed_flags<BmpMirrorFlags, 0x03> {};
}
-
enum class BmpScaleFlag
{
// Try to preferably use these.
- Default = 1,
+ Default,
Fast,
BestQuality,
-// Specific algorithms, use only if you really need to.
- Interpolate,
+// Specific algorithms, use only if you really need to (mainly used for tests)
+ NearestNeighbor,
+ Interpolate, // fast, integer bilinear
Lanczos,
BiCubic,
- BiLinear
+ BiLinear,
+ Super // bilinear interpolation when supersampling and averaging when subsampling under certain scale
};
-
#define BMP_COL_TRANS Color( 252, 3, 251 )
enum class BmpConversion