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