diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-18 15:41:24 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-05-20 09:52:08 +0200 |
commit | dcefc97c8bd5be9ba229098c32d2a5c73d084163 (patch) | |
tree | 860caac40b5c15ddb3cd1297316975d7034b260e /include/vcl/outdev.hxx | |
parent | 953f327818f565969b8de5d9b956bd6b9a7c64b2 (diff) |
convert IMAGE_DRAW_ constants to scoped enum
Change-Id: I75619eeb902af4953a5ac1525605cf3f0f15e2c0
Diffstat (limited to 'include/vcl/outdev.hxx')
-rw-r--r-- | include/vcl/outdev.hxx | 24 |
1 files changed, 16 insertions, 8 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; |