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_RenderState_idl__
28#define __com_sun_star_rendering_RenderState_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_XColorSpace_idl__
34#include <com/sun/star/rendering/XColorSpace.idl>
35#endif
36
37module com { module sun { module star { module rendering {
38
39published interface XPolyPolygon2D;
40
41/** This structure contains information passed to each
42    <type>XCanvas</type> render operation.<p>
43
44    This structure contains information considered as the render
45    state, i.e. the common setup required to render each individual
46    <type>XCanvas</type> primitive.<p>
47
48    @since OOo 2.0
49 */
50published struct RenderState
51{
52    /** The affine transform associated with this render
53        operation.<p>
54
55        This is used to transform coordinates of canvas primitives
56        from user space to view space (from which they are
57        subsequently transformed to device space by the view
58        transform).<p>
59     */
60    ::com::sun::star::geometry::AffineMatrix2D	AffineTransform;
61
62    //-------------------------------------------------------------------------
63
64    /** The clipping area associated with this render operation.<p>
65
66        This clipping is interpreted in the user coordinate system,
67        i.e. subject to the render state transform followed by the
68        view transform before mapped to device coordinate space.<p>
69
70        Specifying an empty interface denotes no clipping,
71        i.e. everything rendered to the canvas will be visible
72        (subject to device-dependent constraints, of
73        course). Specifying an empty XPolyPolygon2D, i.e. a
74        poly-polygon containing zero polygons, or an XPolyPolygon2D
75        with any number of empty sub-polygons, denotes the NULL
76        clip. That means, nothing rendered to the canvas will be
77        visible.<p>
78     */
79    XPolyPolygon2D										Clip;
80
81    //-------------------------------------------------------------------------
82
83    /** The device color associated with this render operation.<p>
84
85        Note that this need not be RGB here, but depends on the active
86        device color space.<p>
87
88        @see XGraphicDevice
89        @see XColorSpace
90     */
91    sequence<ColorComponent>							DeviceColor;
92
93    //-------------------------------------------------------------------------
94
95    /** The composition mode associated with this render
96        operation.<p>
97
98        The composite mode determines in which way the primitive and
99        possibly existing background is combined. The permissible
100        values must be one out of the <type>CompositeOperation</type>
101        constants.<p>
102     */
103    byte												CompositeOperation;
104};
105
106}; }; }; };
107
108#endif
109