merge the formfield patch from ooo-build
[ooovba.git] / offapi / com / sun / star / rendering / Texture.idl
blobf130d28e600c5703e1180cf6cc4938d3066a947b
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: Texture.idl,v $
10 * $Revision: 1.6 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __com_sun_star_rendering_Texture_idl__
31 #define __com_sun_star_rendering_Texture_idl__
33 #ifndef __com_sun_star_geometry_AffineMatrix2D_idl__
34 #include <com/sun/star/geometry/AffineMatrix2D.idl>
35 #endif
36 #ifndef __com_sun_star_rendering_StrokeAttributes_idl__
37 #include <com/sun/star/rendering/StrokeAttributes.idl>
38 #endif
40 module com { module sun { module star { module rendering {
42 interface XBitmap;
43 interface XParametricPolyPolygon2D;
45 /** Contains all information needed to define a texture.<p>
47 This structure contains all information necessary to define a
48 texture. A texture describes the filled area of polygonal shapes,
49 providing its own transformation matrix, repeat mode, and
50 transparency.<p>
52 To achieve uniformity, if this texture has a bitmap set, it is
53 scaled in such a way that it will cover the same [0,1]x[0,1] box
54 as the hatch and the gradient. The transformation member can then
55 be used to scale the complete texture as it fits suit.<p>
57 @since OOo 2.0.0
59 struct Texture
61 /** Texture transformation from texture to primitive space.<p>
63 This member allows arbitrary transformations of the texture,
64 relative to the textured primitive. Thus, the total
65 transformation from the [0,1]x[0,1] texture space to the
66 device coordinate space is the concatenation of texture,
67 render state, and view state transformation (with only render
68 state and view state transformation being applied to the
69 textured primitive).<p>
71 ::com::sun::star::geometry::AffineMatrix2D AffineTransform;
73 //-------------------------------------------------------------------------
75 /** Overall transparency of the texturing.<p>
77 The valid range for this value is [0,1], where 0 denotes
78 complete transparency, and 1 denotes fully opaque.<p>
80 double Alpha;
82 //-------------------------------------------------------------------------
84 /** Specifies the number of parameterized polygons used for the texture.<p>
86 This member specifies the number of polygons the parametric
87 polygon interface is queried. The continuous range [0,1] of
88 the XParametricPolyPolygon::getOutline() method is divided up
89 into numberOfHatchPolygons equal parts, and for everyone of
90 these parts, the start of the interval is plugged into the
91 getOutline method. For example, if numberOfHatchPolygons is 2,
92 then getOutline is called twice, once with 0.0 and once with
93 0.5. Use this parameter to control the density of the
94 hatching.<p>
96 long NumberOfHatchPolygons;
98 //-------------------------------------------------------------------------
100 /** Texture bitmap.<p>
102 This member can be used together with gradient and hatching.<p>
104 The bitmap is scaled to a one-by-one rectangle, to cover the
105 same area as both the gradient and the hatching.<p>
107 XBitmap Bitmap;
109 //-------------------------------------------------------------------------
111 /** Texture gradient.<p>
113 This member can be used together with bitmap and hatching. The
114 parametric polygons color value is used to fill the returned
115 polygonal outlines.<p>
117 XParametricPolyPolygon2D Gradient;
119 //-------------------------------------------------------------------------
121 /** Texture hatching.<p>
123 This member can be used together with bitmap and gradient. The
124 parametric polygons color value is used to stroke the returned
125 polygonal outlines.<p>
127 XParametricPolyPolygon2D Hatching;
129 //-------------------------------------------------------------------------
131 /** Specifies the stroke attributes used for hatching.<p>
133 Use 0.0 as the strokeWidth here to indicate hair lines.<p>
135 StrokeAttributes HatchAttributes;
137 //-------------------------------------------------------------------------
139 /** Repeat mode of the texture, x direction.<p>
141 The repeat mode is separated into x and y direction, this is
142 the x direction part. Permissible values are from the
143 <type>TexturingMode</type> constants.<p>
145 byte RepeatModeX;
147 /** Repeat mode of the texture, y direction.<p>
149 The repeat mode is separated into x and y direction, this is
150 the y direction part. Permissible values are from the
151 <type>TexturingMode</type> constants.<p>
153 byte RepeatModeY;
157 }; }; }; };
159 #endif