1*cdf0e10cSrcweir/*************************************************************************
2*cdf0e10cSrcweir *
3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir *
5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir *
7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir *
9*cdf0e10cSrcweir * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir *
11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir *
15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir *
21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir *
26*cdf0e10cSrcweir ************************************************************************/
27*cdf0e10cSrcweir#ifndef __com_sun_star_rendering_XPolyPolygon2D_idl__
28*cdf0e10cSrcweir#define __com_sun_star_rendering_XPolyPolygon2D_idl__
29*cdf0e10cSrcweir
30*cdf0e10cSrcweir#ifndef __com_sun_star_uno_XInterface_idl__
31*cdf0e10cSrcweir#include <com/sun/star/uno/XInterface.idl>
32*cdf0e10cSrcweir#endif
33*cdf0e10cSrcweir#ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__
34*cdf0e10cSrcweir#include <com/sun/star/lang/IndexOutOfBoundsException.idl>
35*cdf0e10cSrcweir#endif
36*cdf0e10cSrcweir#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
37*cdf0e10cSrcweir#include <com/sun/star/lang/IllegalArgumentException.idl>
38*cdf0e10cSrcweir#endif
39*cdf0e10cSrcweir#ifndef __com_sun_star_rendering_FillRule_idl__
40*cdf0e10cSrcweir#include <com/sun/star/rendering/FillRule.idl>
41*cdf0e10cSrcweir#endif
42*cdf0e10cSrcweir#ifndef __com_sun_star_geometry_RealPoint2D_idl__
43*cdf0e10cSrcweir#include <com/sun/star/geometry/RealPoint2D.idl>
44*cdf0e10cSrcweir#endif
45*cdf0e10cSrcweir
46*cdf0e10cSrcweirmodule com { module sun { module star { module rendering {
47*cdf0e10cSrcweir
48*cdf0e10cSrcweir/** Generic interface for poly-polygons in 2D.
49*cdf0e10cSrcweir
50*cdf0e10cSrcweir    @since OOo 2.0
51*cdf0e10cSrcweir */
52*cdf0e10cSrcweirpublished interface XPolyPolygon2D : ::com::sun::star::uno::XInterface
53*cdf0e10cSrcweir{
54*cdf0e10cSrcweir    /** Add the specified poly-polygon at the given position.
55*cdf0e10cSrcweir
56*cdf0e10cSrcweir        One can do symbolic path construction with this method. The
57*cdf0e10cSrcweir        poly-polygons added by this method are not joined in the sense
58*cdf0e10cSrcweir        that they participate in mutual fill rule calculations like
59*cdf0e10cSrcweir        the polygons inside a single poly-polygon do. When rendering
60*cdf0e10cSrcweir        such a poly-polygon without transparency, it will look like the
61*cdf0e10cSrcweir        constituing poly-polygons rendered separately on top of
62*cdf0e10cSrcweir        another. Alas, when rendering with transparency, separate
63*cdf0e10cSrcweir        rendering will combine the alpha of overlapping areas, whereas
64*cdf0e10cSrcweir        addPolyPolygon results in constant alpha, regardless how many
65*cdf0e10cSrcweir        internal poly-polygons overlap at a single place.
66*cdf0e10cSrcweir
67*cdf0e10cSrcweir        @param position
68*cdf0e10cSrcweir        The poly-polygon will be added at the given position, i.e. the
69*cdf0e10cSrcweir        upper, left edge of the referenced poly-polygon will be at
70*cdf0e10cSrcweir        this position relative to the target poly-polygon.
71*cdf0e10cSrcweir
72*cdf0e10cSrcweir        @param polyPolygon
73*cdf0e10cSrcweir        The poly-polygon to add. Note that the content of this
74*cdf0e10cSrcweir        poly-polygon is copied, later changes to polyPolygon will have
75*cdf0e10cSrcweir        no effect on the poly-polygon it was added to.
76*cdf0e10cSrcweir
77*cdf0e10cSrcweir        @throws a
78*cdf0e10cSrcweir        <type>com::sun::star::lang::IllegalArgumentException</type>,
79*cdf0e10cSrcweir        if the XPolyPolygon2D parameter does not support one of the
80*cdf0e10cSrcweir        data-providing derivative interfaces
81*cdf0e10cSrcweir        (<type>XBezierPolyPolygon2D</type>,
82*cdf0e10cSrcweir        <type>XLinePolyPolygon2D</type>).
83*cdf0e10cSrcweir     */
84*cdf0e10cSrcweir    void		addPolyPolygon( [in] ::com::sun::star::geometry::RealPoint2D position, [in] XPolyPolygon2D polyPolygon )
85*cdf0e10cSrcweir        raises (com::sun::star::lang::IllegalArgumentException);
86*cdf0e10cSrcweir
87*cdf0e10cSrcweir    //-------------------------------------------------------------------------
88*cdf0e10cSrcweir
89*cdf0e10cSrcweir    /** Query number of polygons inside this poly-polygon
90*cdf0e10cSrcweir     */
91*cdf0e10cSrcweir    long		getNumberOfPolygons();
92*cdf0e10cSrcweir
93*cdf0e10cSrcweir    //-------------------------------------------------------------------------
94*cdf0e10cSrcweir
95*cdf0e10cSrcweir    /** Query number of points inside given polygon
96*cdf0e10cSrcweir
97*cdf0e10cSrcweir        @param polygon
98*cdf0e10cSrcweir        The index of the polygon to query the number of points
99*cdf0e10cSrcweir        for. Must be in the range [0,getNumberOfPolygons()-1].
100*cdf0e10cSrcweir     */
101*cdf0e10cSrcweir    long		getNumberOfPolygonPoints( [in] long polygon )
102*cdf0e10cSrcweir        raises (com::sun::star::lang::IndexOutOfBoundsException);
103*cdf0e10cSrcweir
104*cdf0e10cSrcweir    //-------------------------------------------------------------------------
105*cdf0e10cSrcweir
106*cdf0e10cSrcweir    /** Query the rule used to determine inside and outside of the
107*cdf0e10cSrcweir        poly-polygon.
108*cdf0e10cSrcweir     */
109*cdf0e10cSrcweir    FillRule	getFillRule();
110*cdf0e10cSrcweir
111*cdf0e10cSrcweir    //-------------------------------------------------------------------------
112*cdf0e10cSrcweir
113*cdf0e10cSrcweir    /** Set the rule used to determine inside and outside of the
114*cdf0e10cSrcweir        poly-polygon.
115*cdf0e10cSrcweir     */
116*cdf0e10cSrcweir    void		setFillRule( [in] FillRule fillRule );
117*cdf0e10cSrcweir
118*cdf0e10cSrcweir    //-------------------------------------------------------------------------
119*cdf0e10cSrcweir
120*cdf0e10cSrcweir    /** Query whether the specified polygon outline is closed.
121*cdf0e10cSrcweir     */
122*cdf0e10cSrcweir    boolean		isClosed( [in] long index )
123*cdf0e10cSrcweir        raises (com::sun::star::lang::IndexOutOfBoundsException);
124*cdf0e10cSrcweir
125*cdf0e10cSrcweir    //-------------------------------------------------------------------------
126*cdf0e10cSrcweir
127*cdf0e10cSrcweir    /** Set the close state of the specified polygon outline. Use -1
128*cdf0e10cSrcweir        as the index to affect all polygons of this poly-polygon.
129*cdf0e10cSrcweir     */
130*cdf0e10cSrcweir    void		setClosed( [in] long index, [in] boolean closedState )
131*cdf0e10cSrcweir        raises (com::sun::star::lang::IndexOutOfBoundsException);
132*cdf0e10cSrcweir};
133*cdf0e10cSrcweir
134*cdf0e10cSrcweir}; }; }; };
135*cdf0e10cSrcweir
136*cdf0e10cSrcweir#endif
137