xref: /AOO41X/main/offapi/com/sun/star/rendering/XLinePolyPolygon2D.idl (revision 1ecadb572e7010ff3b3382ad9bf179dbc6efadbb)
1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
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.
14 *
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).
20 *
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.
25 *
26 ************************************************************************/
27#ifndef __com_sun_star_rendering_XLinePolyPolygon2D_idl__
28#define __com_sun_star_rendering_XLinePolyPolygon2D_idl__
29
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_geometry_RealPoint2D_idl__
37#include <com/sun/star/geometry/RealPoint2D.idl>
38#endif
39#ifndef __com_sun_star_rendering_XPolyPolygon2D_idl__
40#include <com/sun/star/rendering/XPolyPolygon2D.idl>
41#endif
42
43module com { module sun { module star { module rendering {
44
45/** Specialized interface for a 2D poly-polygon containing only straight line segments.
46
47    @since OOo 2.0
48 */
49published interface XLinePolyPolygon2D : XPolyPolygon2D
50{
51    /** Query subset of this poly-polygon, starting at the given
52        polygon and the given point within that polygon, and
53        containing the specified number of polygons and points in the
54        last polygon.
55
56        @param nPolygonIndex
57        The index number of the polygon to start with extracting
58        points. Set to 0 to start with the first polygon.
59
60        @param nNumberOfPolygons
61        The number of polygons, starting with nPolygonIndex, to
62        extract points from. Set to -1 to extract all polygons,
63        starting with nPolygonIndex (i.e. a total of
64        getNumberOfPolygons() - nPolygonIndex polygons is extracted).
65
66        @param nPointIndex
67        The index of the point within the first polygon (that with the
68        index number nPolygonIndex) to start extraction with. Set to 0
69        to start with the first point in this polygon.
70
71        @param nNumberOfPoints
72        The number of points in the last polygon of the extraction
73        sequence, to be extracted. Set to -1 to extract all points
74        from the last polygon.
75     */
76    sequence< sequence< ::com::sun::star::geometry::RealPoint2D > > getPoints( [in] long nPolygonIndex, [in] long nNumberOfPolygons, [in] long nPointIndex, [in] long nNumberOfPoints )
77        raises (com::sun::star::lang::IndexOutOfBoundsException);
78
79    //-------------------------------------------------------------------------
80
81    /** Set the specified sequence of points to the poly-polygon.
82
83        This method can either set the whole poly-polygon to the new
84        data, or insert the points at the given index
85
86        @param nPolygonIndex
87        The index of the polygon to start point 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 point sequence will precede all
91        existing polygons already within the poly-polygon). To append
92        to a poly-polygon, call setPoints() with
93        <member>XLinePolyPolygon2D::getNumberOfPolygons()</member>
94        as the polygon index. If nPolygonIndex is -1, the given
95        sequence of points <em>replaces</em> the poly-polygon content,
96        such that after this method completes, it contains exactly the
97        specified point data.
98
99        @throws <type>com::sun::star::lang::IndexOutOfBoundsException</type>
100        if one of the given values exceed the permissible range.
101     */
102    void setPoints( [in] sequence< sequence< ::com::sun::star::geometry::RealPoint2D > > points, [in] long nPolygonIndex )
103        raises (com::sun::star::lang::IndexOutOfBoundsException);
104
105    //-------------------------------------------------------------------------
106
107    /** Get a single point from the poly-polygon
108     */
109    ::com::sun::star::geometry::RealPoint2D	getPoint( [in] long nPolygonIndex, [in] long nPointIndex )
110        raises (com::sun::star::lang::IndexOutOfBoundsException);
111
112    //-------------------------------------------------------------------------
113
114    /** Set a single point on the poly-polygon. The remaining points of
115        the poly-polygon will not be changed by this method.
116     */
117    void setPoint( [in] ::com::sun::star::geometry::RealPoint2D point, [in] long nPolygonIndex, [in] long nPointIndex )
118        raises (com::sun::star::lang::IndexOutOfBoundsException);
119};
120
121}; }; }; };
122
123#endif
124