summaryrefslogtreecommitdiff
path: root/basegfx
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2014-06-23 17:11:30 +0200
committerCaolán McNamara <caolanm@redhat.com>2014-06-24 15:33:55 +0000
commit9b10e4065bfa5288d212501317cd612835b31d67 (patch)
treec92a442b37ded49229ca8d37dddfdbe225ebe5a5 /basegfx
parentead8309b638b138d5ebb4a5bac36871479cacaab (diff)
fdo#79615 create clipping polygon correctly
Change-Id: I758b6bc8da33a20a0807da171120a8f84214dcfd (cherry picked from commit 8fae55c7d3fead6ce18556d5ccaa0958b7cfed91) Reviewed-on: https://gerrit.libreoffice.org/9864 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'basegfx')
-rw-r--r--basegfx/source/polygon/b2dpolygoncutandtouch.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
index 37fa50cd8b63..927af8828c91 100644
--- a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
+++ b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
@@ -247,7 +247,7 @@ namespace basegfx
const double fOne(1.0);
fCut = (aVecB.getY() * (rCurrB.getX() - rCurrA.getX()) + aVecB.getX() * (rCurrA.getY() - rCurrB.getY())) / fCut;
- if(fTools::more(fCut, fZero) && fTools::less(fCut, fOne))
+ if(fTools::moreOrEqual(fCut, fZero) && fTools::lessOrEqual(fCut, fOne))
{
// it's a candidate, but also need to test parameter value of cut on line 2
double fCut2;
@@ -262,7 +262,7 @@ namespace basegfx
fCut2 = (rCurrA.getY() + (fCut * aVecA.getY()) - rCurrB.getY()) / aVecB.getY();
}
- if(fTools::more(fCut2, fZero) && fTools::less(fCut2, fOne))
+ if(fTools::moreOrEqual(fCut2, fZero) && fTools::lessOrEqual(fCut2, fOne))
{
// cut is in range, add point. Two edges can have only one cut, but
// add a cut point to each list. The lists may be the same for