diff options
author | hdu <duerr@sun.com> | 2009-10-22 11:39:42 +0200 |
---|---|---|
committer | hdu <duerr@sun.com> | 2009-10-22 11:39:42 +0200 |
commit | ab818b36b52e646b43e390d1b6c0140b91a92523 (patch) | |
tree | 73609a5e78c54d2ccb89a61cc4c1699f12ba4fb9 /basegfx/inc | |
parent | 350ea0397036814992d47c7b836ef6f5005c6e98 (diff) |
#i106127# perf: consecutive polygon segments always touch so costly decisions based only on the touch-criterion should be avoided for this case
Diffstat (limited to 'basegfx/inc')
-rw-r--r-- | basegfx/inc/basegfx/range/b1drange.hxx | 6 | ||||
-rw-r--r-- | basegfx/inc/basegfx/range/b2drange.hxx | 9 | ||||
-rw-r--r-- | basegfx/inc/basegfx/range/basicrange.hxx | 9 |
3 files changed, 21 insertions, 3 deletions
diff --git a/basegfx/inc/basegfx/range/b1drange.hxx b/basegfx/inc/basegfx/range/b1drange.hxx index efca06d92dfd..366431c3cd50 100644 --- a/basegfx/inc/basegfx/range/b1drange.hxx +++ b/basegfx/inc/basegfx/range/b1drange.hxx @@ -7,7 +7,6 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: b1drange.hxx,v $ - * $Revision: 1.15 $ * * This file is part of OpenOffice.org. * @@ -131,6 +130,11 @@ namespace basegfx return maRange.overlaps(rRange.maRange); } + bool overlapsMore(const B1DRange& rRange) const + { + return maRange.overlapsMore(rRange.maRange); + } + void expand(double fValue) { maRange.expand(fValue); diff --git a/basegfx/inc/basegfx/range/b2drange.hxx b/basegfx/inc/basegfx/range/b2drange.hxx index 66892865399f..8a70d4782f47 100644 --- a/basegfx/inc/basegfx/range/b2drange.hxx +++ b/basegfx/inc/basegfx/range/b2drange.hxx @@ -7,7 +7,6 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: b2drange.hxx,v $ - * $Revision: 1.19 $ * * This file is part of OpenOffice.org. * @@ -222,6 +221,14 @@ namespace basegfx ); } + bool overlapsMore(const B2DRange& rRange) const + { + return ( + maRangeX.overlapsMore(rRange.maRangeX) + && maRangeY.overlapsMore(rRange.maRangeY) + ); + } + void expand(const B2DTuple& rTuple) { maRangeX.expand(rTuple.getX()); diff --git a/basegfx/inc/basegfx/range/basicrange.hxx b/basegfx/inc/basegfx/range/basicrange.hxx index a7c402c905c8..59d13cf530c0 100644 --- a/basegfx/inc/basegfx/range/basicrange.hxx +++ b/basegfx/inc/basegfx/range/basicrange.hxx @@ -7,7 +7,6 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: basicrange.hxx,v $ - * $Revision: 1.15 $ * * This file is part of OpenOffice.org. * @@ -142,6 +141,14 @@ namespace basegfx } } + bool overlapsMore(const BasicRange& rRange) const + { + if(isEmpty() || rRange.isEmpty()) + return false; + // returns true if the overlap is more than just a touching at the limits + return ((rRange.mnMaximum > mnMinimum) && (rRange.mnMinimum < mnMaximum)); + } + bool operator==( const BasicRange& rRange ) const { return (mnMinimum == rRange.mnMinimum && mnMaximum == rRange.mnMaximum); |