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_XLinePolyPolygon2D_idl__
28 #define __com_sun_star_rendering_XLinePolyPolygon2D_idl__
30 #ifndef __com_sun_star_uno_XInterface_idl__
31 #include
<com
/sun
/star
/uno
/XInterface.idl
>
33 #ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__
34 #include
<com
/sun
/star
/lang
/IndexOutOfBoundsException.idl
>
36 #ifndef __com_sun_star_geometry_RealPoint2D_idl__
37 #include
<com
/sun
/star
/geometry
/RealPoint2D.idl
>
39 #ifndef __com_sun_star_rendering_XPolyPolygon2D_idl__
40 #include
<com
/sun
/star
/rendering
/XPolyPolygon2D.idl
>
43 module com
{ module sun
{ module star
{ module rendering
{
45 /** Specialized interface for a 2D poly-polygon containing only straight line segments.
49 interface XLinePolyPolygon2D
: XPolyPolygon2D
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
57 The index number of the polygon to start with extracting
58 points. Set to 0 to start with the first polygon.
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).
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.
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.
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
);
79 //-------------------------------------------------------------------------
81 /** Set the specified sequence of points to the poly-polygon.
83 This method can either set the whole poly-polygon to the new
84 data, or insert the points at the given index
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
99 @throws <type>com::sun::star::lang::IndexOutOfBoundsException</type>
100 if one of the given values exceed the permissible range.
102 void setPoints
( [in] sequence
< sequence
< ::com
::sun
::star
::geometry
::RealPoint2D
> > points
, [in] long nPolygonIndex
)
103 raises
(com
::sun
::star
::lang
::IndexOutOfBoundsException
);
105 //-------------------------------------------------------------------------
107 /** Get a single point from the poly-polygon
109 ::com
::sun
::star
::geometry
::RealPoint2D getPoint
( [in] long nPolygonIndex
, [in] long nPointIndex
)
110 raises
(com
::sun
::star
::lang
::IndexOutOfBoundsException
);
112 //-------------------------------------------------------------------------
114 /** Set a single point on the poly-polygon. The remaining points of
115 the poly-polygon will not be changed by this method.
117 void setPoint
( [in] ::com
::sun
::star
::geometry
::RealPoint2D point
, [in] long nPolygonIndex
, [in] long nPointIndex
)
118 raises
(com
::sun
::star
::lang
::IndexOutOfBoundsException
);