summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-05-18 15:41:24 +0200
committerNoel Grandin <noel@peralex.com>2015-05-20 09:52:08 +0200
commitdcefc97c8bd5be9ba229098c32d2a5c73d084163 (patch)
tree860caac40b5c15ddb3cd1297316975d7034b260e /include
parent953f327818f565969b8de5d9b956bd6b9a7c64b2 (diff)
convert IMAGE_DRAW_ constants to scoped enum
Change-Id: I75619eeb902af4953a5ac1525605cf3f0f15e2c0
Diffstat (limited to 'include')
-rw-r--r--include/vcl/outdev.hxx24
-rw-r--r--include/vcl/print.hxx4
2 files changed, 18 insertions, 10 deletions
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index ee1752d06979..e72631c5fd82 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -186,12 +186,20 @@ namespace o3tl
template<> struct typed_flags<DrawTextFlags> : is_typed_flags<DrawTextFlags, 0xffff> {};
}
-// Flags for DrawImage()
-#define IMAGE_DRAW_DISABLE ((sal_uInt16)0x0001)
-#define IMAGE_DRAW_HIGHLIGHT ((sal_uInt16)0x0002)
-#define IMAGE_DRAW_DEACTIVE ((sal_uInt16)0x0004)
-#define IMAGE_DRAW_COLORTRANSFORM ((sal_uInt16)0x0008)
-#define IMAGE_DRAW_SEMITRANSPARENT ((sal_uInt16)0x0010)
+// Flags for DrawImage(), these must match the definitions in css::awt::ImageDrawMode
+enum class DrawImageFlags
+{
+ NONE = 0x0000,
+ Disable = 0x0001,
+ Highlight = 0x0002,
+ Deactive = 0x0004,
+ ColorTransform = 0x0008,
+ SemiTransparent = 0x0010,
+};
+namespace o3tl
+{
+ template<> struct typed_flags<DrawImageFlags> : is_typed_flags<DrawImageFlags, 0x001f> {};
+}
// Grid
#define GRID_DOTS ((sal_uLong)0x00000001)
@@ -1403,13 +1411,13 @@ public:
virtual void DrawImage(
const Point& rPos,
const Image& rImage,
- sal_uInt16 nStyle = 0 );
+ DrawImageFlags nStyle = DrawImageFlags::NONE );
virtual void DrawImage(
const Point& rPos,
const Size& rSize,
const Image& rImage,
- sal_uInt16 nStyle = 0 );
+ DrawImageFlags nStyle = DrawImageFlags::NONE );
virtual Bitmap GetBitmap( const Point& rSrcPt, const Size& rSize ) const;
diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx
index 70dcb9ccf278..600b2a817cb0 100644
--- a/include/vcl/print.hxx
+++ b/include/vcl/print.hxx
@@ -401,9 +401,9 @@ public:
const Point& rSrcPt, const Size& rSrcSize,
bool bWindowInvalidate = false ) SAL_OVERRIDE;
- virtual void DrawImage( const Point&, const Image&, sal_uInt16 ) SAL_OVERRIDE;
+ virtual void DrawImage( const Point&, const Image&, DrawImageFlags ) SAL_OVERRIDE;
virtual void DrawImage( const Point&, const Size&,
- const Image&, sal_uInt16 ) SAL_OVERRIDE;
+ const Image&, DrawImageFlags ) SAL_OVERRIDE;
// These 3 together are more modular PrintJob(), allowing printing more documents as one print job