1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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_XLinePolyPolygon2D_idl__
20 #define __com_sun_star_rendering_XLinePolyPolygon2D_idl__
22 #include
<com
/sun
/star
/uno
/XInterface.idl
>
23 #include
<com
/sun
/star
/lang
/IndexOutOfBoundsException.idl
>
24 #include
<com
/sun
/star
/geometry
/RealPoint2D.idl
>
25 #include
<com
/sun
/star
/rendering
/XPolyPolygon2D.idl
>
27 module com
{ module sun
{ module star
{ module rendering
{
29 /** Specialized interface for a 2D poly-polygon containing only straight line segments.
33 interface XLinePolyPolygon2D
: XPolyPolygon2D
35 /** Query subset of this poly-polygon, starting at the given
36 polygon and the given point within that polygon, and
37 containing the specified number of polygons and points in the
41 The index number of the polygon to start with extracting
42 points. Set to 0 to start with the first polygon.
44 @param nNumberOfPolygons
45 The number of polygons, starting with nPolygonIndex, to
46 extract points from. Set to -1 to extract all polygons,
47 starting with nPolygonIndex (i.e. a total of
48 getNumberOfPolygons() - nPolygonIndex polygons is extracted).
51 The index of the point within the first polygon (that with the
52 index number nPolygonIndex) to start extraction with. Set to 0
53 to start with the first point in this polygon.
55 @param nNumberOfPoints
56 The number of points in the last polygon of the extraction
57 sequence, to be extracted. Set to -1 to extract all points
58 from the last polygon.
60 sequence
< sequence
< ::com
::sun
::star
::geometry
::RealPoint2D
> > getPoints
( [in] long nPolygonIndex
, [in] long nNumberOfPolygons
, [in] long nPointIndex
, [in] long nNumberOfPoints
)
61 raises
(com
::sun
::star
::lang
::IndexOutOfBoundsException
);
64 /** Set the specified sequence of points to the poly-polygon.
66 This method can either set the whole poly-polygon to the new
67 data, or insert the points at the given index
69 @param points the points.
72 The index of the polygon to start point insertion with. This
73 index must be in the range [0,numPolygons], and the insertion
74 will take place <em>before</em> this position (i.e. when
75 specifying 0 here, the given point sequence will precede all
76 existing polygons already within the poly-polygon). To append
77 to a poly-polygon, call setPoints() with
78 XLinePolyPolygon2D::getNumberOfPolygons()
79 as the polygon index. If nPolygonIndex is -1, the given
80 sequence of points <em>replaces</em> the poly-polygon content,
81 such that after this method completes, it contains exactly the
84 @throws com::sun::star::lang::IndexOutOfBoundsException
85 if one of the given values exceed the permissible range.
87 void setPoints
( [in] sequence
< sequence
< ::com
::sun
::star
::geometry
::RealPoint2D
> > points
, [in] long nPolygonIndex
)
88 raises
(com
::sun
::star
::lang
::IndexOutOfBoundsException
);
91 /** Get a single point from the poly-polygon
93 ::com
::sun
::star
::geometry
::RealPoint2D getPoint
( [in] long nPolygonIndex
, [in] long nPointIndex
)
94 raises
(com
::sun
::star
::lang
::IndexOutOfBoundsException
);
97 /** Set a single point on the poly-polygon. The remaining points of
98 the poly-polygon will not be changed by this method.
100 void setPoint
( [in] ::com
::sun
::star
::geometry
::RealPoint2D point
, [in] long nPolygonIndex
, [in] long nPointIndex
)
101 raises
(com
::sun
::star
::lang
::IndexOutOfBoundsException
);
108 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */