update dev300-m58
[ooovba.git] / offapi / com / sun / star / rendering / XBezierPolyPolygon2D.idl
blobfc7d3c5c791f4fa6efcddc8d2f5f2887c1761ae5
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XBezierPolyPolygon2D.idl,v $
10 * $Revision: 1.6 $
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_XBezierPolyPolygon2D_idl__
31 #define __com_sun_star_rendering_XBezierPolyPolygon2D_idl__
33 #ifndef __com_sun_star_uno_XInterface_idl__
34 #include <com/sun/star/uno/XInterface.idl>
35 #endif
36 #ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__
37 #include <com/sun/star/lang/IndexOutOfBoundsException.idl>
38 #endif
39 #ifndef __com_sun_star_rendering_XPolyPolygon2D_idl__
40 #include <com/sun/star/rendering/XPolyPolygon2D.idl>
41 #endif
42 #ifndef __com_sun_star_geometry_RealBezierSegment2D_idl__
43 #include <com/sun/star/geometry/RealBezierSegment2D.idl>
44 #endif
46 module com { module sun { module star { module rendering {
48 /** This is a specialized interface for a 2D poly-polygon containing
49 straight line and bezier segments.<p>
51 This poly-polygon can contain polygons consisting of a mixture of
52 cubic bezier curves and straight lines. As the straight line is a
53 special case of a cubic bezier curve (control points collinear
54 with the line through start and end point), this can be expressed
55 uniformly with a sequence of <type>RealBezierSegment2D</type>s.<p>
57 By convention, a <type>RealBezierSegment2D</type> is a straight
58 line segment, if all three contained points are strictly equal.<p>
60 @since OOo 2.0.0
62 interface XBezierPolyPolygon2D : XPolyPolygon2D
64 /** Query subset of this poly-polygon.<p>
66 Query subset of this poly-polygon, starting at the given
67 polygon and the given point within that polygon, and
68 containing the specified number of polygons and points in the
69 last polygon.<p>
71 @param nPolygonIndex
72 The index of the polygon to start point retrieval with. This
73 index must be in the range [0,numPolygons-1].
75 @param nNumberOfPolygons
76 The number of polygons to extract. This value must not exceed
77 numPolygons-nPolygonIndex.
79 @param nPointIndex
80 The index of the first point in the first polygon to
81 extract. This value must not exceed the number of points in
82 this polygon minus one.
84 @param nNumberOfPoints
85 The number of points to extract from the last polygon. This
86 value must not exceed the number of points in this last
87 polygon minus one.
89 @returns the sequence of extracted points.
91 @throws <type>com::sun::star::lang::IndexOutOfBoundsException</type>
92 if one of the given values exceed the permissible range.
94 sequence< sequence < ::com::sun::star::geometry::RealBezierSegment2D > > getBezierSegments( [in] long nPolygonIndex, [in] long nNumberOfPolygons, [in] long nPointIndex, [in] long nNumberOfPoints )
95 raises (com::sun::star::lang::IndexOutOfBoundsException);
97 //-------------------------------------------------------------------------
99 /** Set the specified sequence of bezier segments to the poly-polygon.
101 This method can either set the whole poly-polygon to the new
102 data, or insert the segments at the given index
104 @param nPolygonIndex
105 The index of the polygon to start segment insertion with. This
106 index must be in the range [0,numPolygons], and the insertion
107 will take place <em>before</em> this position (i.e. when
108 specifying 0 here, the given bezier sequence will precede all
109 existing polygons already within the poly-polygon). To append
110 to a poly-polygon, call setPoints() with
111 <member>XBezierPolyPolygon2D::getNumberOfPolygons()</member>
112 as the polygon index. If nPolygonIndex is -1, the given
113 bezier sequence <em>replaces</em> the poly-polygon content,
114 such that after this method completes, it contains exactly the
115 specified bezier segment data.
117 @throws <type>com::sun::star::lang::IndexOutOfBoundsException</type>
118 if one of the given values exceed the permissible range.
120 void setBezierSegments( [in] sequence< sequence< ::com::sun::star::geometry::RealBezierSegment2D > > points, [in] long nPolygonIndex )
121 raises (com::sun::star::lang::IndexOutOfBoundsException);
123 //-------------------------------------------------------------------------
125 /** Get a single point from the poly-polygon.
127 @param nPolygonIndex
128 The index of the polygon where the point to be extract is
129 contained within. This index must be in the range
130 [0,numPolygons-1].
132 @param nPointIndex
133 The index of the point in the polygon specified by
134 nPolygonIndex, which is to be retrieved. This value must not
135 exceed the number of points in this polygon minus one.
137 @returns the requested point.
139 @throws <type>com::sun::star::lang::IndexOutOfBoundsException</type>
140 if one of the given values exceed the permissible range.
143 ::com::sun::star::geometry::RealBezierSegment2D getBezierSegment( [in] long nPolygonIndex, [in] long nPointIndex )
144 raises (com::sun::star::lang::IndexOutOfBoundsException);
146 //-------------------------------------------------------------------------
148 /** Set a single point on the poly-polygon.<p>
150 The remaining points of the poly-polygon will not be changed by
151 this method. Use
152 <member>XBezierPolyPolygon2D::getNumberOfPolygons()</member>
154 <member>XBezierPolyPolygon2D::getNumberOfPolygonPoints()</member>
155 to append points or polygons, respectively.<p>
157 @param point
158 The point to be set at the poly-polygon.
160 @param nPolygonIndex
161 The index of the polygon to insert the point in. This index
162 must be in the range [0,numPolygons].
164 @param nPointIndex
165 The index of the point in the polygon specified by
166 nPolygonIndex, which is to be set. This value must not
167 exceed the number of points in this polygon.
169 @throws <type>com::sun::star::lang::IndexOutOfBoundsException</type>
170 if one of the given values exceed the permissible range.
172 void setBezierSegment( [in] ::com::sun::star::geometry::RealBezierSegment2D point, [in] long nPolygonIndex, [in] long nPointIndex )
173 raises (com::sun::star::lang::IndexOutOfBoundsException);
176 }; }; }; };
178 #endif