1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23#ifndef __com_sun_star_rendering_XLinePolyPolygon2D_idl__
24#define __com_sun_star_rendering_XLinePolyPolygon2D_idl__
25
26#ifndef __com_sun_star_uno_XInterface_idl__
27#include <com/sun/star/uno/XInterface.idl>
28#endif
29#ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__
30#include <com/sun/star/lang/IndexOutOfBoundsException.idl>
31#endif
32#ifndef __com_sun_star_geometry_RealPoint2D_idl__
33#include <com/sun/star/geometry/RealPoint2D.idl>
34#endif
35#ifndef __com_sun_star_rendering_XPolyPolygon2D_idl__
36#include <com/sun/star/rendering/XPolyPolygon2D.idl>
37#endif
38
39module com { module sun { module star { module rendering {
40
41/** Specialized interface for a 2D poly-polygon containing only straight line segments.
42
43    @since OpenOffice 2.0
44 */
45published interface XLinePolyPolygon2D : XPolyPolygon2D
46{
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.
51
52        @param nPolygonIndex
53        The index number of the polygon to start with extracting
54        points. Set to 0 to start with the first polygon.
55
56        @param nNumberOfPolygons
57        The number of polygons, starting with nPolygonIndex, to
58        extract points from. Set to -1 to extract all polygons,
59        starting with nPolygonIndex (i.e. a total of
60        getNumberOfPolygons() - nPolygonIndex polygons is extracted).
61
62        @param nPointIndex
63        The index of the point within the first polygon (that with the
64        index number nPolygonIndex) to start extraction with. Set to 0
65        to start with the first point in this polygon.
66
67        @param nNumberOfPoints
68        The number of points in the last polygon of the extraction
69        sequence, to be extracted. Set to -1 to extract all points
70        from the last polygon.
71     */
72    sequence< sequence< ::com::sun::star::geometry::RealPoint2D > > getPoints( [in] long nPolygonIndex, [in] long nNumberOfPolygons, [in] long nPointIndex, [in] long nNumberOfPoints )
73        raises (com::sun::star::lang::IndexOutOfBoundsException);
74
75    //-------------------------------------------------------------------------
76
77    /** Set the specified sequence of points to the poly-polygon.
78
79        This method can either set the whole poly-polygon to the new
80        data, or insert the points at the given index
81
82        @param nPolygonIndex
83        The index of the polygon to start point insertion with. This
84        index must be in the range [0,numPolygons], and the insertion
85        will take place <em>before</em> this position (i.e. when
86        specifying 0 here, the given point sequence will precede all
87        existing polygons already within the poly-polygon). To append
88        to a poly-polygon, call setPoints() with
89        <member>XLinePolyPolygon2D::getNumberOfPolygons()</member>
90        as the polygon index. If nPolygonIndex is -1, the given
91        sequence of points <em>replaces</em> the poly-polygon content,
92        such that after this method completes, it contains exactly the
93        specified point data.
94
95        @throws <type>com::sun::star::lang::IndexOutOfBoundsException</type>
96        if one of the given values exceed the permissible range.
97     */
98    void setPoints( [in] sequence< sequence< ::com::sun::star::geometry::RealPoint2D > > points, [in] long nPolygonIndex )
99        raises (com::sun::star::lang::IndexOutOfBoundsException);
100
101    //-------------------------------------------------------------------------
102
103    /** Get a single point from the poly-polygon
104     */
105    ::com::sun::star::geometry::RealPoint2D	getPoint( [in] long nPolygonIndex, [in] long nPointIndex )
106        raises (com::sun::star::lang::IndexOutOfBoundsException);
107
108    //-------------------------------------------------------------------------
109
110    /** Set a single point on the poly-polygon. The remaining points of
111        the poly-polygon will not be changed by this method.
112     */
113    void setPoint( [in] ::com::sun::star::geometry::RealPoint2D point, [in] long nPolygonIndex, [in] long nPointIndex )
114        raises (com::sun::star::lang::IndexOutOfBoundsException);
115};
116
117}; }; }; };
118
119#endif
120