diff options
author | lecoanet | 2003-05-16 14:08:15 +0000 |
---|---|---|
committer | lecoanet | 2003-05-16 14:08:15 +0000 |
commit | e992bd105cc0bd5fa457e59d15e73a9f3045cd1d (patch) | |
tree | a9137bd496dfc32ba16b35604951da7e4afd0484 | |
parent | 8843b3ffc7f73398cf9dbbad3fc304a489fa5f4c (diff) | |
download | tkzinc-e992bd105cc0bd5fa457e59d15e73a9f3045cd1d.zip tkzinc-e992bd105cc0bd5fa457e59d15e73a9f3045cd1d.tar.gz tkzinc-e992bd105cc0bd5fa457e59d15e73a9f3045cd1d.tar.bz2 tkzinc-e992bd105cc0bd5fa457e59d15e73a9f3045cd1d.tar.xz |
* (ZnCompute...Gradient): Stopped trying to be clever about
which contour should contribute to the gradient extent.
All contours are considered regardless of their direction.
This fix a bug on many curve whose first (main contour) is
described clockwise.
-rw-r--r-- | generic/Draw.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/generic/Draw.c b/generic/Draw.c index 9405546..ac59317 100644 --- a/generic/Draw.c +++ b/generic/Draw.c @@ -1444,9 +1444,6 @@ ZnComputeAxialGradient(ZnWInfo *wi, c = shape->contours; ZnResetBBox(&bbox); for (i = 0; i < shape->num_contours; i++, c++) { - if (c->cw && (shape->num_contours > 1)) { - continue; - } ZnListAssertSize(wi->work_pts, c->num_points); points = ZnListArray(wi->work_pts); ZnTransformPoints(transfo1, c->points, points, c->num_points); @@ -1491,9 +1488,6 @@ ZnComputeRadialGradient(ZnWInfo *wi, c = shape->contours; dist = 0.0; for (j = 0; j < shape->num_contours; j++, c++) { - if (c->cw && (shape->num_contours > 1)) { - continue; - } ZnAddPointsToBBox(&bbox, c->points, c->num_points); } @@ -1548,9 +1542,6 @@ ZnComputeRadialGradient(ZnWInfo *wi, */ c = shape->contours; for (j = 0; j < shape->num_contours; j++, c++) { - if (c->cw && (shape->num_contours > 1)) { - continue; - } for (i = 0, points = c->points; i < c->num_points; i++, points++) { x = points->x - focal_point.x; y = points->y - focal_point.y; @@ -1597,9 +1588,6 @@ ZnComputePathGradient(ZnWInfo *wi, ZnResetBBox(&bbox); c = shape->contours; for (j = 0; j < shape->num_contours; j++, c++) { - if (c->cw && (shape->num_contours > 1)) { - continue; - } ZnAddPointsToBBox(&bbox, c->points, c->num_points); } @@ -1799,9 +1787,9 @@ ZnRenderGradient(ZnWInfo *wi, ZnReal position; for (k = 0; k < poly->num_contours; k++) { - if (poly->contours[k].cw) { + /* if (poly->contours[k].cw) { continue; - } + }*/ points = poly->contours[k].points; num_p = poly->contours[k].num_points; |