1*cdf0e10cSrcweir/*************************************************************************
2*cdf0e10cSrcweir *
3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir *
5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir *
7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir *
9*cdf0e10cSrcweir * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir *
11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir *
15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir *
21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir *
26*cdf0e10cSrcweir ************************************************************************/
27*cdf0e10cSrcweir#ifndef __com_sun_star_rendering_XLinePolyPolygon2D_idl__
28*cdf0e10cSrcweir#define __com_sun_star_rendering_XLinePolyPolygon2D_idl__
29*cdf0e10cSrcweir
30*cdf0e10cSrcweir#ifndef __com_sun_star_uno_XInterface_idl__
31*cdf0e10cSrcweir#include <com/sun/star/uno/XInterface.idl>
32*cdf0e10cSrcweir#endif
33*cdf0e10cSrcweir#ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__
34*cdf0e10cSrcweir#include <com/sun/star/lang/IndexOutOfBoundsException.idl>
35*cdf0e10cSrcweir#endif
36*cdf0e10cSrcweir#ifndef __com_sun_star_geometry_RealPoint2D_idl__
37*cdf0e10cSrcweir#include <com/sun/star/geometry/RealPoint2D.idl>
38*cdf0e10cSrcweir#endif
39*cdf0e10cSrcweir#ifndef __com_sun_star_rendering_XPolyPolygon2D_idl__
40*cdf0e10cSrcweir#include <com/sun/star/rendering/XPolyPolygon2D.idl>
41*cdf0e10cSrcweir#endif
42*cdf0e10cSrcweir
43*cdf0e10cSrcweirmodule com { module sun { module star { module rendering {
44*cdf0e10cSrcweir
45*cdf0e10cSrcweir/** Specialized interface for a 2D poly-polygon containing only straight line segments.
46*cdf0e10cSrcweir
47*cdf0e10cSrcweir    @since OOo 2.0
48*cdf0e10cSrcweir */
49*cdf0e10cSrcweirpublished interface XLinePolyPolygon2D : XPolyPolygon2D
50*cdf0e10cSrcweir{
51*cdf0e10cSrcweir    /** Query subset of this poly-polygon, starting at the given
52*cdf0e10cSrcweir        polygon and the given point within that polygon, and
53*cdf0e10cSrcweir        containing the specified number of polygons and points in the
54*cdf0e10cSrcweir        last polygon.
55*cdf0e10cSrcweir
56*cdf0e10cSrcweir        @param nPolygonIndex
57*cdf0e10cSrcweir        The index number of the polygon to start with extracting
58*cdf0e10cSrcweir        points. Set to 0 to start with the first polygon.
59*cdf0e10cSrcweir
60*cdf0e10cSrcweir        @param nNumberOfPolygons
61*cdf0e10cSrcweir        The number of polygons, starting with nPolygonIndex, to
62*cdf0e10cSrcweir        extract points from. Set to -1 to extract all polygons,
63*cdf0e10cSrcweir        starting with nPolygonIndex (i.e. a total of
64*cdf0e10cSrcweir        getNumberOfPolygons() - nPolygonIndex polygons is extracted).
65*cdf0e10cSrcweir
66*cdf0e10cSrcweir        @param nPointIndex
67*cdf0e10cSrcweir        The index of the point within the first polygon (that with the
68*cdf0e10cSrcweir        index number nPolygonIndex) to start extraction with. Set to 0
69*cdf0e10cSrcweir        to start with the first point in this polygon.
70*cdf0e10cSrcweir
71*cdf0e10cSrcweir        @param nNumberOfPoints
72*cdf0e10cSrcweir        The number of points in the last polygon of the extraction
73*cdf0e10cSrcweir        sequence, to be extracted. Set to -1 to extract all points
74*cdf0e10cSrcweir        from the last polygon.
75*cdf0e10cSrcweir     */
76*cdf0e10cSrcweir    sequence< sequence< ::com::sun::star::geometry::RealPoint2D > > getPoints( [in] long nPolygonIndex, [in] long nNumberOfPolygons, [in] long nPointIndex, [in] long nNumberOfPoints )
77*cdf0e10cSrcweir        raises (com::sun::star::lang::IndexOutOfBoundsException);
78*cdf0e10cSrcweir
79*cdf0e10cSrcweir    //-------------------------------------------------------------------------
80*cdf0e10cSrcweir
81*cdf0e10cSrcweir    /** Set the specified sequence of points to the poly-polygon.
82*cdf0e10cSrcweir
83*cdf0e10cSrcweir        This method can either set the whole poly-polygon to the new
84*cdf0e10cSrcweir        data, or insert the points at the given index
85*cdf0e10cSrcweir
86*cdf0e10cSrcweir        @param nPolygonIndex
87*cdf0e10cSrcweir        The index of the polygon to start point insertion with. This
88*cdf0e10cSrcweir        index must be in the range [0,numPolygons], and the insertion
89*cdf0e10cSrcweir        will take place <em>before</em> this position (i.e. when
90*cdf0e10cSrcweir        specifying 0 here, the given point sequence will precede all
91*cdf0e10cSrcweir        existing polygons already within the poly-polygon). To append
92*cdf0e10cSrcweir        to a poly-polygon, call setPoints() with
93*cdf0e10cSrcweir        <member>XLinePolyPolygon2D::getNumberOfPolygons()</member>
94*cdf0e10cSrcweir        as the polygon index. If nPolygonIndex is -1, the given
95*cdf0e10cSrcweir        sequence of points <em>replaces</em> the poly-polygon content,
96*cdf0e10cSrcweir        such that after this method completes, it contains exactly the
97*cdf0e10cSrcweir        specified point data.
98*cdf0e10cSrcweir
99*cdf0e10cSrcweir        @throws <type>com::sun::star::lang::IndexOutOfBoundsException</type>
100*cdf0e10cSrcweir        if one of the given values exceed the permissible range.
101*cdf0e10cSrcweir     */
102*cdf0e10cSrcweir    void setPoints( [in] sequence< sequence< ::com::sun::star::geometry::RealPoint2D > > points, [in] long nPolygonIndex )
103*cdf0e10cSrcweir        raises (com::sun::star::lang::IndexOutOfBoundsException);
104*cdf0e10cSrcweir
105*cdf0e10cSrcweir    //-------------------------------------------------------------------------
106*cdf0e10cSrcweir
107*cdf0e10cSrcweir    /** Get a single point from the poly-polygon
108*cdf0e10cSrcweir     */
109*cdf0e10cSrcweir    ::com::sun::star::geometry::RealPoint2D	getPoint( [in] long nPolygonIndex, [in] long nPointIndex )
110*cdf0e10cSrcweir        raises (com::sun::star::lang::IndexOutOfBoundsException);
111*cdf0e10cSrcweir
112*cdf0e10cSrcweir    //-------------------------------------------------------------------------
113*cdf0e10cSrcweir
114*cdf0e10cSrcweir    /** Set a single point on the poly-polygon. The remaining points of
115*cdf0e10cSrcweir        the poly-polygon will not be changed by this method.
116*cdf0e10cSrcweir     */
117*cdf0e10cSrcweir    void setPoint( [in] ::com::sun::star::geometry::RealPoint2D point, [in] long nPolygonIndex, [in] long nPointIndex )
118*cdf0e10cSrcweir        raises (com::sun::star::lang::IndexOutOfBoundsException);
119*cdf0e10cSrcweir};
120*cdf0e10cSrcweir
121*cdf0e10cSrcweir}; }; }; };
122*cdf0e10cSrcweir
123*cdf0e10cSrcweir#endif
124