summaryrefslogtreecommitdiff
path: root/include/vcl/bitmap.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-05-06 10:52:59 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-05-07 08:35:39 +0000
commitefecaf03adff75aa88be7862eb2c4f1261df5e60 (patch)
tree8b31b6bfa3bd3074cde5e8fe7e707fcfacd98e85 /include/vcl/bitmap.hxx
parent0825b020caa0d802a0d76d9a7643daedbf9874e6 (diff)
convert BMP_DITHER flags to scoped enum
Change-Id: I652faacf39a32fc8803147819ec9366948ff12b9 Reviewed-on: https://gerrit.libreoffice.org/15646 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'include/vcl/bitmap.hxx')
-rw-r--r--include/vcl/bitmap.hxx17
1 files changed, 12 insertions, 5 deletions
diff --git a/include/vcl/bitmap.hxx b/include/vcl/bitmap.hxx
index 5e75b69626d9..8ee2c872fd7b 100644
--- a/include/vcl/bitmap.hxx
+++ b/include/vcl/bitmap.hxx
@@ -59,10 +59,17 @@ enum class BmpScaleFlag
};
-#define BMP_DITHER_NONE 0x00000000UL
-#define BMP_DITHER_MATRIX 0x00000001UL
-#define BMP_DITHER_FLOYD 0x00000002UL
-#define BMP_DITHER_FLOYD_16 0x00000004UL
+enum class BmpDitherFlags
+{
+ NONE = 0x0000,
+ Matrix = 0x0001,
+ Floyd = 0x0002,
+ Floyd16 = 0x0004,
+};
+namespace o3tl
+{
+ template<> struct typed_flags<BmpDitherFlags> : is_typed_flags<BmpDitherFlags, 0x07> {};
+}
#define BMP_VECTORIZE_INNER 0x00000001UL
#define BMP_VECTORIZE_OUTER 0x00000002UL
@@ -417,7 +424,7 @@ public:
@param nDitherFlags
The algorithm to be used for dithering
*/
- bool Dither( sal_uLong nDitherFlags = BMP_DITHER_MATRIX );
+ bool Dither( BmpDitherFlags nDitherFlags = BmpDitherFlags::Matrix );
/** Crop the bitmap