LibreOffice Module basegfx (master) 1
|
#include <b2dpolygon.hxx>
Public Types | |
typedef o3tl::cow_wrapper< ImplB2DPolygon > | ImplType |
Public Member Functions | |
B2DPolygon () | |
diverse constructors More... | |
B2DPolygon (const B2DPolygon &rPolygon) | |
B2DPolygon (B2DPolygon &&rPolygon) | |
B2DPolygon (const B2DPolygon &rPolygon, sal_uInt32 nIndex, sal_uInt32 nCount) | |
B2DPolygon (std::initializer_list< basegfx::B2DPoint > rPoints) | |
~B2DPolygon () | |
B2DPolygon & | operator= (const B2DPolygon &rPolygon) |
assignment operator More... | |
B2DPolygon & | operator= (B2DPolygon &&rPolygon) |
void | makeUnique () |
unshare this polygon with all internally shared instances More... | |
bool | operator== (const B2DPolygon &rPolygon) const |
compare operators More... | |
bool | operator!= (const B2DPolygon &rPolygon) const |
sal_uInt32 | count () const |
member count More... | |
basegfx::B2DPoint const & | getB2DPoint (sal_uInt32 nIndex) const |
Coordinate interface. More... | |
void | setB2DPoint (sal_uInt32 nIndex, const basegfx::B2DPoint &rValue) |
void | insert (sal_uInt32 nIndex, const basegfx::B2DPoint &rPoint, sal_uInt32 nCount=1) |
Coordinate insert/append. More... | |
void | append (const basegfx::B2DPoint &rPoint, sal_uInt32 nCount) |
void | append (const basegfx::B2DPoint &rPoint) |
void | reserve (sal_uInt32 nCount) |
basegfx::B2DPoint | getPrevControlPoint (sal_uInt32 nIndex) const |
Basic ControlPoint interface. More... | |
basegfx::B2DPoint | getNextControlPoint (sal_uInt32 nIndex) const |
void | setPrevControlPoint (sal_uInt32 nIndex, const basegfx::B2DPoint &rValue) |
void | setNextControlPoint (sal_uInt32 nIndex, const basegfx::B2DPoint &rValue) |
void | setControlPoints (sal_uInt32 nIndex, const basegfx::B2DPoint &rPrev, const basegfx::B2DPoint &rNext) |
void | resetPrevControlPoint (sal_uInt32 nIndex) |
ControlPoint resets. More... | |
void | resetNextControlPoint (sal_uInt32 nIndex) |
void | resetControlPoints () |
void | appendBezierSegment (const basegfx::B2DPoint &rNextControlPoint, const basegfx::B2DPoint &rPrevControlPoint, const basegfx::B2DPoint &rPoint) |
Bezier segment append with control points. The current last polygon point is implicitly taken as start point. More... | |
void | appendQuadraticBezierSegment (const basegfx::B2DPoint &rQuadControlPoint, const basegfx::B2DPoint &rPoint) |
This is a shortcut to append a quadratic bezier segment. More... | |
bool | areControlPointsUsed () const |
ControlPoint checks. More... | |
bool | isPrevControlPointUsed (sal_uInt32 nIndex) const |
bool | isNextControlPointUsed (sal_uInt32 nIndex) const |
B2VectorContinuity | getContinuityInPoint (sal_uInt32 nIndex) const |
void | getBezierSegment (sal_uInt32 nIndex, B2DCubicBezier &rTarget) const |
bezier segment access More... | |
B2DPolygon const & | getDefaultAdaptiveSubdivision () const |
Default adaptive subdivision access. More... | |
B2DRange const & | getB2DRange () const |
Get the B2DRange (Rectangle dimensions) of this B2DPolygon. More... | |
void | append (const B2DPolygon &rPoly, sal_uInt32 nIndex=0, sal_uInt32 nCount=0) |
append other 2D polygons More... | |
void | remove (sal_uInt32 nIndex, sal_uInt32 nCount=1) |
remove points More... | |
void | clear () |
clear all points More... | |
bool | isClosed () const |
closed state interface More... | |
void | setClosed (bool bNew) |
void | flip () |
flip polygon direction More... | |
bool | hasDoublePoints () const |
test if Polygon has double points More... | |
void | removeDoublePoints () |
remove double points, at the begin/end and follow-ups, too More... | |
void | transform (const basegfx::B2DHomMatrix &rMatrix) |
apply transformation given in matrix form More... | |
template<class T > | |
std::shared_ptr< T > | getSystemDependentData () const |
template<class T , class... Args> | |
std::shared_ptr< T > | addOrReplaceSystemDependentData (Args &&... args) const |
Private Member Functions | |
void | addOrReplaceSystemDependentDataInternal (SystemDependentData_SharedPtr &rData) const |
SystemDependentData_SharedPtr | getSystemDependantDataInternal (size_t hash_code) const |
const basegfx::B2DVector & | getPrevControlVector (sal_uInt32 nIndex) const |
const basegfx::B2DVector & | getNextControlVector (sal_uInt32 nIndex) const |
Private Attributes | |
ImplType | mpPolygon |
Definition at line 47 of file b2dpolygon.hxx.
Definition at line 50 of file b2dpolygon.hxx.
basegfx::B2DPolygon::B2DPolygon | ( | ) |
diverse constructors
Definition at line 1080 of file b2dpolygon.cxx.
|
default |
|
default |
basegfx::B2DPolygon::B2DPolygon | ( | const B2DPolygon & | rPolygon, |
sal_uInt32 | nIndex, | ||
sal_uInt32 | nCount | ||
) |
Definition at line 1095 of file b2dpolygon.cxx.
basegfx::B2DPolygon::B2DPolygon | ( | std::initializer_list< basegfx::B2DPoint > | rPoints | ) |
Definition at line 1083 of file b2dpolygon.cxx.
References append().
|
default |
|
inline |
Definition at line 240 of file b2dpolygon.hxx.
References args.
|
private |
Definition at line 1448 of file b2dpolygon.cxx.
References mpPolygon.
void basegfx::B2DPolygon::append | ( | const B2DPolygon & | rPoly, |
sal_uInt32 | nIndex = 0 , |
||
sal_uInt32 | nCount = 0 |
||
) |
append other 2D polygons
The default (nIndex ==0 && nCount == 0) will append the whole rPoly
rPoly | The source polygon |
nIndex | The index to the first point of rPoly to append |
nCount | The number of points to append from rPoly, starting from nIndex. If zero, as much as possible is appended |
Definition at line 1371 of file b2dpolygon.cxx.
void basegfx::B2DPolygon::append | ( | const basegfx::B2DPoint & | rPoint | ) |
Definition at line 1163 of file b2dpolygon.cxx.
References mpPolygon.
void basegfx::B2DPolygon::append | ( | const basegfx::B2DPoint & | rPoint, |
sal_uInt32 | nCount | ||
) |
Definition at line 1155 of file b2dpolygon.cxx.
References mpPolygon, and nCount.
Referenced by basegfx::utils::adaptiveSubdivideByAngle(), basegfx::utils::adaptiveSubdivideByDistance(), basegfx::utils::applyLineDashing(), B2DPolygon(), basegfx::utils::clipPolygonOnParallelAxis(), basegfx::utils::clipPolyPolygonOnPolyPolygon(), basegfx::utils::clipTriangleListOnRange(), basegfx::utils::createB2DPolygonFromB3DPolygon(), basegfx::utils::createEdgesOfGivenLength(), basegfx::utils::createHalfUnitCircle(), basegfx::utils::createPolygonFromRect(), basegfx::utils::createPolygonFromUnitEllipseSegment(), basegfx::utils::createSevenSegmentPolyPolygon(), basegfx::utils::createWaveline(), basegfx::createWaveLinePolygon(), basegfx::utils::distort(), basegfx::B2DCubicBezier::getSmallestDistancePointToBezierSegment(), basegfx::utils::getSnippetAbsolute(), basegfx::unotools::UnoPolyPolygon::getSubsetPolyPolygon(), basegfx::utils::growInNormalDirection(), basegfx::utils::impCreateUnitCircle(), basegfx::utils::implHandleFirstLast(), basegfx::utils::importFromSvgD(), basegfx::utils::importFromSvgPoints(), basegfx::utils::interpolate(), basegfx::utils::makeStartPoint(), basegfx::utils::openWithGeometryChange(), basegfx::unotools::polygonFromBezier2DSequence(), basegfx::unotools::polygonFromPoint2DSequence(), basegfx::utils::removeNeutralPoints(), basegfx::utils::reSegmentPolygon(), basegfx::utils::simplifyCurveSegments(), basegfx::utils::UnoPointSequenceToB2DPolygon(), and basegfx::utils::UnoPolygonBezierCoordsToB2DPolygon().
void basegfx::B2DPolygon::appendBezierSegment | ( | const basegfx::B2DPoint & | rNextControlPoint, |
const basegfx::B2DPoint & | rPrevControlPoint, | ||
const basegfx::B2DPoint & | rPoint | ||
) |
Bezier segment append with control points. The current last polygon point is implicitly taken as start point.
Definition at line 1258 of file b2dpolygon.cxx.
References count(), basegfx::Tuple2D< TYPE >::equalZero(), getB2DPoint(), basegfx::B2DVector::getEmptyVector(), and mpPolygon.
Referenced by appendQuadraticBezierSegment(), basegfx::utils::applyLineDashing(), basegfx::utils::clipPolygonOnParallelAxis(), basegfx::utils::clipPolyPolygonOnPolyPolygon(), basegfx::utils::createHalfUnitCircle(), basegfx::utils::createPolygonFromRect(), basegfx::utils::createPolygonFromUnitEllipseSegment(), basegfx::utils::createWaveline(), basegfx::utils::impCreateUnitCircle(), basegfx::utils::importFromSvgD(), basegfx::unotools::polygonFromBezier2DSequence(), basegfx::utils::simplifyCurveSegments(), and basegfx::utils::UnoPolygonBezierCoordsToB2DPolygon().
void basegfx::B2DPolygon::appendQuadraticBezierSegment | ( | const basegfx::B2DPoint & | rQuadControlPoint, |
const basegfx::B2DPoint & | rPoint | ||
) |
This is a shortcut to append a quadratic bezier segment.
The current last polygon point is implicitly taken as start point. Note that the quadratic bezier control points will be converted to cubic bezier with 2 control points.
Definition at line 1276 of file b2dpolygon.cxx.
References appendBezierSegment(), count(), getB2DPoint(), basegfx::Tuple2D< TYPE >::getX(), basegfx::Tuple2D< TYPE >::getY(), mpPolygon, and setPrevControlPoint().
Referenced by basegfx::createWaveLinePolygon(), and basegfx::utils::importFromSvgD().
bool basegfx::B2DPolygon::areControlPointsUsed | ( | ) | const |
ControlPoint checks.
Definition at line 1298 of file b2dpolygon.cxx.
References mpPolygon.
Referenced by basegfx::utils::adaptiveSubdivideByAngle(), basegfx::utils::adaptiveSubdivideByDistance(), basegfx::B2DPolyPolygon::areControlPointsUsed(), basegfx::utils::B2DPolygonToUnoPointSequence(), basegfx::utils::B2DPolygonToUnoPolygonBezierCoords(), basegfx::utils::closeWithGeometryChange(), basegfx::utils::createB3DPolygonFromB2DPolygon(), basegfx::utils::createEdgesOfGivenLength(), basegfx::utils::createLineTrapezoidFromB2DPolygon(), basegfx::utils::distort(), basegfx::utils::exportToSvgD(), basegfx::utils::exportToSvgPoints(), basegfx::utils::getArea(), getBezierSegment(), getContinuityInPoint(), basegfx::utils::getEdgeLength(), basegfx::utils::getLength(), getNextControlPoint(), basegfx::utils::getOrientation(), basegfx::utils::getPositionAbsolute(), getPrevControlPoint(), basegfx::utils::getSignedArea(), basegfx::utils::getSmallestDistancePointToPolygon(), basegfx::utils::getSnippetAbsolute(), basegfx::utils::growInNormalDirection(), basegfx::utils::hasNeutralPoints(), basegfx::utils::importFromSvgD(), basegfx::utils::interpolate(), basegfx::utils::isConvex(), basegfx::utils::isInside(), isNextControlPointUsed(), basegfx::utils::isPointOnPolygon(), isPrevControlPointUsed(), basegfx::utils::isRectangle(), basegfx::utils::makeStartPoint(), basegfx::utils::openWithGeometryChange(), resetControlPoints(), resetNextControlPoint(), resetPrevControlPoint(), basegfx::utils::simplifyCurveSegments(), and basegfx::triangulator::triangulate().
void basegfx::B2DPolygon::clear | ( | ) |
clear all points
Definition at line 1400 of file b2dpolygon.cxx.
References mpPolygon.
Referenced by basegfx::utils::applyLineDashing(), basegfx::utils::clipPolygonOnParallelAxis(), basegfx::utils::clipPolyPolygonOnPolyPolygon(), basegfx::utils::createSevenSegmentPolyPolygon(), basegfx::utils::implHandleFirstLast(), basegfx::utils::importFromSvgD(), and basegfx::utils::importFromSvgPoints().
sal_uInt32 basegfx::B2DPolygon::count | ( | ) | const |
member count
Definition at line 1124 of file b2dpolygon.cxx.
References mpPolygon.
Referenced by basegfx::utils::adaptiveSubdivideByAngle(), basegfx::utils::adaptiveSubdivideByDistance(), basegfx::utils::addPointsAtCuts(), basegfx::utils::addPointsAtCutsAndTouches(), basegfx::utils::addTriangleFan(), append(), appendBezierSegment(), appendQuadraticBezierSegment(), basegfx::utils::applyLineDashing(), basegfx::utils::B2DPolygonToUnoPointSequence(), basegfx::utils::B2DPolygonToUnoPolygonBezierCoords(), basegfx::utils::checkClosed(), basegfx::utils::clipPolygonOnParallelAxis(), basegfx::utils::clipPolygonOnPolyPolygon(), basegfx::utils::clipPolygonOnRange(), basegfx::utils::clipPolyPolygonOnPolyPolygon(), basegfx::utils::clipTriangleListOnRange(), basegfx::utils::closeWithGeometryChange(), basegfx::utils::createAreaGeometry(), basegfx::utils::createAreaGeometryForLineStartEnd(), basegfx::utils::createB3DPolygonFromB2DPolygon(), basegfx::utils::createEdgesOfGivenLength(), basegfx::utils::createLineTrapezoidFromB2DPolygon(), basegfx::utils::createWaveline(), basegfx::utils::distort(), basegfx::utils::expandToCurve(), basegfx::utils::expandToCurveInPoint(), basegfx::utils::exportToSvgD(), basegfx::utils::exportToSvgPoints(), flip(), basegfx::utils::getArea(), basegfx::unotools::UnoPolyPolygon::getBezierSegment(), getBezierSegment(), basegfx::utils::getEdgeLength(), basegfx::utils::getIndexOfPredecessor(), basegfx::utils::getIndexOfSuccessor(), basegfx::utils::getLength(), basegfx::unotools::UnoPolyPolygon::getNumberOfPolygonPoints(), basegfx::utils::getOrientation(), basegfx::utils::getOrientationForIndex(), basegfx::unotools::UnoPolyPolygon::getPoint(), basegfx::utils::getPositionAbsolute(), basegfx::utils::getSignedArea(), basegfx::B2DCubicBezier::getSmallestDistancePointToBezierSegment(), basegfx::utils::getSmallestDistancePointToPolygon(), basegfx::utils::getSnippetAbsolute(), basegfx::utils::getTangentEnteringPoint(), basegfx::utils::getTangentLeavingPoint(), basegfx::utils::growInNormalDirection(), hasDoublePoints(), basegfx::utils::hasNeutralPoints(), basegfx::utils::implHandleFirstLast(), basegfx::utils::implHandleSnippet(), basegfx::utils::importFromSvgD(), basegfx::utils::interpolate(), basegfx::utils::isConvex(), basegfx::utils::isInEpsilonRange(), basegfx::utils::isInside(), basegfx::utils::ImplB2DClipState::isNullClipPoly(), basegfx::utils::isPointOnPolygon(), basegfx::utils::isRectangle(), basegfx::utils::makeStartPoint(), basegfx::utils::openWithGeometryChange(), basegfx::unotools::polygonFromBezier2DSequence(), basegfx::utils::removeNeutralPoints(), basegfx::utils::reSegmentPolygon(), basegfx::unotools::UnoPolyPolygon::setBezierSegment(), basegfx::utils::setContinuityInPoint(), basegfx::unotools::UnoPolyPolygon::setPoint(), basegfx::utils::simplifyCurveSegments(), basegfx::utils::snapPointsOfHorizontalOrVerticalEdges(), transform(), basegfx::triangulator::triangulate(), and basegfx::utils::UnoPolygonBezierCoordsToB2DPolygon().
void basegfx::B2DPolygon::flip | ( | ) |
flip polygon direction
Definition at line 1418 of file b2dpolygon.cxx.
References count(), and mpPolygon.
Referenced by basegfx::utils::correctOrientations(), and basegfx::utils::importFromSvgD().
B2DPoint const & basegfx::B2DPolygon::getB2DPoint | ( | sal_uInt32 | nIndex | ) | const |
Coordinate interface.
Definition at line 1129 of file b2dpolygon.cxx.
References mpPolygon, and nIndex.
Referenced by basegfx::utils::adaptiveSubdivideByAngle(), basegfx::utils::adaptiveSubdivideByDistance(), basegfx::utils::addTriangleFan(), appendBezierSegment(), appendQuadraticBezierSegment(), basegfx::utils::applyLineDashing(), basegfx::utils::B2DPolygonToUnoPointSequence(), basegfx::utils::B2DPolygonToUnoPolygonBezierCoords(), basegfx::utils::checkClosed(), basegfx::utils::clipPolygonOnParallelAxis(), basegfx::utils::clipPolyPolygonOnPolyPolygon(), basegfx::utils::clipTriangleListOnRange(), basegfx::utils::closeWithGeometryChange(), basegfx::utils::createAreaGeometry(), basegfx::utils::createAreaGeometryForLineStartEnd(), basegfx::utils::createB3DPolygonFromB2DPolygon(), basegfx::utils::createEdgesOfGivenLength(), basegfx::utils::createLineTrapezoidFromB2DPolygon(), basegfx::utils::createWaveline(), basegfx::utils::distort(), basegfx::utils::expandToCurveInPoint(), basegfx::utils::exportToSvgD(), basegfx::utils::exportToSvgPoints(), basegfx::unotools::UnoPolyPolygon::getBezierSegment(), getBezierSegment(), basegfx::utils::getEdgeLength(), basegfx::utils::getLength(), getNextControlPoint(), basegfx::utils::getOrientationForIndex(), basegfx::unotools::UnoPolyPolygon::getPoint(), basegfx::utils::getPositionAbsolute(), getPrevControlPoint(), basegfx::utils::getSignedArea(), basegfx::B2DCubicBezier::getSmallestDistancePointToBezierSegment(), basegfx::utils::getSmallestDistancePointToPolygon(), basegfx::utils::getSnippetAbsolute(), basegfx::unotools::UnoPolyPolygon::getSubsetPolyPolygon(), basegfx::utils::growInNormalDirection(), basegfx::utils::hasNeutralPoints(), basegfx::utils::implHandleFirstLast(), basegfx::utils::importFromSvgD(), basegfx::utils::interpolate(), basegfx::utils::isConvex(), basegfx::utils::isInEpsilonRange(), basegfx::utils::isInside(), basegfx::utils::isPointOnPolygon(), basegfx::utils::isRectangle(), basegfx::utils::makeStartPoint(), basegfx::utils::openWithGeometryChange(), basegfx::utils::removeNeutralPoints(), setB2DPoint(), basegfx::utils::setContinuityInPoint(), setControlPoints(), setNextControlPoint(), setPrevControlPoint(), basegfx::utils::simplifyCurveSegments(), basegfx::utils::snapPointsOfHorizontalOrVerticalEdges(), basegfx::triangulator::triangulate(), and basegfx::utils::UnoPolygonBezierCoordsToB2DPolygon().
B2DRange const & basegfx::B2DPolygon::getB2DRange | ( | ) | const |
Get the B2DRange (Rectangle dimensions) of this B2DPolygon.
A polygon may have up to three ranges:
(a) the range of the polygon points (b) the range of the polygon points and control points (c) the outer range of the subdivided bezier curve
Ranges (a) and (c) are produced by tools::getRange(); resp. this getB2DRange(). tools::getRangeWithControlPoints handles case (b).
To get range (c) a simple solution would be to subdivide the polygon and use getRange() on it. Since subdivision is expensive and decreases the polygon quality, i added this new method. It will use a methodology suggested by HDU. First, it gets the range (a). Then it iterates over the bezier segments and for each it first tests if the outer range of the bezier segment is already contained in the result range.
The subdivision itself uses getAllExtremumPositions() to only calculate extremum points and to expand the result accordingly. Thus it calculates maximal four extremum points on the bezier segment, no split is used at all.
Definition at line 1366 of file b2dpolygon.cxx.
References mpPolygon.
Referenced by basegfx::utils::addPointsAtCuts(), basegfx::B2DPolyPolygon::getB2DRange(), and basegfx::utils::getRange().
void basegfx::B2DPolygon::getBezierSegment | ( | sal_uInt32 | nIndex, |
B2DCubicBezier & | rTarget | ||
) | const |
bezier segment access
This method also works when it is no bezier segment at all and will fill the given B2DCubicBezier as needed. In any case, the given B2DCubicBezier will be filled, if necessary with the single start point (if no valid edge exists).
nIndex | Index of the addressed edge's start point |
rTarget | The B2DCubicBezier to be filled. It's data WILL be changed. |
Definition at line 1328 of file b2dpolygon.cxx.
References areControlPointsUsed(), count(), getB2DPoint(), getNextControlVector(), getPrevControlVector(), isClosed(), nIndex, and rTarget.
Referenced by basegfx::utils::addPointsAtCuts(), basegfx::utils::clipPolygonOnParallelAxis(), basegfx::utils::clipPolyPolygonOnPolyPolygon(), basegfx::utils::getTangentEnteringPoint(), and basegfx::utils::getTangentLeavingPoint().
B2VectorContinuity basegfx::B2DPolygon::getContinuityInPoint | ( | sal_uInt32 | nIndex | ) | const |
Definition at line 1313 of file b2dpolygon.cxx.
References areControlPointsUsed(), basegfx::getContinuity(), getNextControlVector(), getPrevControlVector(), nIndex, and basegfx::NONE.
Referenced by basegfx::utils::B2DPolygonToUnoPolygonBezierCoords(), basegfx::utils::exportToSvgD(), and basegfx::utils::getContinuityInPoint().
B2DPolygon const & basegfx::B2DPolygon::getDefaultAdaptiveSubdivision | ( | ) | const |
Default adaptive subdivision access.
This method will return a default adaptive subdivision of the polygon. If the polygon does not contain any bezier curve segments, it will just return itself.
The subdivision is created on first request and buffered, so when using this subdivision You have the guarantee for fast accesses for multiple usages. It is intended for tooling usage for tasks which would be hard to accomplish on bezier segments (e.g. isInEpsilonRange).
The current default subdivision uses adaptiveSubdivideByCount with 9 subdivisions which gives 10 edges and 11 points per segment and is usually pretty usable for processing purposes. There is no parameter passing here ATM but it may be changed on demand. If needed, a TYPE and PARAMETER (both defaulted) may be added to allow for switching between the different kinds of subdivisioned and passing them one parameter.
The lifetime of the buffered subdivision is based on polygon changes. When changing the polygon, it will be flushed. It is buffered at the refcounted implementation class, so it will survive copy by value and combinations in PolyPolygons.
Definition at line 1361 of file b2dpolygon.cxx.
References mpPolygon.
Referenced by basegfx::utils::B2DPolygonToUnoPointSequence(), basegfx::utils::createEdgesOfGivenLength(), basegfx::B2DPolyPolygon::getDefaultAdaptiveSubdivision(), basegfx::utils::getSignedArea(), basegfx::utils::isInEpsilonRange(), basegfx::utils::isInside(), and basegfx::utils::isPointOnPolygon().
B2DPoint basegfx::B2DPolygon::getNextControlPoint | ( | sal_uInt32 | nIndex | ) | const |
Definition at line 1190 of file b2dpolygon.cxx.
References areControlPointsUsed(), getB2DPoint(), getNextControlVector(), and nIndex.
Referenced by basegfx::utils::adaptiveSubdivideByAngle(), basegfx::utils::adaptiveSubdivideByDistance(), basegfx::utils::applyLineDashing(), basegfx::utils::B2DPolygonToUnoPolygonBezierCoords(), basegfx::utils::createAreaGeometry(), basegfx::utils::distort(), basegfx::utils::exportToSvgD(), basegfx::unotools::UnoPolyPolygon::getBezierSegment(), basegfx::utils::getEdgeLength(), basegfx::utils::getLength(), basegfx::utils::getPositionAbsolute(), basegfx::utils::getSmallestDistancePointToPolygon(), basegfx::utils::getSnippetAbsolute(), basegfx::utils::interpolate(), basegfx::utils::makeStartPoint(), basegfx::utils::setContinuityInPoint(), and basegfx::utils::simplifyCurveSegments().
|
private |
Definition at line 1173 of file b2dpolygon.cxx.
References mpPolygon, and nIndex.
Referenced by getBezierSegment(), getContinuityInPoint(), getNextControlPoint(), isNextControlPointUsed(), resetNextControlPoint(), setControlPoints(), and setNextControlPoint().
B2DPoint basegfx::B2DPolygon::getPrevControlPoint | ( | sal_uInt32 | nIndex | ) | const |
Basic ControlPoint interface.
Definition at line 1178 of file b2dpolygon.cxx.
References areControlPointsUsed(), getB2DPoint(), getPrevControlVector(), and nIndex.
Referenced by basegfx::utils::adaptiveSubdivideByAngle(), basegfx::utils::adaptiveSubdivideByDistance(), basegfx::utils::applyLineDashing(), basegfx::utils::B2DPolygonToUnoPolygonBezierCoords(), basegfx::utils::closeWithGeometryChange(), basegfx::utils::createAreaGeometry(), basegfx::utils::distort(), basegfx::utils::exportToSvgD(), basegfx::unotools::UnoPolyPolygon::getBezierSegment(), basegfx::utils::getEdgeLength(), basegfx::utils::getLength(), basegfx::utils::getPositionAbsolute(), basegfx::utils::getSmallestDistancePointToPolygon(), basegfx::utils::getSnippetAbsolute(), basegfx::utils::importFromSvgD(), basegfx::utils::interpolate(), basegfx::utils::makeStartPoint(), basegfx::utils::openWithGeometryChange(), basegfx::unotools::polygonFromBezier2DSequence(), basegfx::utils::setContinuityInPoint(), and basegfx::utils::simplifyCurveSegments().
|
private |
Definition at line 1168 of file b2dpolygon.cxx.
References mpPolygon, and nIndex.
Referenced by getBezierSegment(), getContinuityInPoint(), getPrevControlPoint(), isPrevControlPointUsed(), resetPrevControlPoint(), setControlPoints(), and setPrevControlPoint().
|
private |
Definition at line 1453 of file b2dpolygon.cxx.
References mpPolygon.
|
inline |
Definition at line 234 of file b2dpolygon.hxx.
bool basegfx::B2DPolygon::hasDoublePoints | ( | ) | const |
test if Polygon has double points
Definition at line 1426 of file b2dpolygon.cxx.
References count(), and mpPolygon.
Referenced by basegfx::B2DPolyPolygon::hasDoublePoints(), and removeDoublePoints().
void basegfx::B2DPolygon::insert | ( | sal_uInt32 | nIndex, |
const basegfx::B2DPoint & | rPoint, | ||
sal_uInt32 | nCount = 1 |
||
) |
Coordinate insert/append.
Definition at line 1147 of file b2dpolygon.cxx.
bool basegfx::B2DPolygon::isClosed | ( | ) | const |
closed state interface
Definition at line 1405 of file b2dpolygon.cxx.
References mpPolygon.
Referenced by basegfx::utils::adaptiveSubdivideByAngle(), basegfx::utils::adaptiveSubdivideByDistance(), basegfx::utils::addPointsAtCuts(), basegfx::utils::applyLineDashing(), basegfx::utils::B2DPolygonToUnoPointSequence(), basegfx::utils::B2DPolygonToUnoPolygonBezierCoords(), basegfx::utils::clipPolygonOnParallelAxis(), basegfx::utils::clipPolyPolygonOnPolyPolygon(), basegfx::utils::closeWithGeometryChange(), basegfx::utils::createAreaGeometry(), basegfx::utils::createB3DPolygonFromB2DPolygon(), basegfx::utils::createEdgesOfGivenLength(), basegfx::utils::createLineTrapezoidFromB2DPolygon(), basegfx::utils::distort(), basegfx::utils::expandToCurveInPoint(), basegfx::utils::exportToSvgD(), getBezierSegment(), basegfx::utils::getLength(), basegfx::utils::getPositionAbsolute(), basegfx::utils::getSmallestDistancePointToPolygon(), basegfx::utils::getSnippetAbsolute(), basegfx::utils::getTangentEnteringPoint(), basegfx::utils::getTangentLeavingPoint(), basegfx::utils::growInNormalDirection(), basegfx::utils::implHandleSnippet(), basegfx::utils::interpolate(), basegfx::B2DPolyPolygon::isClosed(), basegfx::unotools::UnoPolyPolygon::isClosed(), basegfx::utils::isInEpsilonRange(), basegfx::utils::isPointOnPolygon(), basegfx::utils::isRectangle(), basegfx::utils::makeStartPoint(), basegfx::utils::openWithGeometryChange(), basegfx::utils::removeNeutralPoints(), basegfx::utils::reSegmentPolygon(), setClosed(), basegfx::utils::setContinuityInPoint(), and basegfx::utils::simplifyCurveSegments().
bool basegfx::B2DPolygon::isNextControlPointUsed | ( | sal_uInt32 | nIndex | ) | const |
Definition at line 1308 of file b2dpolygon.cxx.
References areControlPointsUsed(), basegfx::fTools::equalZero(), getNextControlVector(), and nIndex.
Referenced by basegfx::utils::expandToCurveInPoint(), basegfx::utils::exportToSvgD(), and basegfx::utils::setContinuityInPoint().
bool basegfx::B2DPolygon::isPrevControlPointUsed | ( | sal_uInt32 | nIndex | ) | const |
Definition at line 1303 of file b2dpolygon.cxx.
References areControlPointsUsed(), basegfx::fTools::equalZero(), getPrevControlVector(), and nIndex.
Referenced by basegfx::utils::closeWithGeometryChange(), basegfx::utils::expandToCurveInPoint(), basegfx::utils::exportToSvgD(), basegfx::utils::importFromSvgD(), basegfx::utils::openWithGeometryChange(), and basegfx::utils::setContinuityInPoint().
void basegfx::B2DPolygon::makeUnique | ( | ) |
unshare this polygon with all internally shared instances
Definition at line 1106 of file b2dpolygon.cxx.
References o3tl::cow_wrapper< typename T, class MTPolicy >::make_unique(), and mpPolygon.
bool basegfx::B2DPolygon::operator!= | ( | const B2DPolygon & | rPolygon | ) | const |
Definition at line 1119 of file b2dpolygon.cxx.
|
default |
References count, operator!=(), operator==(), and remove().
|
default |
assignment operator
bool basegfx::B2DPolygon::operator== | ( | const B2DPolygon & | rPolygon | ) | const |
compare operators
Definition at line 1111 of file b2dpolygon.cxx.
References mpPolygon, and o3tl::cow_wrapper< typename T, class MTPolicy >::same_object().
void basegfx::B2DPolygon::remove | ( | sal_uInt32 | nIndex, |
sal_uInt32 | nCount = 1 |
||
) |
remove points
Definition at line 1392 of file b2dpolygon.cxx.
References mpPolygon, nCount, and nIndex.
Referenced by basegfx::utils::closeWithGeometryChange(), basegfx::unotools::polygonFromBezier2DSequence(), and basegfx::utils::removeNeutralPoints().
void basegfx::B2DPolygon::removeDoublePoints | ( | ) |
remove double points, at the begin/end and follow-ups, too
Definition at line 1431 of file b2dpolygon.cxx.
References hasDoublePoints(), and mpPolygon.
Referenced by basegfx::utils::clipPolygonOnParallelAxis(), basegfx::utils::clipPolyPolygonOnPolyPolygon(), basegfx::utils::createAreaGeometry(), basegfx::utils::createPolygonFromRect(), basegfx::utils::createPolygonFromUnitEllipseSegment(), basegfx::utils::impCreateUnitCircle(), basegfx::utils::implHandleFirstLast(), and basegfx::triangulator::triangulate().
void basegfx::B2DPolygon::reserve | ( | sal_uInt32 | nCount | ) |
Definition at line 1142 of file b2dpolygon.cxx.
References mpPolygon, and nCount.
Referenced by basegfx::utils::adaptiveSubdivideByAngle(), basegfx::utils::adaptiveSubdivideByDistance(), basegfx::utils::simplifyCurveSegments(), basegfx::utils::UnoPointSequenceToB2DPolygon(), and basegfx::utils::UnoPolygonBezierCoordsToB2DPolygon().
void basegfx::B2DPolygon::resetControlPoints | ( | ) |
Definition at line 1250 of file b2dpolygon.cxx.
References areControlPointsUsed(), and mpPolygon.
void basegfx::B2DPolygon::resetNextControlPoint | ( | sal_uInt32 | nIndex | ) |
Definition at line 1242 of file b2dpolygon.cxx.
References areControlPointsUsed(), basegfx::fTools::equalZero(), basegfx::B2DVector::getEmptyVector(), getNextControlVector(), mpPolygon, and nIndex.
Referenced by basegfx::utils::setContinuityInPoint().
void basegfx::B2DPolygon::resetPrevControlPoint | ( | sal_uInt32 | nIndex | ) |
ControlPoint resets.
Definition at line 1234 of file b2dpolygon.cxx.
References areControlPointsUsed(), basegfx::fTools::equalZero(), basegfx::B2DVector::getEmptyVector(), getPrevControlVector(), mpPolygon, and nIndex.
Referenced by basegfx::utils::openWithGeometryChange(), and basegfx::utils::setContinuityInPoint().
void basegfx::B2DPolygon::setB2DPoint | ( | sal_uInt32 | nIndex, |
const basegfx::B2DPoint & | rValue | ||
) |
Definition at line 1134 of file b2dpolygon.cxx.
References getB2DPoint(), mpPolygon, and nIndex.
Referenced by basegfx::unotools::UnoPolyPolygon::setBezierSegment(), basegfx::unotools::UnoPolyPolygon::setPoint(), and basegfx::utils::snapPointsOfHorizontalOrVerticalEdges().
void basegfx::B2DPolygon::setClosed | ( | bool | bNew | ) |
Definition at line 1410 of file b2dpolygon.cxx.
References isClosed(), and mpPolygon.
Referenced by basegfx::utils::closeWithGeometryChange(), basegfx::utils::createB2DPolygonFromB3DPolygon(), basegfx::utils::createEdgesOfGivenLength(), basegfx::utils::createPolygonFromRect(), basegfx::utils::createUnitPolygon(), basegfx::utils::distort(), basegfx::utils::growInNormalDirection(), basegfx::utils::impCreateUnitCircle(), basegfx::utils::importFromSvgD(), basegfx::utils::interpolate(), basegfx::utils::openWithGeometryChange(), basegfx::utils::removeNeutralPoints(), basegfx::utils::reSegmentPolygon(), and basegfx::unotools::UnoPolyPolygon::setClosed().
void basegfx::B2DPolygon::setControlPoints | ( | sal_uInt32 | nIndex, |
const basegfx::B2DPoint & | rPrev, | ||
const basegfx::B2DPoint & | rNext | ||
) |
Definition at line 1222 of file b2dpolygon.cxx.
References getB2DPoint(), getNextControlVector(), getPrevControlVector(), mpPolygon, and nIndex.
Referenced by basegfx::utils::setContinuityInPoint().
void basegfx::B2DPolygon::setNextControlPoint | ( | sal_uInt32 | nIndex, |
const basegfx::B2DPoint & | rValue | ||
) |
Definition at line 1212 of file b2dpolygon.cxx.
References getB2DPoint(), getNextControlVector(), mpPolygon, and nIndex.
Referenced by basegfx::utils::distort(), basegfx::utils::expandToCurveInPoint(), basegfx::utils::getSnippetAbsolute(), basegfx::utils::interpolate(), basegfx::utils::makeStartPoint(), basegfx::unotools::UnoPolyPolygon::setBezierSegment(), and basegfx::utils::setContinuityInPoint().
void basegfx::B2DPolygon::setPrevControlPoint | ( | sal_uInt32 | nIndex, |
const basegfx::B2DPoint & | rValue | ||
) |
Definition at line 1202 of file b2dpolygon.cxx.
References getB2DPoint(), getPrevControlVector(), mpPolygon, and nIndex.
Referenced by appendQuadraticBezierSegment(), basegfx::utils::closeWithGeometryChange(), basegfx::utils::distort(), basegfx::utils::expandToCurveInPoint(), basegfx::utils::getSnippetAbsolute(), basegfx::utils::interpolate(), basegfx::utils::makeStartPoint(), basegfx::utils::openWithGeometryChange(), basegfx::unotools::polygonFromBezier2DSequence(), basegfx::unotools::UnoPolyPolygon::setBezierSegment(), and basegfx::utils::setContinuityInPoint().
void basegfx::B2DPolygon::transform | ( | const basegfx::B2DHomMatrix & | rMatrix | ) |
apply transformation given in matrix form
Definition at line 1440 of file b2dpolygon.cxx.
References count(), basegfx::B2DHomMatrix::isIdentity(), and mpPolygon.
Referenced by basegfx::utils::createPolygonFromEllipse(), basegfx::utils::createPolygonFromEllipseSegment(), and basegfx::utils::importFromSvgD().
|
private |
Definition at line 54 of file b2dpolygon.hxx.
Referenced by addOrReplaceSystemDependentDataInternal(), append(), appendBezierSegment(), appendQuadraticBezierSegment(), areControlPointsUsed(), clear(), count(), flip(), getB2DPoint(), getB2DRange(), getDefaultAdaptiveSubdivision(), getNextControlVector(), getPrevControlVector(), getSystemDependantDataInternal(), hasDoublePoints(), insert(), isClosed(), makeUnique(), operator==(), remove(), removeDoublePoints(), reserve(), resetControlPoints(), resetNextControlPoint(), resetPrevControlPoint(), setB2DPoint(), setClosed(), setControlPoints(), setNextControlPoint(), setPrevControlPoint(), and transform().