diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-19 12:16:31 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-05-20 09:52:09 +0200 |
commit | 456c379ffd8683cd8c22969268900787cf1ac28e (patch) | |
tree | fe340c60faee4799f9ef7002c16ac822c8596dff /include | |
parent | 3cbdf64ad5240e6d9a73d4f7e005f7110d5e4002 (diff) |
convert ANTIALIASING constants to scoped enum
Change-Id: I175b8ea4e8bc01c3cdd3dd90506eba01b35e0085
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/outdev.hxx | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index 833c9da581d8..dda1507807ea 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -254,9 +254,17 @@ namespace o3tl } // Antialiasing -#define ANTIALIASING_DISABLE_TEXT ((sal_uInt16)0x0001) -#define ANTIALIASING_ENABLE_B2DDRAW ((sal_uInt16)0x0002) -#define ANTIALIASING_PIXELSNAPHAIRLINE ((sal_uInt16)0x0004) +enum class AntialiasingFlags +{ + NONE = 0x0000, + DisableText = 0x0001, + EnableB2dDraw = 0x0002, + PixelSnapHairline = 0x0004, +}; +namespace o3tl +{ + template<> struct typed_flags<AntialiasingFlags> : is_typed_flags<AntialiasingFlags, 0x07> {}; +} // AddFontSubstitute #define FONT_SUBSTITUTE_ALWAYS ((sal_uInt16)0x0001) @@ -381,7 +389,7 @@ private: std::unique_ptr<AllSettings> mxSettings; MapMode maMapMode; Point maRefPoint; - sal_uInt16 mnAntialiasing; + AntialiasingFlags mnAntialiasing; LanguageType meTextLanguage; /// bitfield @@ -614,8 +622,8 @@ public: bool IsDeviceOutputNecessary() const { return (mbOutput && mbDevOutput); } bool IsOutputNecessary() const { return ((mbOutput && mbDevOutput) || (mpMetaFile != NULL)); } - void SetAntialiasing( sal_uInt16 nMode = 0 ); - sal_uInt16 GetAntialiasing() const { return mnAntialiasing; } + void SetAntialiasing( AntialiasingFlags nMode = AntialiasingFlags::NONE ); + AntialiasingFlags GetAntialiasing() const { return mnAntialiasing; } void SetDrawMode( DrawModeFlags nDrawMode ); DrawModeFlags GetDrawMode() const { return mnDrawMode; } |