include/drawinglayer/primitive2d/bitmapprimitive2d.hxx | 87 ++++++++--------- 1 file changed, 41 insertions(+), 46 deletions(-)
New commits: commit 19181dab1cc01c90b5021328a3b3a098fa5a0b35 Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Sun Feb 2 21:50:31 2020 +0100 Commit: Tomaž Vajngerl <qui...@gmail.com> CommitDate: Mon Feb 3 23:23:04 2020 +0100 drawinglayer: clean-up namespace and indent for BitmapPrimitive2D Change-Id: I43f2030aeabed555baca20e345732ec926963d7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87903 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <qui...@gmail.com> diff --git a/include/drawinglayer/primitive2d/bitmapprimitive2d.hxx b/include/drawinglayer/primitive2d/bitmapprimitive2d.hxx index 17e36637e2f1..41d76e6549ba 100644 --- a/include/drawinglayer/primitive2d/bitmapprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/bitmapprimitive2d.hxx @@ -26,56 +26,51 @@ #include <vcl/bitmapex.hxx> #include <basegfx/matrix/b2dhommatrix.hxx> +namespace drawinglayer::primitive2d +{ -// BitmapPrimitive2D class +/** BitmapPrimitive2D class -namespace drawinglayer + This class is the central primitive for Bitmap-based primitives. + It provides RGBA-based bitmaps, currently using a BitmapEx from VCL. + This may change in the future to any other, maybe more general base + class providing 24bit RGBA. + */ +class DRAWINGLAYER_DLLPUBLIC BitmapPrimitive2D final : public BasePrimitive2D { - namespace primitive2d - { - /** BitmapPrimitive2D class - - This class is the central primitive for Bitmap-based primitives. - It provides RGBA-based bitmaps, currently using a BitmapEx from VCL. - This may change in the future to any other, maybe more general base - class providing 24bit RGBA. - */ - class DRAWINGLAYER_DLLPUBLIC BitmapPrimitive2D final : public BasePrimitive2D - { - private: - /// the RGBA Bitmap-data - BitmapEx maBitmapEx; - - /** the object transformation from unit coordinates, defining - size, shear, rotate and position - */ - basegfx::B2DHomMatrix maTransform; - - public: - /// constructor - BitmapPrimitive2D( - const BitmapEx& rBitmapEx, - const basegfx::B2DHomMatrix& rTransform); - - /// data read access - const BitmapEx& getBitmapEx() const { return maBitmapEx; } - const basegfx::B2DHomMatrix& getTransform() const { return maTransform; } - - /// compare operator - virtual bool operator==(const BasePrimitive2D& rPrimitive) const override; - - /// get range - virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const override; - - /// provide unique ID - DeclPrimitive2DIDBlock() - - // XAccounting - virtual sal_Int64 SAL_CALL estimateUsage() override; - }; - } // end of namespace primitive2d -} // end of namespace drawinglayer +private: + /// the RGBA Bitmap-data + BitmapEx maBitmapEx; + + /** the object transformation from unit coordinates, defining + size, shear, rotate and position + */ + basegfx::B2DHomMatrix maTransform; + +public: + /// constructor + BitmapPrimitive2D( + const BitmapEx& rBitmapEx, + const basegfx::B2DHomMatrix& rTransform); + + /// data read access + const BitmapEx& getBitmapEx() const { return maBitmapEx; } + const basegfx::B2DHomMatrix& getTransform() const { return maTransform; } + + /// compare operator + virtual bool operator==(const BasePrimitive2D& rPrimitive) const override; + + /// get range + virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const override; + + /// provide unique ID + DeclPrimitive2DIDBlock() + + // XAccounting + virtual sal_Int64 SAL_CALL estimateUsage() override; +}; +} // end of namespace drawinglayer::primitive2d #endif // INCLUDED_DRAWINGLAYER_PRIMITIVE2D_BITMAPPRIMITIVE2D_HXX _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits