diff options
author | hdu <duerr@sun.com> | 2009-10-21 15:43:13 +0200 |
---|---|---|
committer | hdu <duerr@sun.com> | 2009-10-21 15:43:13 +0200 |
commit | c94382c18059ecf000d1becbffa5425812dcc3f6 (patch) | |
tree | 3a2ab2f0d0b3263f4c58c446be2731165a5066fb /basegfx | |
parent | b40fbbe280b3636369521479f8e3438aefcd544d (diff) |
#i106127# perf: make self-intersection-test of bezier curve much cheaper
Diffstat (limited to 'basegfx')
-rw-r--r-- | basegfx/source/polygon/b2dpolygoncutandtouch.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx index 26016942717d..9d40acc0dcab 100644 --- a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx +++ b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx @@ -497,6 +497,11 @@ namespace basegfx const B2DCubicBezier& rCubicA, sal_uInt32 nInd, temporaryPointVector& rTempPoints) { + double fDummy; + const bool bHasAnyExtremum = rCubicA.getMinimumExtremumPosition( fDummy ); + if( !bHasAnyExtremum ) + return; + // find all self-intersections on the given bezier segment. Add an entry to the tempPoints // for each self intersection point with the cut value describing the relative position on given // bezier segment. |