LibreOffice Module basegfx (master) 1
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
basegfx::B2DPolygon Class Reference

#include <b2dpolygon.hxx>

Collaboration diagram for basegfx::B2DPolygon:
[legend]

Public Types

typedef o3tl::cow_wrapper< ImplB2DPolygonImplType
 

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 ()
 
B2DPolygonoperator= (const B2DPolygon &rPolygon)
 assignment operator More...
 
B2DPolygonoperator= (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::B2DVectorgetPrevControlVector (sal_uInt32 nIndex) const
 
const basegfx::B2DVectorgetNextControlVector (sal_uInt32 nIndex) const
 

Private Attributes

ImplType mpPolygon
 

Detailed Description

Definition at line 47 of file b2dpolygon.hxx.

Member Typedef Documentation

◆ ImplType

Definition at line 50 of file b2dpolygon.hxx.

Constructor & Destructor Documentation

◆ B2DPolygon() [1/5]

basegfx::B2DPolygon::B2DPolygon ( )

diverse constructors

Definition at line 1080 of file b2dpolygon.cxx.

◆ B2DPolygon() [2/5]

basegfx::B2DPolygon::B2DPolygon ( const B2DPolygon rPolygon)
default

◆ B2DPolygon() [3/5]

basegfx::B2DPolygon::B2DPolygon ( B2DPolygon &&  rPolygon)
default

◆ B2DPolygon() [4/5]

basegfx::B2DPolygon::B2DPolygon ( const B2DPolygon rPolygon,
sal_uInt32  nIndex,
sal_uInt32  nCount 
)

Definition at line 1095 of file b2dpolygon.cxx.

References nCount, and nIndex.

◆ B2DPolygon() [5/5]

basegfx::B2DPolygon::B2DPolygon ( std::initializer_list< basegfx::B2DPoint rPoints)

Definition at line 1083 of file b2dpolygon.cxx.

References append().

◆ ~B2DPolygon()

basegfx::B2DPolygon::~B2DPolygon ( )
default

Member Function Documentation

◆ addOrReplaceSystemDependentData()

template<class T , class... Args>
std::shared_ptr< T > basegfx::B2DPolygon::addOrReplaceSystemDependentData ( Args &&...  args) const
inline

Definition at line 240 of file b2dpolygon.hxx.

References args.

◆ addOrReplaceSystemDependentDataInternal()

void basegfx::B2DPolygon::addOrReplaceSystemDependentDataInternal ( SystemDependentData_SharedPtr rData) const
private

Definition at line 1448 of file b2dpolygon.cxx.

References mpPolygon.

◆ append() [1/3]

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

Parameters
rPolyThe source polygon
nIndexThe index to the first point of rPoly to append
nCountThe 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.

References count(), mpPolygon, nCount, and nIndex.

◆ append() [2/3]

void basegfx::B2DPolygon::append ( const basegfx::B2DPoint rPoint)

Definition at line 1163 of file b2dpolygon.cxx.

References mpPolygon.

◆ append() [3/3]

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().

◆ appendBezierSegment()

void basegfx::B2DPolygon::appendBezierSegment ( const basegfx::B2DPoint rNextControlPoint,
const basegfx::B2DPoint rPrevControlPoint,
const basegfx::B2DPoint rPoint 
)

◆ appendQuadraticBezierSegment()

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().

◆ areControlPointsUsed()

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().

◆ clear()

void basegfx::B2DPolygon::clear ( )

◆ count()

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().

◆ flip()

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().

◆ getB2DPoint()

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().

◆ getB2DRange()

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.

Returns
The outer range of the bezier curve/polygon

Definition at line 1366 of file b2dpolygon.cxx.

References mpPolygon.

Referenced by basegfx::utils::addPointsAtCuts(), basegfx::B2DPolyPolygon::getB2DRange(), and basegfx::utils::getRange().

◆ getBezierSegment()

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).

Parameters
nIndexIndex of the addressed edge's start point
rTargetThe 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().

◆ getContinuityInPoint()

B2VectorContinuity basegfx::B2DPolygon::getContinuityInPoint ( sal_uInt32  nIndex) const

◆ getDefaultAdaptiveSubdivision()

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.

