merged tag ooo/OOO330_m14
[LibreOffice.git] / offapi / com / sun / star / rendering / XBezierPolyPolygon2D.idl
blob973d33e8dfd19a2d665fe337e3e1c8149d03f6dd
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_XBezierPolyPolygon2D_idl__
28 #define __com_sun_star_rendering_XBezierPolyPolygon2D_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_rendering_XPolyPolygon2D_idl__
37 #include <com/sun/star/rendering/XPolyPolygon2D.idl>
38 #endif
39 #ifndef __com_sun_star_geometry_RealBezierSegment2D_idl__
40 #include <com/sun/star/geometry/RealBezierSegment2D.idl>
41 #endif
43 module com { module sun { module star { module rendering {
45 /** This is a specialized interface for a 2D poly-polygon containing
46 straight line and bezier segments.<p>
48 This poly-polygon can contain polygons consisting of a mixture of
49 cubic bezier curves and straight lines. As the straight line is a
50 special case of a cubic bezier curve (control points collinear
51 with the line through start and end point), this can be expressed
52 uniformly with a sequence of <type>RealBezierSegment2D</type>s.<p>
54 By convention, a <type>RealBezierSegment2D</type> is a straight
55 line segment, if all three contained points are strictly equal.<p>
57 @since OOo 2.0.0
59 interface XBezierPolyPolygon2D : XPolyPolygon2D
61 /** Query subset of this poly-polygon.<p>
63 Query subset of this poly-polygon, starting at the given
64 polygon and the given point within that polygon, and
65 containing the specified number of polygons and points in the
66 last polygon.<p>
68 @param nPolygonIndex
69 The index of the polygon to start point retrieval with. This
70 index must be in the range [0,numPolygons-1].
72 @param nNumberOfPolygons
73 The number of polygons to extract. This value must not exceed
74 numPolygons-nPolygonIndex.
76 @param nPointIndex
77 The index of the first point in the first polygon to
78 extract. This value must not exceed the number of points in
79 this polygon minus one.
81 @param nNumberOfPoints
82 The number of points to extract from the last polygon. This
83 value must not exceed the number of points in this last
84 polygon minus one.
86 @returns the sequence of extracted points.
88 @throws <type>com::sun::star::lang::IndexOutOfBoundsException</type>
89 if one of the given values exceed the permissible range.
91 sequence< sequence < ::com::sun::star::geometry::RealBezierSegment2D > > getBezierSegments( [in] long nPolygonIndex, [in] long nNumberOfPolygons, [in] long nPointIndex, [in] long nNumberOfPoints )
92 raises (com::sun::star::lang::IndexOutOfBoundsException);
94 //-------------------------------------------------------------------------
96 /** Set the specified sequence of bezier segments to the poly-polygon.
98 This method can either set the whole poly-polygon to the new
99 data, or insert the segments at the given index
101 @param nPolygonIndex
102 The index of the polygon to start segment insertion with. This
103 index must be in the range [0,numPolygons], and the insertion
104 will take place <em>before</em> this position (i.e. when
105 specifying 0 here, the given bezier sequence will precede all
106 existing polygons already within the poly-polygon). To append
107 to a poly-polygon, call setPoints() with
108 <member>XBezierPolyPolygon2D::getNumberOfPolygons()</member>
109 as the polygon index. If nPolygonIndex is -1, the given
110 bezier sequence <em>replaces</em> the poly-polygon content,
111 such that after this method completes, it contains exactly the
112 specified bezier segment data.
114 @throws <type>com::sun::star::lang::IndexOutOfBoundsException</type>
115 if one of the given values exceed the permissible range.
117 void setBezierSegments( [in] sequence< sequence< ::com::sun::star::geometry::RealBezierSegment2D > > points, [in] long nPolygonIndex )
118 raises (com::sun::star::lang::IndexOutOfBoundsException);
120 //-------------------------------------------------------------------------
122 /** Get a single point from the poly-polygon.
124 @param nPolygonIndex
125 The index of the polygon where the point to be extract is
126 contained within. This index must be in the range
127 [0,numPolygons-1].
129 @param nPointIndex
130 The index of the point in the polygon specified by
131 nPolygonIndex, which is to be retrieved. This value must not
132 exceed the number of points in this polygon minus one.
134 @returns the requested point.
136 @throws <type>com::sun::star::lang::IndexOutOfBoundsException</type>
137 if one of the given values exceed the permissible range.
140 ::com::sun::star::geometry::RealBezierSegment2D getBezierSegment( [in] long nPolygonIndex, [in] long nPointIndex )
141 raises (com::sun::star::lang::IndexOutOfBoundsException);
143 //-------------------------------------------------------------------------
145 /** Set a single point on the poly-polygon.<p>
147 The remaining points of the poly-polygon will not be changed by
148 this method. Use
149 <member>XBezierPolyPolygon2D::getNumberOfPolygons()</member>
151 <member>XBezierPolyPolygon2D::getNumberOfPolygonPoints()</member>
152 to append points or polygons, respectively.<p>
154 @param point
155 The point to be set at the poly-polygon.
157 @param nPolygonIndex
158 The index of the polygon to insert the point in. This index
159 must be in the range [0,numPolygons].
161 @param nPointIndex
162 The index of the point in the polygon specified by
163 nPolygonIndex, which is to be set. This value must not
164 exceed the number of points in this polygon.
166 @throws <type>com::sun::star::lang::IndexOutOfBoundsException</type>
167 if one of the given values exceed the permissible range.
169 void setBezierSegment( [in] ::com::sun::star::geometry::RealBezierSegment2D point, [in] long nPolygonIndex, [in] long nPointIndex )
170 raises (com::sun::star::lang::IndexOutOfBoundsException);
173 }; }; }; };
175 #endif