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_SDRATTRIBUTECREATOR_HXX
25 #define INCLUDED_SDR_PRIMITIVE2D_SDRATTRIBUTECREATOR_HXX
26 
27 #include <sal/types.h>
28 
29 //////////////////////////////////////////////////////////////////////////////
30 // predefines
31 class SfxItemSet;
32 class SdrText;
33 
34 namespace drawinglayer { namespace attribute {
35 	class SdrLineAttribute;
36 	class SdrLineStartEndAttribute;
37 	class SdrShadowAttribute;
38 	class SdrFillAttribute;
39 	class SdrTextAttribute;
40 	class FillGradientAttribute;
41 	class SdrFillBitmapAttribute;
42 	class SdrShadowTextAttribute;
43 	class SdrLineShadowTextAttribute;
44 	class SdrLineFillShadowTextAttribute;
45 	class SdrLineFillShadowAttribute3D;
46 	class SdrSceneAttribute;
47 	class SdrLightingAttribute;
48 	class SdrFillTextAttribute;
49 }}
50 
51 namespace basegfx {
52 	class B2DRange;
53 }
54 
55 //////////////////////////////////////////////////////////////////////////////
56 
57 namespace drawinglayer
58 {
59 	namespace primitive2d
60 	{
61 		// SdrAttribute creators
62 		attribute::SdrLineAttribute createNewSdrLineAttribute(
63 			const SfxItemSet& rSet);
64 
65 		attribute::SdrLineStartEndAttribute createNewSdrLineStartEndAttribute(
66 			const SfxItemSet& rSet,
67 			double fWidth);
68 
69 		attribute::SdrShadowAttribute createNewSdrShadowAttribute(
70 			const SfxItemSet& rSet);
71 
72 		attribute::SdrFillAttribute createNewSdrFillAttribute(
73 			const SfxItemSet& rSet);
74 
75 		// #i101508# Support handing over given text-to-border distances
76 		attribute::SdrTextAttribute createNewSdrTextAttribute(
77 			const SfxItemSet& rSet,
78 			const SdrText& rText,
79 			const sal_Int32* pLeft = 0,
80 			const sal_Int32* pUpper = 0,
81 			const sal_Int32* pRight = 0,
82 			const sal_Int32* pLower = 0);
83 
84 		attribute::FillGradientAttribute createNewTransparenceGradientAttribute(
85 			const SfxItemSet& rSet);
86 
87 		attribute::SdrFillBitmapAttribute createNewSdrFillBitmapAttribute(
88 			const SfxItemSet& rSet);
89 
90 		attribute::SdrShadowTextAttribute createNewSdrShadowTextAttribute(
91             const SfxItemSet& rSet,
92             const SdrText* pText,
93             bool bSuppressText); // #i98072# added option to suppress text on demand
94 
95 		attribute::SdrLineShadowTextAttribute createNewSdrLineShadowTextAttribute(
96 			const SfxItemSet& rSet,
97 			const SdrText* pText);
98 
99 		attribute::SdrLineFillShadowTextAttribute createNewSdrLineFillShadowTextAttribute(
100 			const SfxItemSet& rSet,
101 			const SdrText* pText);
102 
103 		attribute::SdrLineFillShadowAttribute3D createNewSdrLineFillShadowAttribute(
104 			const SfxItemSet& rSet,
105 			bool bSuppressFill);
106 
107 		attribute::SdrSceneAttribute createNewSdrSceneAttribute(
108 			const SfxItemSet& rSet);
109 
110 		attribute::SdrLightingAttribute createNewSdrLightingAttribute(
111 			const SfxItemSet& rSet);
112 
113 		// #i101508# Support handing over given text-to-border distances
114 		attribute::SdrFillTextAttribute createNewSdrFillTextAttribute(
115 			const SfxItemSet& rSet,
116 			const SdrText* pSdrText,
117 			const sal_Int32* pLeft = 0,
118 			const sal_Int32* pUpper = 0,
119 			const sal_Int32* pRight = 0,
120 			const sal_Int32* pLower = 0);
121 
122 		// helpers
123 		void calculateRelativeCornerRadius(
124 			sal_Int32 nRadius,
125 			const ::basegfx::B2DRange& rObjectRange,
126 			double& rfCornerRadiusX,
127 			double& rfCornerRadiusY);
128 
129 	} // end of namespace primitive2d
130 } // end of namespace drawinglayer
131 
132 //////////////////////////////////////////////////////////////////////////////
133 
134 #endif //INCLUDED_SDR_PRIMITIVE2D_SDRATTRIBUTECREATOR_HXX
135 
136 // eof
137