1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 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. 14 * 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). 20 * 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. 25 * 26 ************************************************************************/ 27#ifndef __com_sun_star_rendering_Texture_idl__ 28#define __com_sun_star_rendering_Texture_idl__ 29 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 36 37module com { module sun { module star { module rendering { 38 39published interface XBitmap; 40published interface XParametricPolyPolygon2D; 41 42/** Contains all information needed to define a texture.<p> 43 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> 48 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> 53 54 @since OOo 2.0 55 */ 56published struct Texture 57{ 58 /** Texture transformation from texture to primitive space.<p> 59 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> 67 */ 68 ::com::sun::star::geometry::AffineMatrix2D AffineTransform; 69 70 //------------------------------------------------------------------------- 71 72 /** Overall transparency of the texturing.<p> 73 74 The valid range for this value is [0,1], where 0 denotes 75 complete transparency, and 1 denotes fully opaque.<p> 76 */ 77 double Alpha; 78 79 //------------------------------------------------------------------------- 80 81 /** Specifies the number of parameterized polygons used for the texture.<p> 82 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> 92 */ 93 long NumberOfHatchPolygons; 94 95 //------------------------------------------------------------------------- 96 97 /** Texture bitmap.<p> 98 99 This member can be used together with gradient and hatching.<p> 100 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> 103 */ 104 XBitmap Bitmap; 105 106 //------------------------------------------------------------------------- 107 108 /** Texture gradient.<p> 109 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> 113 */ 114 XParametricPolyPolygon2D Gradient; 115 116 //------------------------------------------------------------------------- 117 118 /** Texture hatching.<p> 119 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> 123 */ 124 XParametricPolyPolygon2D Hatching; 125 126 //------------------------------------------------------------------------- 127 128 /** Specifies the stroke attributes used for hatching.<p> 129 130 Use 0.0 as the strokeWidth here to indicate hair lines.<p> 131 */ 132 StrokeAttributes HatchAttributes; 133 134 //------------------------------------------------------------------------- 135 136 /** Repeat mode of the texture, x direction.<p> 137 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> 141 */ 142 byte RepeatModeX; 143 144 /** Repeat mode of the texture, y direction.<p> 145 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> 149 */ 150 byte RepeatModeY; 151 152}; 153 154}; }; }; }; 155 156#endif 157