Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / rendering / XBezierPolyPolygon2D.idl
blobfd8ff0eecbd6529f47ba88572a1d464482650b93
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef __com_sun_star_rendering_XBezierPolyPolygon2D_idl__
20 #define __com_sun_star_rendering_XBezierPolyPolygon2D_idl__
22 #include <com/sun/star/uno/XInterface.idl>
23 #include <com/sun/star/lang/IndexOutOfBoundsException.idl>
24 #include <com/sun/star/rendering/XPolyPolygon2D.idl>
25 #include <com/sun/star/geometry/RealBezierSegment2D.idl>
27 module com { module sun { module star { module rendering {
29 /** This is a specialized interface for a 2D poly-polygon containing
30 straight line and Bezier segments.<p>
32 This poly-polygon can contain polygons consisting of a mixture of
33 cubic Bezier curves and straight lines. As the straight line is a
34 special case of a cubic Bezier curve (control points collinear
35 with the line through start and end point), this can be expressed
36 uniformly with a sequence of RealBezierSegment2Ds.<p>
38 By convention, a RealBezierSegment2D is a straight
39 line segment, if all three contained points are strictly equal.<p>
41 @since OOo 2.0
43 interface XBezierPolyPolygon2D : XPolyPolygon2D
45 /** Query subset of this poly-polygon.<p>
47 Query subset of this poly-polygon, starting at the given
48 polygon and the given point within that polygon, and
49 containing the specified number of polygons and points in the
50 last polygon.<p>
52 @param nPolygonIndex
53 The index of the polygon to start point retrieval with. This
54 index must be in the range [0,numPolygons-1].
56 @param nNumberOfPolygons
57 The number of polygons to extract. This value must not exceed
58 numPolygons-nPolygonIndex.
60 @param nPointIndex
61 The index of the first point in the first polygon to
62 extract. This value must not exceed the number of points in
63 this polygon minus one.
65 @param nNumberOfPoints
66 The number of points to extract from the last polygon. This
67 value must not exceed the number of points in this last
68 polygon minus one.
70 @returns the sequence of extracted points.
72 @throws com::sun::star::lang::IndexOutOfBoundsException
73 if one of the given values exceed the permissible range.
75 sequence< sequence < ::com::sun::star::geometry::RealBezierSegment2D > > getBezierSegments( [in] long nPolygonIndex, [in] long nNumberOfPolygons, [in] long nPointIndex, [in] long nNumberOfPoints )
76 raises (com::sun::star::lang::IndexOutOfBoundsException);
79 /** Set the specified sequence of Bezier segments to the poly-polygon.
81 This method can either set the whole poly-polygon to the new
82 data, or insert the segments at the given index
84 @param points the points.
86 @param nPolygonIndex
87 The index of the polygon to start segment insertion with. This
88 index must be in the range [0,numPolygons], and the insertion
89 will take place <em>before</em> this position (i.e. when
90 specifying 0 here, the given Bezier sequence will precede all
91 existing polygons already within the poly-polygon). To append
92 to a poly-polygon, call setPoints() with
93 XBezierPolyPolygon2D::getNumberOfPolygons()
94 as the polygon index. If nPolygonIndex is -1, the given
95 Bezier sequence <em>replaces</em> the poly-polygon content,
96 such that after this method completes, it contains exactly the
97 specified Bezier segment data.
99 @throws com::sun::star::lang::IndexOutOfBoundsException
100 if one of the given values exceed the permissible range.
102 void setBezierSegments( [in] sequence< sequence< ::com::sun::star::geometry::RealBezierSegment2D > > points, [in] long nPolygonIndex )
103 raises (com::sun::star::lang::IndexOutOfBoundsException);
106 /** Get a single point from the poly-polygon.
108 @param nPolygonIndex
109 The index of the polygon where the point to be extract is
110 contained within. This index must be in the range
111 [0,numPolygons-1].
113 @param nPointIndex
114 The index of the point in the polygon specified by
115 nPolygonIndex, which is to be retrieved. This value must not
116 exceed the number of points in this polygon minus one.
118 @returns the requested point.
120 @throws com::sun::star::lang::IndexOutOfBoundsException
121 if one of the given values exceed the permissible range.
124 ::com::sun::star::geometry::RealBezierSegment2D getBezierSegment( [in] long nPolygonIndex, [in] long nPointIndex )
125 raises (com::sun::star::lang::IndexOutOfBoundsException);
128 /** Set a single point on the poly-polygon.<p>
130 The remaining points of the poly-polygon will not be changed by
131 this method. Use
132 XBezierPolyPolygon2D::getNumberOfPolygons()
134 XBezierPolyPolygon2D::getNumberOfPolygonPoints()
135 to append points or polygons, respectively.<p>
137 @param point
138 The point to be set at the poly-polygon.
140 @param nPolygonIndex
141 The index of the polygon to insert the point in. This index
142 must be in the range [0,numPolygons].
144 @param nPointIndex
145 The index of the point in the polygon specified by
146 nPolygonIndex, which is to be set. This value must not
147 exceed the number of points in this polygon.
149 @throws com::sun::star::lang::IndexOutOfBoundsException
150 if one of the given values exceed the permissible range.
152 void setBezierSegment( [in] ::com::sun::star::geometry::RealBezierSegment2D point, [in] long nPolygonIndex, [in] long nPointIndex )
153 raises (com::sun::star::lang::IndexOutOfBoundsException);
156 }; }; }; };
158 #endif
160 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */