xref: /AOO41X/main/drawinglayer/inc/drawinglayer/attribute/lineattribute.hxx (revision 5aaf853b3ba91aa8a4f8154519fb0bf086e1a428)
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_DRAWINGLAYER_ATTRIBUTE_LINEATTRIBUTE_HXX
25 #define INCLUDED_DRAWINGLAYER_ATTRIBUTE_LINEATTRIBUTE_HXX
26 
27 #include <drawinglayer/drawinglayerdllapi.h>
28 #include <basegfx/vector/b2enums.hxx>
29 #include <com/sun/star/drawing/LineCap.hpp>
30 
31 //////////////////////////////////////////////////////////////////////////////
32 // predefines
33 
34 namespace basegfx {
35     class BColor;
36 }
37 
38 namespace drawinglayer { namespace attribute {
39     class ImpLineAttribute;
40 }}
41 
42 //////////////////////////////////////////////////////////////////////////////
43 
44 namespace drawinglayer
45 {
46     namespace attribute
47     {
48         class DRAWINGLAYER_DLLPUBLIC LineAttribute
49         {
50         private:
51             ImpLineAttribute*                           mpLineAttribute;
52 
53         public:
54             /// constructors/assignmentoperator/destructor
55             LineAttribute(
56                 const basegfx::BColor& rColor,
57                 double fWidth = 0.0,
58                 basegfx::B2DLineJoin aB2DLineJoin = basegfx::B2DLINEJOIN_ROUND,
59                 com::sun::star::drawing::LineCap aLineCap = com::sun::star::drawing::LineCap_BUTT);
60             LineAttribute();
61             LineAttribute(const LineAttribute& rCandidate);
62             LineAttribute& operator=(const LineAttribute& rCandidate);
63             ~LineAttribute();
64 
65             // checks if the incarnation is default constructed
66             bool isDefault() const;
67 
68             // compare operator
69             bool operator==(const LineAttribute& rCandidate) const;
70 
71             // data read access
72             const basegfx::BColor& getColor() const;
73             double getWidth() const;
74             basegfx::B2DLineJoin getLineJoin() const;
75             com::sun::star::drawing::LineCap getLineCap() const;
76         };
77     } // end of namespace attribute
78 } // end of namespace drawinglayer
79 
80 //////////////////////////////////////////////////////////////////////////////
81 
82 #endif //INCLUDED_DRAWINGLAYER_ATTRIBUTE_LINEATTRIBUTE_HXX
83 
84 // eof
85