update emoji autocorrect entries from po-files
[LibreOffice.git] / include / drawinglayer / primitive2d / discreteshadowprimitive2d.hxx
blob20fb1faa6899baa4349dc4340d7868cde216638e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_DISCRETESHADOWPRIMITIVE2D_HXX
21 #define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_DISCRETESHADOWPRIMITIVE2D_HXX
23 #include <drawinglayer/drawinglayerdllapi.h>
25 #include <drawinglayer/primitive2d/primitivetools2d.hxx>
26 #include <vcl/bitmapex.hxx>
27 #include <basegfx/matrix/b2dhommatrix.hxx>
30 // DiscreteShadowPrimitive2D class
32 namespace drawinglayer
34 namespace primitive2d
36 /** DiscreteShadow data class
39 class DRAWINGLAYER_DLLPUBLIC DiscreteShadow
41 private:
42 /// the original shadow BitmapEx in a special form
43 BitmapEx maBitmapEx;
45 /// buffered extracted parts of CombinedShadow for easier usage
46 BitmapEx maTopLeft;
47 BitmapEx maTop;
48 BitmapEx maTopRight;
49 BitmapEx maRight;
50 BitmapEx maBottomRight;
51 BitmapEx maBottom;
52 BitmapEx maBottomLeft;
53 BitmapEx maLeft;
55 public:
56 /// constructor
57 explicit DiscreteShadow(const BitmapEx& rBitmapEx);
59 /// data read access
60 const BitmapEx& getBitmapEx() const { return maBitmapEx; }
62 /// compare operator
63 bool operator==(const DiscreteShadow& rCompare) const
65 return getBitmapEx() == rCompare.getBitmapEx();
68 /// helper accesses which create on-demand needed segments
69 const BitmapEx& getTopLeft() const;
70 const BitmapEx& getTop() const;
71 const BitmapEx& getTopRight() const;
72 const BitmapEx& getRight() const;
73 const BitmapEx& getBottomRight() const;
74 const BitmapEx& getBottom() const;
75 const BitmapEx& getBottomLeft() const;
76 const BitmapEx& getLeft() const;
79 /** DiscreteShadowPrimitive2D class
82 class DRAWINGLAYER_DLLPUBLIC DiscreteShadowPrimitive2D : public DiscreteMetricDependentPrimitive2D
84 private:
85 // the object transformation of the rectangular object
86 basegfx::B2DHomMatrix maTransform;
88 // the bitmap shadow data
89 DiscreteShadow maDiscreteShadow;
91 protected:
92 /// create local decomposition
93 virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const SAL_OVERRIDE;
95 public:
96 /// constructor
97 DiscreteShadowPrimitive2D(
98 const basegfx::B2DHomMatrix& rTransform,
99 const DiscreteShadow& rDiscreteShadow);
101 /// data read access
102 const basegfx::B2DHomMatrix& getTransform() const { return maTransform; }
103 const DiscreteShadow& getDiscreteShadow() const { return maDiscreteShadow; }
105 /// compare operator
106 virtual bool operator==(const BasePrimitive2D& rPrimitive) const SAL_OVERRIDE;
108 /// get range
109 virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const SAL_OVERRIDE;
111 /// provide unique ID
112 DeclPrimitive2DIDBlock()
114 } // end of namespace primitive2d
115 } // end of namespace drawinglayer
119 #endif // INCLUDED_DRAWINGLAYER_PRIMITIVE2D_DISCRETESHADOWPRIMITIVE2D_HXX
121 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */