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