From d3e74ae8a58032e64a8ff840dbda89b5d2b9efd3 Mon Sep 17 00:00:00 2001 From: florian Date: Fri, 12 Jun 2009 14:50:57 +0000 Subject: * another fix to PolyFill by borsa77 git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@13263 3ad0048d-3df7-0310-abae-a5850022a9f2 --- packages/graph/src/inc/fills.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'packages/graph') diff --git a/packages/graph/src/inc/fills.inc b/packages/graph/src/inc/fills.inc index 585fe6db69..3c672b8e74 100644 --- a/packages/graph/src/inc/fills.inc +++ b/packages/graph/src/inc/fills.inc @@ -78,9 +78,11 @@ begin p0 := ptable[i]; if (i+1) >= numpoints then p1 := ptable[0] else p1 := ptable[i+1]; + { draw the edges } + Line(p0.x,p0.y,p1.x,p1.y); { ignore if this is a horizontal edge} if (p0.y = p1.y) then continue; - {swap ptable if necessary to ensure p0 contains yMin} + { swap ptable if necessary to ensure p0 contains yMin} if (p0.y > p1.y) then begin p0 := p1; p1 := ptable[i]; @@ -169,7 +171,7 @@ begin x0 := AET^[i]^.x; x1 := AET^[i+1]^.x; {Left edge adjustment for positive fraction. 0 is interior. } - if (AET^[i]^.frac > 0) then inc(x0); + if (AET^[i]^.frac >= 0) then inc(x0); {Right edge adjustment for negative fraction. 0 is exterior. } if (AET^[i+1]^.frac <= 0) then dec(x1); -- cgit v1.2.1