Returns
The default (and buffered) subdivision of this polygon. It may be this polygon itself when it has no bezier segments. It is guaranteed to have no more bezier segments

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().

◆ getNextControlPoint()

B2DPoint basegfx::B2DPolygon::getNextControlPoint ( sal_uInt32  nIndex) const

◆ getNextControlVector()

const basegfx::B2DVector & basegfx::B2DPolygon::getNextControlVector ( sal_uInt32  nIndex) const
private

◆ getPrevControlPoint()

B2DPoint basegfx::B2DPolygon::getPrevControlPoint ( sal_uInt32  nIndex) const

◆ getPrevControlVector()

const basegfx::B2DVector & basegfx::B2DPolygon::getPrevControlVector ( sal_uInt32  nIndex) const
private

◆ getSystemDependantDataInternal()

SystemDependentData_SharedPtr basegfx::B2DPolygon::getSystemDependantDataInternal ( size_t  hash_code) const
private

Definition at line 1453 of file b2dpolygon.cxx.

References mpPolygon.

◆ getSystemDependentData()

template<class T >
std::shared_ptr< T > basegfx::B2DPolygon::getSystemDependentData ( ) const
inline

Definition at line 234 of file b2dpolygon.hxx.

◆ hasDoublePoints()

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().

◆ insert()

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.

References mpPolygon, nCount, and nIndex.

◆ isClosed()

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().

◆ isNextControlPointUsed()

bool basegfx::B2DPolygon::isNextControlPointUsed ( sal_uInt32  nIndex) const

◆ isPrevControlPointUsed()

bool basegfx::B2DPolygon::isPrevControlPointUsed ( sal_uInt32  nIndex) const

◆ makeUnique()

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.

◆ operator!=()

bool basegfx::B2DPolygon::operator!= ( const B2DPolygon rPolygon) const

Definition at line 1119 of file b2dpolygon.cxx.

◆ operator=() [1/2]

B2DPolygon & basegfx::B2DPolygon::operator= ( B2DPolygon &&  rPolygon)
default

◆ operator=() [2/2]

B2DPolygon & basegfx::B2DPolygon::operator= ( const B2DPolygon rPolygon)
default

assignment operator

◆ 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().

◆ remove()

void basegfx::B2DPolygon::remove ( sal_uInt32  nIndex,
sal_uInt32  nCount = 1 
)

◆ removeDoublePoints()

void basegfx::B2DPolygon::removeDoublePoints ( )

◆ reserve()

void basegfx::B2DPolygon::reserve ( sal_uInt32  nCount)

◆ resetControlPoints()

void basegfx::B2DPolygon::resetControlPoints ( )

Definition at line 1250 of file b2dpolygon.cxx.

References areControlPointsUsed(), and mpPolygon.

◆ resetNextControlPoint()

void basegfx::B2DPolygon::resetNextControlPoint ( sal_uInt32  nIndex)

◆ resetPrevControlPoint()

void basegfx::B2DPolygon::resetPrevControlPoint ( sal_uInt32  nIndex)

◆ setB2DPoint()

void basegfx::B2DPolygon::setB2DPoint ( sal_uInt32  nIndex,
const basegfx::B2DPoint rValue 
)

◆ setClosed()

void basegfx::B2DPolygon::setClosed ( bool  bNew)

◆ setControlPoints()

void basegfx::B2DPolygon::setControlPoints ( sal_uInt32  nIndex,
const basegfx::B2DPoint rPrev,
const basegfx::B2DPoint rNext 
)

◆ setNextControlPoint()

void basegfx::B2DPolygon::setNextControlPoint ( sal_uInt32  nIndex,
const basegfx::B2DPoint rValue 
)

◆ setPrevControlPoint()

void basegfx::B2DPolygon::setPrevControlPoint ( sal_uInt32  nIndex,
const basegfx::B2DPoint rValue 
)

◆ transform()

void basegfx::B2DPolygon::transform ( const basegfx::B2DHomMatrix rMatrix)

Member Data Documentation

◆ mpPolygon

ImplType basegfx::B2DPolygon::mpPolygon
private

The documentation for this class was generated from the following files: