summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorscuri <scuri>2010-11-05 13:46:08 +0000
committerscuri <scuri>2010-11-05 13:46:08 +0000
commit2f7f60ad6f6924a7644f8a37ea1c4081bb3f262f (patch)
tree593eb75895b60c9867608d60145d548106574efe
parent980577ca61624df13e92d06801c02f98b272b99b (diff)
*** empty log message ***
-rw-r--r--src/sim/sim_linepolyfill.c7
-rw-r--r--test/mf/poly6.mf14
2 files changed, 16 insertions, 5 deletions
diff --git a/src/sim/sim_linepolyfill.c b/src/sim/sim_linepolyfill.c
index fdd566b..d52503c 100644
--- a/src/sim/sim_linepolyfill.c
+++ b/src/sim/sim_linepolyfill.c
@@ -538,8 +538,8 @@ int simPolyFindHorizontalIntervals(simLineSegment *segments, int n_seg, int* xx,
i.e only save the intersection point for (y2) if not handled by (y1) of another segment.
The exception is the top-corner points (^). */
/* first find if p2 is connected to next or previous */
- if ((seg_i_next->Swap && seg_i_next->y2 == y && seg_i_next->x2 == seg_i->x2 && seg_i_next->y1 != y) ||
- (!seg_i_prev->Swap && seg_i_prev->y2 == y && seg_i_prev->x2 == seg_i->x2 && seg_i_prev->y1 != y))
+ if ((!seg_i->Swap && seg_i_next->Swap && seg_i_next->y2 == y && seg_i_next->x2 == seg_i->x2 && seg_i_next->y1 != y) ||
+ (seg_i->Swap && !seg_i_prev->Swap && seg_i_prev->y2 == y && seg_i_prev->x2 == seg_i->x2 && seg_i_prev->y1 != y))
{
xx[xx_count++] = seg_i->x2; /* save the intersection point */
}
@@ -616,9 +616,6 @@ void simPolyFill(cdSimulation* simulation, cdPoint* poly, int n)
/* for all horizontal lines between y_max and y_min */
for(y = y_max; y >= y_min; y--)
{
- if (y == 206)
- y=y;
-
xx_count = simPolyFindHorizontalIntervals(segments, n_seg, xx, hh, y, height);
if (xx_count < 2)
continue;
diff --git a/test/mf/poly6.mf b/test/mf/poly6.mf
new file mode 100644
index 0000000..3b099d6
--- /dev/null
+++ b/test/mf/poly6.mf
@@ -0,0 +1,14 @@
+CDMF 438 441
+27 255 255 255
+28 255 0 0
+9 0
+10 62 277
+10 111 206
+10 111 125
+10 246 125
+10 246 206
+10 246 125
+10 246 206
+10 318 206
+10 330 285
+11