Language:

The Free and Open Productivity Suite
Apache OpenOffice 4.1.4 released

Developer's Guide

API

SDK

Tips 'n' Tricks

Miscellaneous


:: com :: sun :: star :: rendering ::

interface XBezierPolyPolygon2D
Base Interfaces
XBezierPolyPolygon2DXPolyPolygon2D

XPolyPolygon2D
(referenced interface's summary:)
Generic interface for poly-polygons in 2D.
Description
This is a specialized interface for a 2D poly-polygon containing straight line and bezier segments.

This poly-polygon can contain polygons consisting of a mixture of cubic bezier curves and straight lines. As the straight line is a special case of a cubic bezier curve (control points collinear with the line through start and end point), this can be expressed uniformly with a sequence of ::RealBezierSegment2Ds.

By convention, a ::RealBezierSegment2D is a straight line segment, if all three contained points are strictly equal.

Since
OOo 2.0

Methods' Summary
getBezierSegments Query subset of this poly-polygon. 
setBezierSegments Set the specified sequence of bezier segments to the poly-polygon. This method can either set the whole poly-polygon to the new data, or insert the segments at the given index  
getBezierSegment Get a single point from the poly-polygon.  
setBezierSegment Set a single point on the poly-polygon. 
Methods' Details
getBezierSegments
sequence< sequence< ::com::sun::star::geometry::RealBezierSegment2D > >
getBezierSegments( [in] long  nPolygonIndex,
[in] long  nNumberOfPolygons,
[in] long  nPointIndex,
[in] long  nNumberOfPoints )
raises( ::com::sun::star::lang::IndexOutOfBoundsException );

Description
Query subset of this poly-polygon.

Query subset of this poly-polygon, starting at the given polygon and the given point within that polygon, and containing the specified number of polygons and points in the last polygon.

Parameter nPolygonIndex
The index of the polygon to start point retrieval with. This index must be in the range [0,numPolygons-1].
Parameter nNumberOfPolygons
The number of polygons to extract. This value must not exceed numPolygons-nPolygonIndex.
Parameter nPointIndex
The index of the first point in the first polygon to extract. This value must not exceed the number of points in this polygon minus one.
Parameter nNumberOfPoints
The number of points to extract from the last polygon. This value must not exceed the number of points in this last polygon minus one.
Returns
the sequence of extracted points.
Throws
com::sun::star::lang::IndexOutOfBoundsException if one of the given values exceed the permissible range.
setBezierSegments
void
setBezierSegments( [in] sequence< sequence< ::com::sun::star::geometry::RealBezierSegment2D > >  points,
[in] long  nPolygonIndex )
raises( ::com::sun::star::lang::IndexOutOfBoundsException );

Description
Set the specified sequence of bezier segments to the poly-polygon. This method can either set the whole poly-polygon to the new data, or insert the segments at the given index
Parameter nPolygonIndex
The index of the polygon to start segment insertion with. This index must be in the range [0,numPolygons], and the insertion will take place before this position (i.e. when specifying 0 here, the given bezier sequence will precede all existing polygons already within the poly-polygon). To append to a poly-polygon, call setPoints() with XBezierPolyPolygon2D::getNumberOfPolygons() as the polygon index. If nPolygonIndex is -1, the given bezier sequence replaces the poly-polygon content, such that after this method completes, it contains exactly the specified bezier segment data.
Throws
com::sun::star::lang::IndexOutOfBoundsException if one of the given values exceed the permissible range.
getBezierSegment
::com::sun::star::geometry::RealBezierSegment2D
getBezierSegment( [in] long  nPolygonIndex,
[in] long  nPointIndex )
raises( ::com::sun::star::lang::IndexOutOfBoundsException );

Description
Get a single point from the poly-polygon.
Parameter nPolygonIndex
The index of the polygon where the point to be extract is contained within. This index must be in the range [0,numPolygons-1].
Parameter nPointIndex
The index of the point in the polygon specified by nPolygonIndex, which is to be retrieved. This value must not exceed the number of points in this polygon minus one.
Returns
the requested point.
Throws
com::sun::star::lang::IndexOutOfBoundsException if one of the given values exceed the permissible range.
setBezierSegment
void
setBezierSegment( [in] ::com::sun::star::geometry::RealBezierSegment2D  point,
[in] long  nPolygonIndex,
[in] long  nPointIndex )
raises( ::com::sun::star::lang::IndexOutOfBoundsException );

Description
Set a single point on the poly-polygon.

The remaining points of the poly-polygon will not be changed by this method. Use XBezierPolyPolygon2D::getNumberOfPolygons() or XBezierPolyPolygon2D::getNumberOfPolygonPoints() to append points or polygons, respectively.

Parameter point
The point to be set at the poly-polygon.
Parameter nPolygonIndex
The index of the polygon to insert the point in. This index must be in the range [0,numPolygons].
Parameter nPointIndex
The index of the point in the polygon specified by nPolygonIndex, which is to be set. This value must not exceed the number of points in this polygon.
Throws
com::sun::star::lang::IndexOutOfBoundsException if one of the given values exceed the permissible range.
Top of Page

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache and the Apache feather logo are trademarks of The Apache Software Foundation. OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.