merged tag ooo/OOO330_m14
[LibreOffice.git] / offapi / com / sun / star / rendering / XPolyPolygon2D.idl
blob47b61210d3fd2bbd19d0bb575a559e89f9a44ead
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_XPolyPolygon2D_idl__
28 #define __com_sun_star_rendering_XPolyPolygon2D_idl__
30 #ifndef __com_sun_star_uno_XInterface_idl__
31 #include <com/sun/star/uno/XInterface.idl>
32 #endif
33 #ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__
34 #include <com/sun/star/lang/IndexOutOfBoundsException.idl>
35 #endif
36 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
37 #include <com/sun/star/lang/IllegalArgumentException.idl>
38 #endif
39 #ifndef __com_sun_star_rendering_FillRule_idl__
40 #include <com/sun/star/rendering/FillRule.idl>
41 #endif
42 #ifndef __com_sun_star_geometry_RealPoint2D_idl__
43 #include <com/sun/star/geometry/RealPoint2D.idl>
44 #endif
46 module com { module sun { module star { module rendering {
48 /** Generic interface for poly-polygons in 2D.
50 @since OOo 2.0.0
52 interface XPolyPolygon2D : ::com::sun::star::uno::XInterface
54 /** Add the specified poly-polygon at the given position.
56 One can do symbolic path construction with this method. The
57 poly-polygons added by this method are not joined in the sense
58 that they participate in mutual fill rule calculations like
59 the polygons inside a single poly-polygon do. When rendering
60 such a poly-polygon without transparency, it will look like the
61 constituing poly-polygons rendered separately on top of
62 another. Alas, when rendering with transparency, separate
63 rendering will combine the alpha of overlapping areas, whereas
64 addPolyPolygon results in constant alpha, regardless how many
65 internal poly-polygons overlap at a single place.
67 @param position
68 The poly-polygon will be added at the given position, i.e. the
69 upper, left edge of the referenced poly-polygon will be at
70 this position relative to the target poly-polygon.
72 @param polyPolygon
73 The poly-polygon to add. Note that the content of this
74 poly-polygon is copied, later changes to polyPolygon will have
75 no effect on the poly-polygon it was added to.
77 @throws a
78 <type>com::sun::star::lang::IllegalArgumentException</type>,
79 if the XPolyPolygon2D parameter does not support one of the
80 data-providing derivative interfaces
81 (<type>XBezierPolyPolygon2D</type>,
82 <type>XLinePolyPolygon2D</type>).
84 void addPolyPolygon( [in] ::com::sun::star::geometry::RealPoint2D position, [in] XPolyPolygon2D polyPolygon )
85 raises (com::sun::star::lang::IllegalArgumentException);
87 //-------------------------------------------------------------------------
89 /** Query number of polygons inside this poly-polygon
91 long getNumberOfPolygons();
93 //-------------------------------------------------------------------------
95 /** Query number of points inside given polygon
97 @param polygon
98 The index of the polygon to query the number of points
99 for. Must be in the range [0,getNumberOfPolygons()-1].
101 long getNumberOfPolygonPoints( [in] long polygon )
102 raises (com::sun::star::lang::IndexOutOfBoundsException);
104 //-------------------------------------------------------------------------
106 /** Query the rule used to determine inside and outside of the
107 poly-polygon.
109 FillRule getFillRule();
111 //-------------------------------------------------------------------------
113 /** Set the rule used to determine inside and outside of the
114 poly-polygon.
116 void setFillRule( [in] FillRule fillRule );
118 //-------------------------------------------------------------------------
120 /** Query whether the specified polygon outline is closed.
122 boolean isClosed( [in] long index )
123 raises (com::sun::star::lang::IndexOutOfBoundsException);
125 //-------------------------------------------------------------------------
127 /** Set the close state of the specified polygon outline. Use -1
128 as the index to affect all polygons of this poly-polygon.
130 void setClosed( [in] long index, [in] boolean closedState )
131 raises (com::sun::star::lang::IndexOutOfBoundsException);
134 }; }; }; };
136 #endif