Lines Matching refs:rCandidate

60 		void openWithGeometryChange(B2DPolygon& rCandidate)  in openWithGeometryChange()  argument
62 if(rCandidate.isClosed()) in openWithGeometryChange()
64 if(rCandidate.count()) in openWithGeometryChange()
66 rCandidate.append(rCandidate.getB2DPoint(0)); in openWithGeometryChange()
68 if(rCandidate.areControlPointsUsed() && rCandidate.isPrevControlPointUsed(0)) in openWithGeometryChange()
70 rCandidate.setPrevControlPoint(rCandidate.count() - 1, rCandidate.getPrevControlPoint(0)); in openWithGeometryChange()
71 rCandidate.resetPrevControlPoint(0); in openWithGeometryChange()
75 rCandidate.setClosed(false); in openWithGeometryChange()
79 void closeWithGeometryChange(B2DPolygon& rCandidate) in closeWithGeometryChange() argument
81 if(!rCandidate.isClosed()) in closeWithGeometryChange()
83 …while(rCandidate.count() > 1 && rCandidate.getB2DPoint(0) == rCandidate.getB2DPoint(rCandidate.cou… in closeWithGeometryChange()
85 … if(rCandidate.areControlPointsUsed() && rCandidate.isPrevControlPointUsed(rCandidate.count() - 1)) in closeWithGeometryChange()
87 rCandidate.setPrevControlPoint(0, rCandidate.getPrevControlPoint(rCandidate.count() - 1)); in closeWithGeometryChange()
90 rCandidate.remove(rCandidate.count() - 1); in closeWithGeometryChange()
93 rCandidate.setClosed(true); in closeWithGeometryChange()
97 void checkClosed(B2DPolygon& rCandidate) in checkClosed() argument
102 …if(rCandidate.count() > 1 && rCandidate.getB2DPoint(0) == rCandidate.getB2DPoint(rCandidate.count(… in checkClosed()
104 closeWithGeometryChange(rCandidate); in checkClosed()
110 sal_uInt32 getIndexOfPredecessor(sal_uInt32 nIndex, const B2DPolygon& rCandidate) in getIndexOfPredecessor() argument
112 …OSL_ENSURE(nIndex < rCandidate.count(), "getIndexOfPredecessor: Access to polygon out of range (!)… in getIndexOfPredecessor()
118 else if(rCandidate.count()) in getIndexOfPredecessor()
120 return rCandidate.count() - 1L; in getIndexOfPredecessor()
128 sal_uInt32 getIndexOfSuccessor(sal_uInt32 nIndex, const B2DPolygon& rCandidate) in getIndexOfSuccessor() argument
130 …OSL_ENSURE(nIndex < rCandidate.count(), "getIndexOfPredecessor: Access to polygon out of range (!)… in getIndexOfSuccessor()
132 if(nIndex + 1L < rCandidate.count()) in getIndexOfSuccessor()
136 else if(nIndex + 1L == rCandidate.count()) in getIndexOfSuccessor()
146 B2VectorOrientation getOrientation(const B2DPolygon& rCandidate) in getOrientation() argument
150 if(rCandidate.count() > 2L || rCandidate.areControlPointsUsed()) in getOrientation()
152 const double fSignedArea(getSignedArea(rCandidate)); in getOrientation()
171 B2VectorContinuity getContinuityInPoint(const B2DPolygon& rCandidate, sal_uInt32 nIndex) in getContinuityInPoint() argument
173 return rCandidate.getContinuityInPoint(nIndex); in getContinuityInPoint()
176 B2DPolygon adaptiveSubdivideByDistance(const B2DPolygon& rCandidate, double fDistanceBound) in adaptiveSubdivideByDistance() argument
178 if(rCandidate.areControlPointsUsed()) in adaptiveSubdivideByDistance()
180 const sal_uInt32 nPointCount(rCandidate.count()); in adaptiveSubdivideByDistance()
186 const sal_uInt32 nEdgeCount(rCandidate.isClosed() ? nPointCount : nPointCount - 1); in adaptiveSubdivideByDistance()
188 aBezier.setStartPoint(rCandidate.getB2DPoint(0)); in adaptiveSubdivideByDistance()
200 aBezier.setEndPoint(rCandidate.getB2DPoint(nNextIndex)); in adaptiveSubdivideByDistance()
201 aBezier.setControlPointA(rCandidate.getNextControlPoint(a)); in adaptiveSubdivideByDistance()
202 aBezier.setControlPointB(rCandidate.getPrevControlPoint(nNextIndex)); in adaptiveSubdivideByDistance()
244 if(rCandidate.isClosed()) in adaptiveSubdivideByDistance()
255 return rCandidate; in adaptiveSubdivideByDistance()
259 B2DPolygon adaptiveSubdivideByAngle(const B2DPolygon& rCandidate, double fAngleBound) in adaptiveSubdivideByAngle() argument
261 if(rCandidate.areControlPointsUsed()) in adaptiveSubdivideByAngle()
263 const sal_uInt32 nPointCount(rCandidate.count()); in adaptiveSubdivideByAngle()
269 const sal_uInt32 nEdgeCount(rCandidate.isClosed() ? nPointCount : nPointCount - 1); in adaptiveSubdivideByAngle()
271 aBezier.setStartPoint(rCandidate.getB2DPoint(0)); in adaptiveSubdivideByAngle()
297 aBezier.setEndPoint(rCandidate.getB2DPoint(nNextIndex)); in adaptiveSubdivideByAngle()
298 aBezier.setControlPointA(rCandidate.getNextControlPoint(a)); in adaptiveSubdivideByAngle()
299 aBezier.setControlPointB(rCandidate.getPrevControlPoint(nNextIndex)); in adaptiveSubdivideByAngle()
317 if(rCandidate.isClosed()) in adaptiveSubdivideByAngle()
328 return rCandidate; in adaptiveSubdivideByAngle()
332 B2DPolygon adaptiveSubdivideByCount(const B2DPolygon& rCandidate, sal_uInt32 nCount) in adaptiveSubdivideByCount() argument
334 if(rCandidate.areControlPointsUsed()) in adaptiveSubdivideByCount()
336 const sal_uInt32 nPointCount(rCandidate.count()); in adaptiveSubdivideByCount()
342 const sal_uInt32 nEdgeCount(rCandidate.isClosed() ? nPointCount : nPointCount - 1); in adaptiveSubdivideByCount()
344 aBezier.setStartPoint(rCandidate.getB2DPoint(0)); in adaptiveSubdivideByCount()
362 aBezier.setEndPoint(rCandidate.getB2DPoint(nNextIndex)); in adaptiveSubdivideByCount()
363 aBezier.setControlPointA(rCandidate.getNextControlPoint(a)); in adaptiveSubdivideByCount()
364 aBezier.setControlPointB(rCandidate.getPrevControlPoint(nNextIndex)); in adaptiveSubdivideByCount()
382 if(rCandidate.isClosed()) in adaptiveSubdivideByCount()
393 return rCandidate; in adaptiveSubdivideByCount()
397 bool isInside(const B2DPolygon& rCandidate, const B2DPoint& rPoint, bool bWithBorder) in isInside() argument
399 …const B2DPolygon aCandidate(rCandidate.areControlPointsUsed() ? rCandidate.getDefaultAdaptiveSubdi… in isInside()
456 bool isInside(const B2DPolygon& rCandidate, const B2DPolygon& rPolygon, bool bWithBorder) in isInside() argument
458 …const B2DPolygon aCandidate(rCandidate.areControlPointsUsed() ? rCandidate.getDefaultAdaptiveSubdi… in isInside()
475 B2DRange getRangeWithControlPoints(const B2DPolygon& rCandidate) in getRangeWithControlPoints() argument
477 const sal_uInt32 nPointCount(rCandidate.count()); in getRangeWithControlPoints()
482 const bool bControlPointsUsed(rCandidate.areControlPointsUsed()); in getRangeWithControlPoints()
486 aRetval.expand(rCandidate.getB2DPoint(a)); in getRangeWithControlPoints()
490 aRetval.expand(rCandidate.getNextControlPoint(a)); in getRangeWithControlPoints()
491 aRetval.expand(rCandidate.getPrevControlPoint(a)); in getRangeWithControlPoints()
499 B2DRange getRange(const B2DPolygon& rCandidate) in getRange() argument
502 return rCandidate.getB2DRange(); in getRange()
505 double getSignedArea(const B2DPolygon& rCandidate) in getSignedArea() argument
507 …const B2DPolygon aCandidate(rCandidate.areControlPointsUsed() ? rCandidate.getDefaultAdaptiveSubdi… in getSignedArea()
534 double getArea(const B2DPolygon& rCandidate) in getArea() argument
538 if(rCandidate.count() > 2 || rCandidate.areControlPointsUsed()) in getArea()
540 fRetval = getSignedArea(rCandidate); in getArea()
552 double getEdgeLength(const B2DPolygon& rCandidate, sal_uInt32 nIndex) in getEdgeLength() argument
554 const sal_uInt32 nPointCount(rCandidate.count()); in getEdgeLength()
562 if(rCandidate.areControlPointsUsed()) in getEdgeLength()
566 aEdge.setStartPoint(rCandidate.getB2DPoint(nIndex)); in getEdgeLength()
567 aEdge.setControlPointA(rCandidate.getNextControlPoint(nIndex)); in getEdgeLength()
568 aEdge.setControlPointB(rCandidate.getPrevControlPoint(nNextIndex)); in getEdgeLength()
569 aEdge.setEndPoint(rCandidate.getB2DPoint(nNextIndex)); in getEdgeLength()
575 const B2DPoint aCurrent(rCandidate.getB2DPoint(nIndex)); in getEdgeLength()
576 const B2DPoint aNext(rCandidate.getB2DPoint(nNextIndex)); in getEdgeLength()
585 double getLength(const B2DPolygon& rCandidate) in getLength() argument
588 const sal_uInt32 nPointCount(rCandidate.count()); in getLength()
592 const sal_uInt32 nEdgeCount(rCandidate.isClosed() ? nPointCount : nPointCount - 1L); in getLength()
594 if(rCandidate.areControlPointsUsed()) in getLength()
597 aEdge.setStartPoint(rCandidate.getB2DPoint(0)); in getLength()
602 aEdge.setControlPointA(rCandidate.getNextControlPoint(a)); in getLength()
603 aEdge.setControlPointB(rCandidate.getPrevControlPoint(nNextIndex)); in getLength()
604 aEdge.setEndPoint(rCandidate.getB2DPoint(nNextIndex)); in getLength()
612 B2DPoint aCurrent(rCandidate.getB2DPoint(0)); in getLength()
617 const B2DPoint aNext(rCandidate.getB2DPoint(nNextIndex)); in getLength()
628 B2DPoint getPositionAbsolute(const B2DPolygon& rCandidate, double fDistance, double fLength) in getPositionAbsolute() argument
631 const sal_uInt32 nPointCount(rCandidate.count()); in getPositionAbsolute()
636 aRetval = rCandidate.getB2DPoint(0); in getPositionAbsolute()
640 const sal_uInt32 nEdgeCount(rCandidate.isClosed() ? nPointCount : nPointCount - 1); in getPositionAbsolute()
647 fLength = getLength(rCandidate); in getPositionAbsolute()
653 if(rCandidate.isClosed()) in getPositionAbsolute()
669 if(rCandidate.isClosed()) in getPositionAbsolute()
685 double fEdgeLength(getEdgeLength(rCandidate, nIndex)); in getPositionAbsolute()
700 fEdgeLength = getEdgeLength(rCandidate, ++nIndex); in getPositionAbsolute()
710 aRetval = rCandidate.getB2DPoint(nIndex); in getPositionAbsolute()
720 aRetval = rCandidate.getB2DPoint(nNextIndex); in getPositionAbsolute()
731 const B2DPoint aNextPoint(rCandidate.getB2DPoint(nNextIndex)); in getPositionAbsolute()
735 if(rCandidate.areControlPointsUsed()) in getPositionAbsolute()
739 aRetval, rCandidate.getNextControlPoint(nIndex), in getPositionAbsolute()
740 rCandidate.getPrevControlPoint(nNextIndex), aNextPoint); in getPositionAbsolute()
766 B2DPoint getPositionRelative(const B2DPolygon& rCandidate, double fDistance, double fLength) in getPositionRelative() argument
771 fLength = getLength(rCandidate); in getPositionRelative()
776 return getPositionAbsolute(rCandidate, fDistance * fLength, fLength); in getPositionRelative()
779 …B2DPolygon getSnippetAbsolute(const B2DPolygon& rCandidate, double fFrom, double fTo, double fLeng… in getSnippetAbsolute() argument
781 const sal_uInt32 nPointCount(rCandidate.count()); in getSnippetAbsolute()
788 fLength = getLength(rCandidate); in getSnippetAbsolute()
812 return rCandidate; in getSnippetAbsolute()
817 … const sal_uInt32 nEdgeCount(rCandidate.isClosed() ? nPointCount : nPointCount - 1); in getSnippetAbsolute()
824 const double fEdgeLength(getEdgeLength(rCandidate, a)); in getSnippetAbsolute()
830 aRetval.append(rCandidate.getB2DPoint(a)); in getSnippetAbsolute()
832 if(rCandidate.areControlPointsUsed()) in getSnippetAbsolute()
834 … aRetval.setNextControlPoint(aRetval.count() - 1, rCandidate.getNextControlPoint(a)); in getSnippetAbsolute()
844 aRetval.append(rCandidate.getB2DPoint(a)); in getSnippetAbsolute()
846 if(rCandidate.areControlPointsUsed()) in getSnippetAbsolute()
848 … aRetval.setNextControlPoint(aRetval.count() - 1, rCandidate.getNextControlPoint(a)); in getSnippetAbsolute()
854 const B2DPoint aStart(rCandidate.getB2DPoint(a)); in getSnippetAbsolute()
855 const B2DPoint aEnd(rCandidate.getB2DPoint(nNextIndex)); in getSnippetAbsolute()
858 if(rCandidate.areControlPointsUsed()) in getSnippetAbsolute()
861 aStart, rCandidate.getNextControlPoint(a), in getSnippetAbsolute()
862 rCandidate.getPrevControlPoint(nNextIndex), aEnd); in getSnippetAbsolute()
902 aRetval.append(rCandidate.getB2DPoint(nNextIndex)); in getSnippetAbsolute()
904 if(rCandidate.areControlPointsUsed()) in getSnippetAbsolute()
906 … aRetval.setPrevControlPoint(aRetval.count() - 1, rCandidate.getPrevControlPoint(nNextIndex)); in getSnippetAbsolute()
912 const B2DPoint aStart(rCandidate.getB2DPoint(a)); in getSnippetAbsolute()
913 const B2DPoint aEnd(rCandidate.getB2DPoint(nNextIndex)); in getSnippetAbsolute()
916 if(rCandidate.areControlPointsUsed()) in getSnippetAbsolute()
919 aStart, rCandidate.getNextControlPoint(a), in getSnippetAbsolute()
920 rCandidate.getPrevControlPoint(nNextIndex), aEnd); in getSnippetAbsolute()
953 aRetval.append(rCandidate.getB2DPoint(nNextIndex)); in getSnippetAbsolute()
955 if(rCandidate.areControlPointsUsed()) in getSnippetAbsolute()
957 … aRetval.setPrevControlPoint(aRetval.count() - 1, rCandidate.getPrevControlPoint(nNextIndex)); in getSnippetAbsolute()
958 … aRetval.setNextControlPoint(aRetval.count() - 1, rCandidate.getNextControlPoint(nNextIndex)); in getSnippetAbsolute()
971 return rCandidate; in getSnippetAbsolute()
975 …B2DPolygon getSnippetRelative(const B2DPolygon& rCandidate, double fFrom, double fTo, double fLeng… in getSnippetRelative() argument
980 fLength = getLength(rCandidate); in getSnippetRelative()
985 return getSnippetAbsolute(rCandidate, fFrom * fLength, fTo * fLength, fLength); in getSnippetRelative()
989 const B2DPolygon& rCandidate, in findCut() argument
995 const sal_uInt32 nPointCount(rCandidate.count()); in findCut()
999 sal_uInt32 nEnd1(getIndexOfSuccessor(nIndex1, rCandidate)); in findCut()
1000 sal_uInt32 nEnd2(getIndexOfSuccessor(nIndex2, rCandidate)); in findCut()
1002 const B2DPoint aStart1(rCandidate.getB2DPoint(nIndex1)); in findCut()
1003 const B2DPoint aEnd1(rCandidate.getB2DPoint(nEnd1)); in findCut()
1006 const B2DPoint aStart2(rCandidate.getB2DPoint(nIndex2)); in findCut()
1007 const B2DPoint aEnd2(rCandidate.getB2DPoint(nEnd2)); in findCut()
1298 …void applyLineDashing(const B2DPolygon& rCandidate, const ::std::vector<double>& rDotDashArray, B2… in applyLineDashing() argument
1300 const sal_uInt32 nPointCount(rCandidate.count()); in applyLineDashing()
1323 const sal_uInt32 nEdgeCount(rCandidate.isClosed() ? nPointCount : nPointCount - 1); in applyLineDashing()
1324 aCurrentEdge.setStartPoint(rCandidate.getB2DPoint(0)); in applyLineDashing()
1338 aCurrentEdge.setControlPointA(rCandidate.getNextControlPoint(a)); in applyLineDashing()
1339 aCurrentEdge.setControlPointB(rCandidate.getPrevControlPoint(nNextIndex)); in applyLineDashing()
1340 aCurrentEdge.setEndPoint(rCandidate.getB2DPoint(nNextIndex)); in applyLineDashing()
1539 pLineTarget->append(rCandidate); in applyLineDashing()
1544 pGapTarget->append(rCandidate); in applyLineDashing()
1631 …bool isInEpsilonRange(const B2DPolygon& rCandidate, const B2DPoint& rTestPosition, double fDistanc… in isInEpsilonRange() argument
1634 const B2DPolygon aCandidate(rCandidate.getDefaultAdaptiveSubdivision()); in isInEpsilonRange()
2093 bool hasNeutralPoints(const B2DPolygon& rCandidate) in hasNeutralPoints() argument
2095 OSL_ENSURE(!rCandidate.areControlPointsUsed(), "hasNeutralPoints: ATM works not for curves (!)"); in hasNeutralPoints()
2096 const sal_uInt32 nPointCount(rCandidate.count()); in hasNeutralPoints()
2100 B2DPoint aPrevPoint(rCandidate.getB2DPoint(nPointCount - 1L)); in hasNeutralPoints()
2101 B2DPoint aCurrPoint(rCandidate.getB2DPoint(0L)); in hasNeutralPoints()
2105 const B2DPoint aNextPoint(rCandidate.getB2DPoint((a + 1) % nPointCount)); in hasNeutralPoints()
2127 B2DPolygon removeNeutralPoints(const B2DPolygon& rCandidate) in removeNeutralPoints() argument
2129 if(hasNeutralPoints(rCandidate)) in removeNeutralPoints()
2131 const sal_uInt32 nPointCount(rCandidate.count()); in removeNeutralPoints()
2133 B2DPoint aPrevPoint(rCandidate.getB2DPoint(nPointCount - 1L)); in removeNeutralPoints()
2134 B2DPoint aCurrPoint(rCandidate.getB2DPoint(0L)); in removeNeutralPoints()
2138 const B2DPoint aNextPoint(rCandidate.getB2DPoint((a + 1) % nPointCount)); in removeNeutralPoints()
2165 aRetval.setClosed(rCandidate.isClosed()); in removeNeutralPoints()
2171 return rCandidate; in removeNeutralPoints()
2175 bool isConvex(const B2DPolygon& rCandidate) in isConvex() argument
2177 OSL_ENSURE(!rCandidate.areControlPointsUsed(), "isConvex: ATM works not for curves (!)"); in isConvex()
2178 const sal_uInt32 nPointCount(rCandidate.count()); in isConvex()
2182 const B2DPoint aPrevPoint(rCandidate.getB2DPoint(nPointCount - 1L)); in isConvex()
2183 B2DPoint aCurrPoint(rCandidate.getB2DPoint(0L)); in isConvex()
2189 const B2DPoint aNextPoint(rCandidate.getB2DPoint((a + 1) % nPointCount)); in isConvex()
2216 B2VectorOrientation getOrientationForIndex(const B2DPolygon& rCandidate, sal_uInt32 nIndex) in getOrientationForIndex() argument
2218 OSL_ENSURE(nIndex < rCandidate.count(), "getOrientationForIndex: index out of range (!)"); in getOrientationForIndex()
2219 const B2DPoint aPrev(rCandidate.getB2DPoint(getIndexOfPredecessor(nIndex, rCandidate))); in getOrientationForIndex()
2220 const B2DPoint aCurr(rCandidate.getB2DPoint(nIndex)); in getOrientationForIndex()
2221 const B2DPoint aNext(rCandidate.getB2DPoint(getIndexOfSuccessor(nIndex, rCandidate))); in getOrientationForIndex()
2228 …bool isPointOnLine(const B2DPoint& rStart, const B2DPoint& rEnd, const B2DPoint& rCandidate, bool … in isPointOnLine() argument
2230 if(rCandidate.equal(rStart) || rCandidate.equal(rEnd)) in isPointOnLine()
2243 const B2DVector aTestVector(rCandidate - rStart); in isPointOnLine()
2263 bool isPointOnPolygon(const B2DPolygon& rCandidate, const B2DPoint& rPoint, bool bWithPoints) in isPointOnPolygon() argument
2265 …const B2DPolygon aCandidate(rCandidate.areControlPointsUsed() ? rCandidate.getDefaultAdaptiveSubdi… in isPointOnPolygon()
2293 … B2DPoint& rA, const B2DPoint& rB, const B2DPoint& rC, const B2DPoint& rCandidate, bool bWithBorde… in isPointInTriangle() argument
2295 if(arePointsOnSameSideOfLine(rA, rB, rC, rCandidate, bWithBorder)) in isPointInTriangle()
2297 if(arePointsOnSameSideOfLine(rB, rC, rA, rCandidate, bWithBorder)) in isPointInTriangle()
2299 if(arePointsOnSameSideOfLine(rC, rA, rB, rCandidate, bWithBorder)) in isPointInTriangle()
2334 void addTriangleFan(const B2DPolygon& rCandidate, B2DPolygon& rTarget) in addTriangleFan() argument
2336 const sal_uInt32 nCount(rCandidate.count()); in addTriangleFan()
2340 const B2DPoint aStart(rCandidate.getB2DPoint(0L)); in addTriangleFan()
2341 B2DPoint aLast(rCandidate.getB2DPoint(1L)); in addTriangleFan()
2345 const B2DPoint aCurrent(rCandidate.getB2DPoint(a)); in addTriangleFan()
2465 B3DPolygon createB3DPolygonFromB2DPolygon(const B2DPolygon& rCandidate, double fZCoordinate) in createB3DPolygonFromB2DPolygon() argument
2467 if(rCandidate.areControlPointsUsed()) in createB3DPolygonFromB2DPolygon()
2470 const B2DPolygon aCandidate(adaptiveSubdivideByAngle(rCandidate)); in createB3DPolygonFromB2DPolygon()
2477 for(sal_uInt32 a(0L); a < rCandidate.count(); a++) in createB3DPolygonFromB2DPolygon()
2479 B2DPoint aPoint(rCandidate.getB2DPoint(a)); in createB3DPolygonFromB2DPolygon()
2484 aRetval.setClosed(rCandidate.isClosed()); in createB3DPolygonFromB2DPolygon()
2490 B2DPolygon createB2DPolygonFromB3DPolygon(const B3DPolygon& rCandidate, const B3DHomMatrix& rMat) in createB2DPolygonFromB3DPolygon() argument
2493 const sal_uInt32 nCount(rCandidate.count()); in createB2DPolygonFromB3DPolygon()
2498 B3DPoint aCandidate(rCandidate.getB3DPoint(a)); in createB2DPolygonFromB3DPolygon()
2509 aRetval.setClosed(rCandidate.isClosed()); in createB2DPolygonFromB3DPolygon()
2579 …double getSmallestDistancePointToPolygon(const B2DPolygon& rCandidate, const B2DPoint& rTestPoint,… in getSmallestDistancePointToPolygon() argument
2582 const sal_uInt32 nPointCount(rCandidate.count()); in getSmallestDistancePointToPolygon()
2587 const sal_uInt32 nEdgeCount(rCandidate.isClosed() ? nPointCount : nPointCount - 1L); in getSmallestDistancePointToPolygon()
2589 aBezier.setStartPoint(rCandidate.getB2DPoint(0)); in getSmallestDistancePointToPolygon()
2594 aBezier.setEndPoint(rCandidate.getB2DPoint(nNextIndex)); in getSmallestDistancePointToPolygon()
2599 if(rCandidate.areControlPointsUsed()) in getSmallestDistancePointToPolygon()
2601 aBezier.setControlPointA(rCandidate.getNextControlPoint(a)); in getSmallestDistancePointToPolygon()
2602 aBezier.setControlPointB(rCandidate.getPrevControlPoint(nNextIndex)); in getSmallestDistancePointToPolygon()
2637 if(rCandidate.isClosed()) in getSmallestDistancePointToPolygon()
2639 rEdgeIndex = getIndexOfSuccessor(rEdgeIndex, rCandidate); in getSmallestDistancePointToPolygon()
2656 …B2DPoint distort(const B2DPoint& rCandidate, const B2DRange& rOriginal, const B2DPoint& rTopLeft, … in distort() argument
2660 return rCandidate; in distort()
2664 const double fRelativeX((rCandidate.getX() - rOriginal.getMinX()) / rOriginal.getWidth()); in distort()
2665 const double fRelativeY((rCandidate.getY() - rOriginal.getMinY()) / rOriginal.getHeight()); in distort()
2677 …B2DPolygon distort(const B2DPolygon& rCandidate, const B2DRange& rOriginal, const B2DPoint& rTopLe… in distort() argument
2679 const sal_uInt32 nPointCount(rCandidate.count()); in distort()
2687 …aRetval.append(distort(rCandidate.getB2DPoint(a), rOriginal, rTopLeft, rTopRight, rBottomLeft, rBo… in distort()
2689 if(rCandidate.areControlPointsUsed()) in distort()
2691 if(!rCandidate.getPrevControlPoint(a).equalZero()) in distort()
2693 …aRetval.setPrevControlPoint(a, distort(rCandidate.getPrevControlPoint(a), rOriginal, rTopLeft, rTo… in distort()
2696 if(!rCandidate.getNextControlPoint(a).equalZero()) in distort()
2698 …aRetval.setNextControlPoint(a, distort(rCandidate.getNextControlPoint(a), rOriginal, rTopLeft, rTo… in distort()
2703 aRetval.setClosed(rCandidate.isClosed()); in distort()
2708 return rCandidate; in distort()
2712 B2DPolygon rotateAroundPoint(const B2DPolygon& rCandidate, const B2DPoint& rCenter, double fAngle) in rotateAroundPoint() argument
2714 const sal_uInt32 nPointCount(rCandidate.count()); in rotateAroundPoint()
2715 B2DPolygon aRetval(rCandidate); in rotateAroundPoint()
2727 B2DPolygon expandToCurve(const B2DPolygon& rCandidate) in expandToCurve() argument
2729 B2DPolygon aRetval(rCandidate); in expandToCurve()
2731 for(sal_uInt32 a(0L); a < rCandidate.count(); a++) in expandToCurve()
2739 bool expandToCurveInPoint(B2DPolygon& rCandidate, sal_uInt32 nIndex) in expandToCurveInPoint() argument
2741 …OSL_ENSURE(nIndex < rCandidate.count(), "expandToCurveInPoint: Access to polygon out of range (!)"… in expandToCurveInPoint()
2743 const sal_uInt32 nPointCount(rCandidate.count()); in expandToCurveInPoint()
2748 if(!rCandidate.isPrevControlPointUsed(nIndex)) in expandToCurveInPoint()
2750 if(!rCandidate.isClosed() && 0 == nIndex) in expandToCurveInPoint()
2757rCandidate.setPrevControlPoint(nIndex, interpolate(rCandidate.getB2DPoint(nIndex), rCandidate.getB… in expandToCurveInPoint()
2763 if(!rCandidate.isNextControlPointUsed(nIndex)) in expandToCurveInPoint()
2765 if(!rCandidate.isClosed() && nIndex + 1 == nPointCount) in expandToCurveInPoint()
2772rCandidate.setNextControlPoint(nIndex, interpolate(rCandidate.getB2DPoint(nIndex), rCandidate.getB… in expandToCurveInPoint()
2781 B2DPolygon setContinuity(const B2DPolygon& rCandidate, B2VectorContinuity eContinuity) in setContinuity() argument
2783 B2DPolygon aRetval(rCandidate); in setContinuity()
2785 for(sal_uInt32 a(0L); a < rCandidate.count(); a++) in setContinuity()
2793 …bool setContinuityInPoint(B2DPolygon& rCandidate, sal_uInt32 nIndex, B2VectorContinuity eContinuit… in setContinuityInPoint() argument
2795 …OSL_ENSURE(nIndex < rCandidate.count(), "setContinuityInPoint: Access to polygon out of range (!)"… in setContinuityInPoint()
2797 const sal_uInt32 nPointCount(rCandidate.count()); in setContinuityInPoint()
2801 const B2DPoint aCurrentPoint(rCandidate.getB2DPoint(nIndex)); in setContinuityInPoint()
2807 if(rCandidate.isPrevControlPointUsed(nIndex)) in setContinuityInPoint()
2809 if(!rCandidate.isClosed() && 0 == nIndex) in setContinuityInPoint()
2812 rCandidate.resetPrevControlPoint(nIndex); in setContinuityInPoint()
2817rCandidate.setPrevControlPoint(nIndex, interpolate(aCurrentPoint, rCandidate.getB2DPoint(nPrevInde… in setContinuityInPoint()
2823 if(rCandidate.isNextControlPointUsed(nIndex)) in setContinuityInPoint()
2825 if(!rCandidate.isClosed() && nIndex == nPointCount + 1) in setContinuityInPoint()
2828 rCandidate.resetNextControlPoint(nIndex); in setContinuityInPoint()
2833rCandidate.setNextControlPoint(nIndex, interpolate(aCurrentPoint, rCandidate.getB2DPoint(nNextInde… in setContinuityInPoint()
2843 if(rCandidate.isPrevControlPointUsed(nIndex) && rCandidate.isNextControlPointUsed(nIndex)) in setContinuityInPoint()
2846 B2DVector aVectorPrev(rCandidate.getPrevControlPoint(nIndex) - aCurrentPoint); in setContinuityInPoint()
2847 B2DVector aVectorNext(rCandidate.getNextControlPoint(nIndex) - aCurrentPoint); in setContinuityInPoint()
2862 …const double fLenPrevEdge(B2DVector(rCandidate.getB2DPoint(nPrevIndex) - aCurrentPoint).getLength(… in setContinuityInPoint()
2863 …const double fLenNextEdge(B2DVector(rCandidate.getB2DPoint(nNextIndex) - aCurrentPoint).getLength(… in setContinuityInPoint()
2865 rCandidate.setControlPoints(nIndex, in setContinuityInPoint()
2878 rCandidate.setControlPoints(nIndex, in setContinuityInPoint()
2884 rCandidate.setControlPoints(nIndex, in setContinuityInPoint()
2896 if(rCandidate.isPrevControlPointUsed(nIndex) && rCandidate.isNextControlPointUsed(nIndex)) in setContinuityInPoint()
2899 B2DVector aVectorPrev(rCandidate.getPrevControlPoint(nIndex) - aCurrentPoint); in setContinuityInPoint()
2900 B2DVector aVectorNext(rCandidate.getNextControlPoint(nIndex) - aCurrentPoint); in setContinuityInPoint()
2911 rCandidate.setControlPoints(nIndex, in setContinuityInPoint()
2923 rCandidate.setControlPoints(nIndex, in setContinuityInPoint()
2929 rCandidate.setControlPoints(nIndex, in setContinuityInPoint()
2945 B2DPolygon growInNormalDirection(const B2DPolygon& rCandidate, double fValue) in growInNormalDirection() argument
2949 if(rCandidate.areControlPointsUsed()) in growInNormalDirection()
2952 const B2DPolygon aCandidate(adaptiveSubdivideByAngle(rCandidate)); in growInNormalDirection()
2958 const sal_uInt32 nPointCount(rCandidate.count()); in growInNormalDirection()
2962 B2DPoint aPrev(rCandidate.getB2DPoint(nPointCount - 1L)); in growInNormalDirection()
2963 B2DPoint aCurrent(rCandidate.getB2DPoint(0L)); in growInNormalDirection()
2967 const B2DPoint aNext(rCandidate.getB2DPoint(a + 1L == nPointCount ? 0L : a + 1L)); in growInNormalDirection()
2984 aRetval.setClosed(rCandidate.isClosed()); in growInNormalDirection()
2991 return rCandidate; in growInNormalDirection()
2995 B2DPolygon reSegmentPolygon(const B2DPolygon& rCandidate, sal_uInt32 nSegments) in reSegmentPolygon() argument
2998 const sal_uInt32 nPointCount(rCandidate.count()); in reSegmentPolygon()
3003 const sal_uInt32 nSegmentCount(rCandidate.isClosed() ? nPointCount : nPointCount - 1L); in reSegmentPolygon()
3007 aRetval = rCandidate; in reSegmentPolygon()
3011 const double fLength(getLength(rCandidate)); in reSegmentPolygon()
3012 const sal_uInt32 nLoopCount(rCandidate.isClosed() ? nSegments : nSegments + 1L); in reSegmentPolygon()
3017 const B2DPoint aNewPoint(getPositionRelative(rCandidate, fRelativePos, fLength)); in reSegmentPolygon()
3022 aRetval.setClosed(rCandidate.isClosed()); in reSegmentPolygon()
3029 …B2DPolygon reSegmentPolygonEdges(const B2DPolygon& rCandidate, sal_uInt32 nSubEdges, bool bHandleC… in reSegmentPolygonEdges() argument
3031 const sal_uInt32 nPointCount(rCandidate.count()); in reSegmentPolygonEdges()
3039 return rCandidate; in reSegmentPolygonEdges()
3044 const sal_uInt32 nEdgeCount(rCandidate.isClosed() ? nPointCount : nPointCount - 1); in reSegmentPolygonEdges()
3048 aCurrentEdge.setStartPoint(rCandidate.getB2DPoint(0)); in reSegmentPolygonEdges()
3055 aCurrentEdge.setControlPointA(rCandidate.getNextControlPoint(a)); in reSegmentPolygonEdges()
3056 aCurrentEdge.setControlPointB(rCandidate.getPrevControlPoint(nNextIndex)); in reSegmentPolygonEdges()
3057 aCurrentEdge.setEndPoint(rCandidate.getB2DPoint(nNextIndex)); in reSegmentPolygonEdges()
3099 aRetval.setClosed(rCandidate.isClosed()); in reSegmentPolygonEdges()
3193 B2DPolygon createSimplifiedPolygon( const B2DPolygon& rCandidate ) in createSimplifiedPolygon() argument
3195 const sal_uInt32 nCount(rCandidate.count()); in createSimplifiedPolygon()
3197 if(nCount && rCandidate.areControlPointsUsed()) in createSimplifiedPolygon()
3199 const sal_uInt32 nEdgeCount(rCandidate.isClosed() ? nCount : nCount - 1); in createSimplifiedPolygon()
3203 aSegment.setStartPoint(rCandidate.getB2DPoint(0)); in createSimplifiedPolygon()
3210 aSegment.setControlPointA(rCandidate.getNextControlPoint(a)); in createSimplifiedPolygon()
3211 aSegment.setControlPointB(rCandidate.getPrevControlPoint(nNextIndex)); in createSimplifiedPolygon()
3212 aSegment.setEndPoint(rCandidate.getB2DPoint(nNextIndex)); in createSimplifiedPolygon()
3259 aRetval.setClosed(rCandidate.isClosed()); in createSimplifiedPolygon()
3266 return rCandidate; in createSimplifiedPolygon()
3271 B2DPolygon simplifyCurveSegments(const B2DPolygon& rCandidate) in simplifyCurveSegments() argument
3273 const sal_uInt32 nPointCount(rCandidate.count()); in simplifyCurveSegments()
3275 if(nPointCount && rCandidate.areControlPointsUsed()) in simplifyCurveSegments()
3278 const sal_uInt32 nEdgeCount(rCandidate.isClosed() ? nPointCount : nPointCount - 1); in simplifyCurveSegments()
3281 aBezier.setStartPoint(rCandidate.getB2DPoint(0)); in simplifyCurveSegments()
3293 aBezier.setEndPoint(rCandidate.getB2DPoint(nNextIndex)); in simplifyCurveSegments()
3294 aBezier.setControlPointA(rCandidate.getNextControlPoint(a)); in simplifyCurveSegments()
3295 aBezier.setControlPointB(rCandidate.getPrevControlPoint(nNextIndex)); in simplifyCurveSegments()
3314 if(rCandidate.isClosed()) in simplifyCurveSegments()
3324 return rCandidate; in simplifyCurveSegments()
3331 B2DPolygon makeStartPoint(const B2DPolygon& rCandidate, sal_uInt32 nIndexOfNewStatPoint) in makeStartPoint() argument
3333 const sal_uInt32 nPointCount(rCandidate.count()); in makeStartPoint()
3337 OSL_ENSURE(rCandidate.isClosed(), "makeStartPoint: only valid for closed polygons (!)"); in makeStartPoint()
3343 aRetval.append(rCandidate.getB2DPoint(nSourceIndex)); in makeStartPoint()
3345 if(rCandidate.areControlPointsUsed()) in makeStartPoint()
3347 aRetval.setPrevControlPoint(a, rCandidate.getPrevControlPoint(nSourceIndex)); in makeStartPoint()
3348 aRetval.setNextControlPoint(a, rCandidate.getNextControlPoint(nSourceIndex)); in makeStartPoint()
3355 return rCandidate; in makeStartPoint()
3358 …B2DPolygon createEdgesOfGivenLength(const B2DPolygon& rCandidate, double fLength, double fStart, d… in createEdgesOfGivenLength() argument
3385 …const B2DPolygon aCandidate(rCandidate.areControlPointsUsed() ? rCandidate.getDefaultAdaptiveSubdi… in createEdgesOfGivenLength()
3449 B2DPolygon createWaveline(const B2DPolygon& rCandidate, double fWaveWidth, double fWaveHeight) in createWaveline() argument
3477 const B2DPolygon aEqualLenghEdges(createEdgesOfGivenLength(rCandidate, fWaveWidth)); in createWaveline()
3508 aRetval = rCandidate; in createWaveline()
3571 B2DPolygon snapPointsOfHorizontalOrVerticalEdges(const B2DPolygon& rCandidate) in snapPointsOfHorizontalOrVerticalEdges() argument
3573 const sal_uInt32 nPointCount(rCandidate.count()); in snapPointsOfHorizontalOrVerticalEdges()
3579 B2DPolygon aRetval(rCandidate); in snapPointsOfHorizontalOrVerticalEdges()
3582 B2ITuple aPrevTuple(basegfx::fround(rCandidate.getB2DPoint(nPointCount - 1))); in snapPointsOfHorizontalOrVerticalEdges()
3583 B2DPoint aCurrPoint(rCandidate.getB2DPoint(0)); in snapPointsOfHorizontalOrVerticalEdges()
3593 const B2DPoint aNextPoint(rCandidate.getB2DPoint(nNextIndex)); in snapPointsOfHorizontalOrVerticalEdges()
3626 return rCandidate; in snapPointsOfHorizontalOrVerticalEdges()
3630 bool containsOnlyHorizontalAndVerticalEdges(const B2DPolygon& rCandidate) in containsOnlyHorizontalAndVerticalEdges() argument
3632 if(rCandidate.areControlPointsUsed()) in containsOnlyHorizontalAndVerticalEdges()
3637 const sal_uInt32 nPointCount(rCandidate.count()); in containsOnlyHorizontalAndVerticalEdges()
3644 const sal_uInt32 nEdgeCount(rCandidate.isClosed() ? nPointCount + 1 : nPointCount); in containsOnlyHorizontalAndVerticalEdges()
3645 basegfx::B2DPoint aLast(rCandidate.getB2DPoint(0)); in containsOnlyHorizontalAndVerticalEdges()
3650 const basegfx::B2DPoint aCurrent(rCandidate.getB2DPoint(nNextIndex)); in containsOnlyHorizontalAndVerticalEdges()
3663 B2DVector getTangentEnteringPoint(const B2DPolygon& rCandidate, sal_uInt32 nIndex) in getTangentEnteringPoint() argument
3666 const sal_uInt32 nCount(rCandidate.count()); in getTangentEnteringPoint()
3675 const bool bClosed(rCandidate.isClosed()); in getTangentEnteringPoint()
3691 rCandidate.getBezierSegment(nPrev, aSegment); in getTangentEnteringPoint()
3707 B2DVector getTangentLeavingPoint(const B2DPolygon& rCandidate, sal_uInt32 nIndex) in getTangentLeavingPoint() argument
3710 const sal_uInt32 nCount(rCandidate.count()); in getTangentLeavingPoint()
3719 const bool bClosed(rCandidate.isClosed()); in getTangentLeavingPoint()
3728 rCandidate.getBezierSegment(nCurrent, aSegment); in getTangentLeavingPoint()