merged tag ooo/OOO330_m14
[LibreOffice.git] / offapi / com / sun / star / rendering / Texture.idl
bloba8eacf515c763f47ee7c941754d4760da76ad00e
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
27 #ifndef __com_sun_star_rendering_Texture_idl__
28 #define __com_sun_star_rendering_Texture_idl__
30 #ifndef __com_sun_star_geometry_AffineMatrix2D_idl__
31 #include <com/sun/star/geometry/AffineMatrix2D.idl>
32 #endif
33 #ifndef __com_sun_star_rendering_StrokeAttributes_idl__
34 #include <com/sun/star/rendering/StrokeAttributes.idl>
35 #endif
37 module com { module sun { module star { module rendering {
39 interface XBitmap;
40 interface XParametricPolyPolygon2D;
42 /** Contains all information needed to define a texture.<p>
44 This structure contains all information necessary to define a
45 texture. A texture describes the filled area of polygonal shapes,
46 providing its own transformation matrix, repeat mode, and
47 transparency.<p>
49 To achieve uniformity, if this texture has a bitmap set, it is
50 scaled in such a way that it will cover the same [0,1]x[0,1] box
51 as the hatch and the gradient. The transformation member can then
52 be used to scale the complete texture as it fits suit.<p>
54 @since OOo 2.0.0
56 struct Texture
58 /** Texture transformation from texture to primitive space.<p>
60 This member allows arbitrary transformations of the texture,
61 relative to the textured primitive. Thus, the total
62 transformation from the [0,1]x[0,1] texture space to the
63 device coordinate space is the concatenation of texture,
64 render state, and view state transformation (with only render
65 state and view state transformation being applied to the
66 textured primitive).<p>
68 ::com::sun::star::geometry::AffineMatrix2D AffineTransform;
70 //-------------------------------------------------------------------------
72 /** Overall transparency of the texturing.<p>
74 The valid range for this value is [0,1], where 0 denotes
75 complete transparency, and 1 denotes fully opaque.<p>
77 double Alpha;
79 //-------------------------------------------------------------------------
81 /** Specifies the number of parameterized polygons used for the texture.<p>
83 This member specifies the number of polygons the parametric
84 polygon interface is queried. The continuous range [0,1] of
85 the XParametricPolyPolygon::getOutline() method is divided up
86 into numberOfHatchPolygons equal parts, and for everyone of
87 these parts, the start of the interval is plugged into the
88 getOutline method. For example, if numberOfHatchPolygons is 2,
89 then getOutline is called twice, once with 0.0 and once with
90 0.5. Use this parameter to control the density of the
91 hatching.<p>
93 long NumberOfHatchPolygons;
95 //-------------------------------------------------------------------------
97 /** Texture bitmap.<p>
99 This member can be used together with gradient and hatching.<p>
101 The bitmap is scaled to a one-by-one rectangle, to cover the
102 same area as both the gradient and the hatching.<p>
104 XBitmap Bitmap;
106 //-------------------------------------------------------------------------
108 /** Texture gradient.<p>
110 This member can be used together with bitmap and hatching. The
111 parametric polygons color value is used to fill the returned
112 polygonal outlines.<p>
114 XParametricPolyPolygon2D Gradient;
116 //-------------------------------------------------------------------------
118 /** Texture hatching.<p>
120 This member can be used together with bitmap and gradient. The
121 parametric polygons color value is used to stroke the returned
122 polygonal outlines.<p>
124 XParametricPolyPolygon2D Hatching;
126 //-------------------------------------------------------------------------
128 /** Specifies the stroke attributes used for hatching.<p>
130 Use 0.0 as the strokeWidth here to indicate hair lines.<p>
132 StrokeAttributes HatchAttributes;
134 //-------------------------------------------------------------------------
136 /** Repeat mode of the texture, x direction.<p>
138 The repeat mode is separated into x and y direction, this is
139 the x direction part. Permissible values are from the
140 <type>TexturingMode</type> constants.<p>
142 byte RepeatModeX;
144 /** Repeat mode of the texture, y direction.<p>
146 The repeat mode is separated into x and y direction, this is
147 the y direction part. Permissible values are from the
148 <type>TexturingMode</type> constants.<p>
150 byte RepeatModeY;
154 }; }; }; };
156 #endif