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