diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2020-05-26 15:57:38 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2021-05-02 13:01:08 +0200 |
commit | d6b189bb4231d3500ba05437566f6daa7f0ce716 (patch) | |
tree | bbf6e58fe68ffdc3c90850e1f98a2a5cda7d5c9a /include/vcl | |
parent | ffde7949ab6bd434b0f086d1a3bdf83f31aeda48 (diff) |
GraphicAttributes: put const. and op. '=' into the header file
Change-Id: I1bc38f89457c3593673b445e7571a4fd82d5960b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114982
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include/vcl')
-rw-r--r-- | include/vcl/GraphicAttributes.hxx | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/include/vcl/GraphicAttributes.hxx b/include/vcl/GraphicAttributes.hxx index 480953982ede..b5e73625c467 100644 --- a/include/vcl/GraphicAttributes.hxx +++ b/include/vcl/GraphicAttributes.hxx @@ -51,9 +51,37 @@ private: GraphicDrawMode meDrawMode; public: - GraphicAttr(); + GraphicAttr() + : mfGamma(1.0) + , mnMirrFlags(BmpMirrorFlags::NONE) + , mnLeftCrop(0) + , mnTopCrop(0) + , mnRightCrop(0) + , mnBottomCrop(0) + , mnRotate10(0) + , mnContPercent(0) + , mnLumPercent(0) + , mnRPercent(0) + , mnGPercent(0) + , mnBPercent(0) + , mbInvert(false) + , mcAlpha(255) + , meDrawMode(GraphicDrawMode::Standard) + { + } + + bool operator==(const GraphicAttr& rAttr) const + { + return mfGamma == rAttr.mfGamma && mnMirrFlags == rAttr.mnMirrFlags + && mnLeftCrop == rAttr.mnLeftCrop && mnTopCrop == rAttr.mnTopCrop + && mnRightCrop == rAttr.mnRightCrop && mnBottomCrop == rAttr.mnBottomCrop + && mnRotate10 == rAttr.mnRotate10 && mnContPercent == rAttr.mnContPercent + && mnLumPercent == rAttr.mnLumPercent && mnRPercent == rAttr.mnRPercent + && mnGPercent == rAttr.mnGPercent && mnBPercent == rAttr.mnBPercent + && mbInvert == rAttr.mbInvert && mcAlpha == rAttr.mcAlpha + && meDrawMode == rAttr.meDrawMode; + } - bool operator==(const GraphicAttr& rAttr) const; bool operator!=(const GraphicAttr& rAttr) const { return !(*this == rAttr); } void SetDrawMode(GraphicDrawMode eDrawMode) { meDrawMode = eDrawMode; } |