xref: /AOO41X/main/svx/inc/svx/sdr/primitive2d/sdrconnectorprimitive2d.hxx (revision 3334a7e6acdae9820fa1a6f556bb10129a8de6b2)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef INCLUDED_SDR_PRIMITIVE2D_SDRCONNECTORPRIMITIVE2D_HXX
25 #define INCLUDED_SDR_PRIMITIVE2D_SDRCONNECTORPRIMITIVE2D_HXX
26 
27 #include <drawinglayer/primitive2d/baseprimitive2d.hxx>
28 #include <svx/sdr/attribute/sdrlineshadowtextattribute.hxx>
29 #include <basegfx/polygon/b2dpolygon.hxx>
30 
31 //////////////////////////////////////////////////////////////////////////////
32 // predefines
33 
34 //////////////////////////////////////////////////////////////////////////////
35 
36 namespace drawinglayer
37 {
38     namespace primitive2d
39     {
40         class SdrConnectorPrimitive2D : public BufferedDecompositionPrimitive2D
41         {
42         private:
43             attribute::SdrLineShadowTextAttribute       maSdrLSTAttribute;
44             ::basegfx::B2DPolygon                       maUnitPolygon;
45 
46         protected:
47             // local decomposition.
48             virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const;
49 
50         public:
51             SdrConnectorPrimitive2D(
52                 const attribute::SdrLineShadowTextAttribute& rSdrLSTAttribute,
53                 const ::basegfx::B2DPolygon& rUnitPolygon);
54 
55             // data access
getSdrLSTAttribute() const56             const attribute::SdrLineShadowTextAttribute& getSdrLSTAttribute() const { return maSdrLSTAttribute; }
getUnitPolygon() const57             const ::basegfx::B2DPolygon& getUnitPolygon() const { return maUnitPolygon; }
58 
59             // compare operator
60             virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
61 
62             // provide unique ID
63             DeclPrimitrive2DIDBlock()
64         };
65     } // end of namespace primitive2d
66 } // end of namespace drawinglayer
67 
68 //////////////////////////////////////////////////////////////////////////////
69 
70 #endif //INCLUDED_SDR_PRIMITIVE2D_SDRCONNECTORPRIMITIVE2D_HXX
71 
72 // eof
73