xref: /trunk/main/drawinglayer/inc/drawinglayer/attribute/fillgradientattribute.hxx (revision 3a7cf181c55416e69e525ddc0b38c22235ec1569)
1 /*************************************************************************
2  *
3  *  OpenOffice.org - a multi-platform office productivity suite
4  *
5  *  $RCSfile: fillattribute.hxx,v $
6  *
7  *  $Revision: 1.3 $
8  *
9  *  last change: $Author: aw $ $Date: 2008-05-27 14:11:16 $
10  *
11  *  The Contents of this file are made available subject to
12  *  the terms of GNU Lesser General Public License Version 2.1.
13  *
14  *
15  *    GNU Lesser General Public License Version 2.1
16  *    =============================================
17  *    Copyright 2005 by Sun Microsystems, Inc.
18  *    901 San Antonio Road, Palo Alto, CA 94303, USA
19  *
20  *    This library is free software; you can redistribute it and/or
21  *    modify it under the terms of the GNU Lesser General Public
22  *    License version 2.1, as published by the Free Software Foundation.
23  *
24  *    This library is distributed in the hope that it will be useful,
25  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
26  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
27  *    Lesser General Public License for more details.
28  *
29  *    You should have received a copy of the GNU Lesser General Public
30  *    License along with this library; if not, write to the Free Software
31  *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
32  *    MA  02111-1307  USA
33  *
34  ************************************************************************/
35 
36 #ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_FILLGRADIENTATTRIBUTE_HXX
37 #define INCLUDED_DRAWINGLAYER_ATTRIBUTE_FILLGRADIENTATTRIBUTE_HXX
38 
39 #include <drawinglayer/drawinglayerdllapi.h>
40 //////////////////////////////////////////////////////////////////////////////
41 // predefines
42 
43 namespace basegfx {
44     class BColor;
45 }
46 
47 namespace drawinglayer { namespace attribute {
48     class ImpFillGradientAttribute;
49 }}
50 
51 //////////////////////////////////////////////////////////////////////////////
52 // declarations
53 
54 namespace drawinglayer
55 {
56     namespace attribute
57     {
58         enum GradientStyle
59         {
60             GRADIENTSTYLE_LINEAR,
61             GRADIENTSTYLE_AXIAL,
62             GRADIENTSTYLE_RADIAL,
63             GRADIENTSTYLE_ELLIPTICAL,
64             GRADIENTSTYLE_SQUARE,
65             GRADIENTSTYLE_RECT
66         };
67     } // end of namespace attribute
68 } // end of namespace drawinglayer
69 
70 //////////////////////////////////////////////////////////////////////////////
71 
72 namespace drawinglayer
73 {
74     namespace attribute
75     {
76         class DRAWINGLAYER_DLLPUBLIC FillGradientAttribute
77         {
78         private:
79             ImpFillGradientAttribute*           mpFillGradientAttribute;
80 
81         public:
82             /// constructors/assignmentoperator/destructor
83             FillGradientAttribute(
84                 GradientStyle eStyle,
85                 double fBorder,
86                 double fOffsetX,
87                 double fOffsetY,
88                 double fAngle,
89                 const basegfx::BColor& rStartColor,
90                 const basegfx::BColor& rEndColor,
91                 sal_uInt16 nSteps);
92             FillGradientAttribute();
93             FillGradientAttribute(const FillGradientAttribute& rCandidate);
94             FillGradientAttribute& operator=(const FillGradientAttribute& rCandidate);
95             ~FillGradientAttribute();
96 
97             // checks if the incarnation is default constructed
98             bool isDefault() const;
99 
100             // compare operator
101             bool operator==(const FillGradientAttribute& rCandidate) const;
102 
103             // data read access
104             GradientStyle getStyle() const;
105             double getBorder() const;
106             double getOffsetX() const;
107             double getOffsetY() const;
108             double getAngle() const;
109             const basegfx::BColor& getStartColor() const;
110             const basegfx::BColor& getEndColor() const;
111             sal_uInt16 getSteps() const;
112         };
113     } // end of namespace attribute
114 } // end of namespace drawinglayer
115 
116 //////////////////////////////////////////////////////////////////////////////
117 
118 #endif //INCLUDED_DRAWINGLAYER_ATTRIBUTE_FILLGRADIENTATTRIBUTE_HXX
119 
120 // eof
121