xref: /AOO41X/main/drawinglayer/inc/drawinglayer/attribute/fillgradientattribute.hxx (revision 4bfbcde8d64cc5d114df10dce4a9ed79eff32278)
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_FILLGRADIENTATTRIBUTE_HXX
23 #define INCLUDED_DRAWINGLAYER_ATTRIBUTE_FILLGRADIENTATTRIBUTE_HXX
24 
25 #include <drawinglayer/drawinglayerdllapi.h>
26 //////////////////////////////////////////////////////////////////////////////
27 // predefines
28 
29 namespace basegfx {
30     class BColor;
31 }
32 
33 namespace drawinglayer { namespace attribute {
34     class ImpFillGradientAttribute;
35 }}
36 
37 //////////////////////////////////////////////////////////////////////////////
38 // declarations
39 
40 namespace drawinglayer
41 {
42     namespace attribute
43     {
44         enum GradientStyle
45         {
46             GRADIENTSTYLE_LINEAR,
47             GRADIENTSTYLE_AXIAL,
48             GRADIENTSTYLE_RADIAL,
49             GRADIENTSTYLE_ELLIPTICAL,
50             GRADIENTSTYLE_SQUARE,
51             GRADIENTSTYLE_RECT
52         };
53     } // end of namespace attribute
54 } // end of namespace drawinglayer
55 
56 //////////////////////////////////////////////////////////////////////////////
57 
58 namespace drawinglayer
59 {
60     namespace attribute
61     {
62         class DRAWINGLAYER_DLLPUBLIC FillGradientAttribute
63         {
64         private:
65             ImpFillGradientAttribute*           mpFillGradientAttribute;
66 
67         public:
68             /// constructors/assignmentoperator/destructor
69             FillGradientAttribute(
70                 GradientStyle eStyle,
71                 double fBorder,
72                 double fOffsetX,
73                 double fOffsetY,
74                 double fAngle,
75                 const basegfx::BColor& rStartColor,
76                 const basegfx::BColor& rEndColor,
77                 sal_uInt16 nSteps);
78             FillGradientAttribute();
79             FillGradientAttribute(const FillGradientAttribute& rCandidate);
80             FillGradientAttribute& operator=(const FillGradientAttribute& rCandidate);
81             ~FillGradientAttribute();
82 
83             // checks if the incarnation is default constructed
84             bool isDefault() const;
85 
86             // compare operator
87             bool operator==(const FillGradientAttribute& rCandidate) const;
88 
89             // data read access
90             GradientStyle getStyle() const;
91             double getBorder() const;
92             double getOffsetX() const;
93             double getOffsetY() const;
94             double getAngle() const;
95             const basegfx::BColor& getStartColor() const;
96             const basegfx::BColor& getEndColor() const;
97             sal_uInt16 getSteps() const;
98         };
99     } // end of namespace attribute
100 } // end of namespace drawinglayer
101 
102 //////////////////////////////////////////////////////////////////////////////
103 
104 #endif //INCLUDED_DRAWINGLAYER_ATTRIBUTE_FILLGRADIENTATTRIBUTE_HXX
105 
106 // eof
107