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#ifndef __com_sun_star_drawing_FillProperties_idl__
24#define __com_sun_star_drawing_FillProperties_idl__
25
26#ifndef __com_sun_star_drawing_FillStyle_idl__
27#include <com/sun/star/drawing/FillStyle.idl>
28#endif
29
30#ifndef __com_sun_star_util_Color_idl__
31#include <com/sun/star/util/Color.idl>
32#endif
33
34#ifndef __com_sun_star_awt_Gradient_idl__
35#include <com/sun/star/awt/Gradient.idl>
36#endif
37
38#ifndef __com_sun_star_drawing_Hatch_idl__
39#include <com/sun/star/drawing/Hatch.idl>
40#endif
41
42#ifndef __com_sun_star_drawing_BitmapMode_idl__
43#include <com/sun/star/drawing/BitmapMode.idl>
44#endif
45
46#ifndef __com_sun_star_awt_XBitmap_idl__
47#include <com/sun/star/awt/XBitmap.idl>
48#endif
49
50#ifndef __com_sun_star_drawing_RectanglePoint_idl__
51#include <com/sun/star/drawing/RectanglePoint.idl>
52#endif
53
54
55//=============================================================================
56
57module com { module sun { module star { module drawing {
58
59//=============================================================================
60
61/** This is a set of properties to describe the style for rendering an area.
62 */
63published service FillProperties
64{
65	//-------------------------------------------------------------------------
66    /** This enumeration selects the style the area will be filled with.
67	*/
68    [property] FillStyle FillStyle;
69
70	//-------------------------------------------------------------------------
71    /** If the property <member>FillStyle</member> is set to <const>
72        FillStyle::SOLID</const>, this is the color used.
73	*/
74	[property] com::sun::star::util::Color FillColor;
75
76	//-------------------------------------------------------------------------
77	/** This is the transparence of the filled area.
78
79        <p>This property is only valid if the property <member>FillStyle
80        </member> is set to <const>FillStyle::SOLID</const>.
81	*/
82	[property] short FillTransparence;
83
84	//-------------------------------------------------------------------------
85	/** If a gradient is used for transparency, this is the name of the
86		used transparence gradient style or it is empty. If you set the name
87		of a transparence gradient style contained in the document, this
88		style used.
89	*/
90	[property] string FillTransparenceGradientName;
91
92
93	//-------------------------------------------------------------------------
94	/** This describes the transparency of the fill area as a gradient.
95	*/
96	[optional, property] com::sun::star::awt::Gradient FillTransparenceGradient;
97
98	//-------------------------------------------------------------------------
99    /** If the property <member>FillStyle</member> is set to <const>
100        FillStyle::GRADIENT</const>, this is the name of the used fill
101        gradient style.
102	*/
103	[property] string FillGradientName;
104
105	//-------------------------------------------------------------------------
106    /** If the property <member>FillStyle</member> is set to <const>
107        FillStyle::GRADIENT</const>, this describes the gradient used.
108	*/
109	[optional, property] com::sun::star::awt::Gradient FillGradient;
110
111	//-------------------------------------------------------------------------
112    /** If the property <member>FillStyle</member> is set to <const>
113        FillStyle::HATCH</const>, this is the name of the used fill hatch
114        style.
115	*/
116	[property] string FillHatchName;
117
118	//-------------------------------------------------------------------------
119    /** If the property <member>FillStyle</member> is set to <const>
120        FillStyle::HATCH</const>, this describes the hatch used.
121	*/
122    [optional, property] Hatch FillHatch;
123
124    //-------------------------------------------------------------------------
125    /** if this is <TRUE/>, the transparent background of a
126        hatch filled area is drawn in the current background color.
127    */
128    [property] boolean FillBackground;
129
130	//-------------------------------------------------------------------------
131    /** If the property <memebr>FillStyle</member> is set to <const>
132        FillStyle::BITMAP</const>, this is the name of the used fill bitmap
133        style.
134	*/
135	[property] string FillBitmapName;
136
137	//-------------------------------------------------------------------------
138    /** If the property <member>FillStyle</member> is set to <const>
139        FillStyle::BITMAP</const>, this is the bitmap used.
140	*/
141	[optional, property] com::sun::star::awt::XBitmap FillBitmap;
142
143	//-------------------------------------------------------------------------
144    /** If the property <member>FillStyle</member> is set to <const>
145        FillStyle::BITMAP</const>, this is a URL to the bitmap used.
146	*/
147	[optional, property] string FillBitmapURL;
148
149	//-------------------------------------------------------------------------
150    /** This is the horizontal offset where the tile starts.
151
152        <p>It is given in percent in relation to the width of the bitmap.</p>
153	*/
154	[property] short FillBitmapPositionOffsetX;
155
156	//-------------------------------------------------------------------------
157    /** This is the vertical offset where the tile starts.
158
159        <p>It is given in percent in relation to the height of the bitmap.</p>
160	*/
161	[property] short FillBitmapPositionOffsetY;
162
163    //-------------------------------------------------------------------------
164    /** Every second line of tiles is moved the given percent of the
165        witdh of the bitmap.
166    */
167    [property] short FillBitmapOffsetX;
168
169    //-------------------------------------------------------------------------
170    /** Every second row of tiles is moved the given percent of the
171        height of the bitmap.
172    */
173    [property] short FillBitmapOffsetY;
174
175	//-------------------------------------------------------------------------
176	/** The RectanglePoint specifies the position inside of the bitmap to
177		use as the top left position for rendering.
178	*/
179    [property] RectanglePoint FillBitmapRectanglePoint;
180
181	//-------------------------------------------------------------------------
182    /** specifies if the size is given in percentage or as an absolute value.
183
184        <p>If this is <TRUE/>, the properties <member>FillBitmapSizeX</member>
185        and <member>FillBitmapSizeY</member> contain the size of the tile in
186        percent of the size of the original bitmap. If this is <FALSE/>, the
187        size of the tile is specified with 1/100th mm.
188	*/
189	[property] boolean FillBitmapLogicalSize;
190
191	//-------------------------------------------------------------------------
192	/** This is the width of the tile for filling.
193
194        <p>Depending on the property <member>FillBitmapLogicalSize</member>,
195        this is either relative or absolute.
196	*/
197	[property] long FillBitmapSizeX;
198
199	//-------------------------------------------------------------------------
200	/** This is the height of the tile for filling.
201
202        <p>Depending on the property <member>FillBitmapLogicalSize</member>,
203        this is either relative or absolute.
204	*/
205	[property] long FillBitmapSizeY;
206
207	//-------------------------------------------------------------------------
208	/** this enum selects how a area is filled with a single bitmap.
209
210        <p>This property corresponds to the properties <member>
211        FillBitmapStretch</member> and <member>FillBitmapTile</member>.</p>
212
213        <p>If set to <const>BitmapMode::REPEAT</const>, the property
214        FillBitmapStretch is set to <FALSE/>, and the property FillBitmapTile
215        is set to <TRUE/>.</p>
216
217        <p>If set to <const>BitmapMode::STRETCH</const>, the property
218        FillBitmapStretch is set to <TRUE/>, and the property FillBitmapTile
219        is set to <FALSE/>.</p>
220
221        <p>If set to <const>BitmapMode::NO_REPEAT</const>, both properties
222        FillBitmapStretch and FillBitmapTile are set to <FALSE/>.</p>
223	*/
224    [property] BitmapMode FillBitmapMode;
225
226    //-------------------------------------------------------------------------
227    /** if set, the fill bitmap is stretched to fill the area of the shape.
228
229        <p>This property should not be used anymore and is included here for
230        completeness. The <member>FillBitmapMode</member> property can be used
231        instead to set all supported bitmap modes.</p>
232
233        <p>If set to <TRUE/>, the value of the FillBitmapMode property changes
234        to <const>BitmapMode::STRETCH</const>. BUT: behaviour is undefined, if
235        the property <member>FillBitmapTile</member> is <TRUE/> too.</p>
236
237        <p>If set to <FALSE/>, the value of the FillBitmapMode property
238        changes to <const>BitmapMode::REPEAT</const> or <const>
239        BitmapMode::NO_REPEAT</const>, depending on the current value of the
240        <member>FillBitmapTile</member> property.</p>
241     */
242    [optional, property] boolean FillBitmapStretch;
243
244    //-------------------------------------------------------------------------
245    /** if set, the fill bitmap is repeated to fill the area of the shape.
246
247        <p>This property should not be used anymore and is included here for
248        completeness. The <member>FillBitmapMode</member> property can be used
249        instead to set all supported bitmap modes.</p>
250
251        <p>If set to <TRUE/>, the value of the FillBitmapMode property changes
252        to <const>BitmapMode::REPEAT</const>. BUT: behaviour is undefined, if
253        the property <member>FillBitmapStretch</member> is <TRUE/> too.</p>
254
255        <p>If set to <FALSE/>, the value of the FillBitmapMode property
256        changes to <const>BitmapMode::STRETCH</const> or <const>
257        BitmapMode::NO_REPEAT</const>, depending on the current value of the
258        <member>FillBitmapStretch</member> property.</p>
259     */
260    [optional, property] boolean FillBitmapTile;
261
262	//-------------------------------------------------------------------------
263};
264
265//=============================================================================
266
267}; }; }; };
268
269#endif
270
271