// Check and evtl. correct orientations of all contained Polygons so that // the orientations of contained polygons will variate to express areas and // holes
BASEGFX_DLLPUBLIC B2DPolyPolygon correctOrientations(const B2DPolyPolygon& rCandidate);
// make sure polygon with index 0L is not a hole. This may evtl. change the // sequence of polygons, but allows to use polygon with index 0L to // get the correct normal for the whole polyPolygon
BASEGFX_DLLPUBLIC B2DPolyPolygon correctOutmostPolygon(const B2DPolyPolygon& rCandidate);
// Subdivide all contained curves. Use distanceBound value if given.
BASEGFX_DLLPUBLIC B2DPolyPolygon adaptiveSubdivideByDistance(const B2DPolyPolygon& rCandidate, double fDistanceBound, int nRecurseLimit = 30);
// Subdivide all contained curves. Use distanceBound value if given. Else, a convenient one // is created.
BASEGFX_DLLPUBLIC B2DPolyPolygon adaptiveSubdivideByAngle(const B2DPolyPolygon& rCandidate, double fAngleBound = 0.0);
// isInside test for B2dPoint. On border is not inside as long as not true is given // in bWithBorder flag. It is assumed that the orientations of the given polygon are correct.
BASEGFX_DLLPUBLIC bool isInside(const B2DPolyPolygon& rCandidate, const B2DPoint& rPoint, bool bWithBorder = false);
// test if point is inside epsilon-range around the given PolyPolygon. Can be used // for HitTesting. The epsilon-range is defined to be the tube around the PolyPolygon // with distance fDistance and rounded edges (start and end point).
BASEGFX_DLLPUBLIC bool isInEpsilonRange(const B2DPolyPolygon& rCandidate, const B2DPoint& rTestPosition, double fDistance);
/** Helper class to transport PointIndices to a PolyPolygon, withanoperator<forconvenientsortinginastd::setusage
*/ class SAL_WARN_UNUSED BASEGFX_DLLPUBLIC PointIndex
{ private:
sal_uInt32 mnPolygonIndex;
sal_uInt32 mnPointIndex;
/** the PointIndexSet itself; it allows to define a 'selection'of pointsinatools::PolyPolygonbygivingthepolygonandpointindex. Addingpointsdoublemakesnosense,hencethestd::set
*/ typedef o3tl::sorted_vector< PointIndex > PointIndexSet;
// grow for polyPolygon. Move all geometry in each point in the direction of the normal in that point // with the given amount. Value may be negative.
BASEGFX_DLLPUBLIC B2DPolyPolygon growInNormalDirection(const B2DPolyPolygon& rCandidate, double fValue);
// force all sub-polygons to a point count of nSegments
BASEGFX_DLLPUBLIC B2DPolyPolygon reSegmentPolyPolygon(const B2DPolyPolygon& rCandidate, sal_uInt32 nSegments);
// create polygon state at t from 0.0 to 1.0 between the two polygons. Both polygons must have the same // organisation, e.g. same amount of polygons
BASEGFX_DLLPUBLIC B2DPolyPolygon interpolate(const B2DPolyPolygon& rOld1, const B2DPolyPolygon& rOld2, double t);
// create 3d tools::PolyPolygon from given 2d PolyPolygon. The given fZCoordinate is used to expand the // third coordinate.
BASEGFX_DLLPUBLIC B3DPolyPolygon createB3DPolyPolygonFromB2DPolyPolygon(const B2DPolyPolygon& rCandidate, double fZCoordinate = 0.0);
// create 2d tools::PolyPolygon from given 3d PolyPolygon. All coordinates are transformed using the given // matrix and the resulting x,y is used to form the new polygon.
BASEGFX_DLLPUBLIC B2DPolyPolygon createB2DPolyPolygonFromB3DPolyPolygon(const B3DPolyPolygon& rCandidate, const B3DHomMatrix& rMat);
// for each contained edge in each contained polygon calculate the smallest distance. Return the index to the smallest // edge in rEdgeIndex and the index to the polygon in rPolygonIndex. The relative position on the edge is returned in rCut. // If nothing was found (e.g. empty input plygon), DBL_MAX is returned.
BASEGFX_DLLPUBLIC double getSmallestDistancePointToPolyPolygon(const B2DPolyPolygon& rCandidate, const B2DPoint& rTestPoint, sal_uInt32& rPolygonIndex, sal_uInt32& rEdgeIndex, double& rCut);
// distort PolyPolygon. rOriginal describes the original range, where the given points describe the distorted // corresponding points.
BASEGFX_DLLPUBLIC B2DPolyPolygon distort(const B2DPolyPolygon& rCandidate, const B2DRange& rOriginal, const B2DPoint& rTopLeft, const B2DPoint& rTopRight, const B2DPoint& rBottomLeft, const B2DPoint& rBottomRight);
// expand all segments (which are not yet) to curve segments. This is done with setting the control // vectors on the 1/3 resp. 2/3 distances on each segment.
BASEGFX_DLLPUBLIC B2DPolyPolygon expandToCurve(const B2DPolyPolygon& rCandidate);
/** Predicate whether a given poly-polygon is a rectangle.
// #i76891# Try to remove existing curve segments if they are simply edges
BASEGFX_DLLPUBLIC B2DPolyPolygon simplifyCurveSegments(const B2DPolyPolygon& rCandidate);
/** Creates polypolygon for seven-segment display number
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.