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