forked from old/legacy-imlib2
Fix bug in ellipse drawing introduced who knows when by who knows who.
The ellipse code is total shit, but at least now it does what it is supposed to. Could someone with the ability do a release at some point? Lots of users have reported problems with bug. SVN revision: 6164
This commit is contained in:
parent
900e167c37
commit
b374d48ccc
|
@ -1963,7 +1963,7 @@ __imlib_fill_ellipse(ImlibImage * im, int xc, int yc, int aa, int bb,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* clip spans to image size */
|
/* clip spans to image size */
|
||||||
__spanlist_clip(table1, table2, &miny, &maxy, 0, im->w - 1, 0, im->h - 1);
|
__spanlist_clip(table1, table2, &miny, &maxy, 0, im->w, 0, im->h - 1);
|
||||||
|
|
||||||
/* clip to clip rect if it's there */
|
/* clip to clip rect if it's there */
|
||||||
if (clip)
|
if (clip)
|
||||||
|
@ -1983,7 +1983,8 @@ __imlib_fill_ellipse(ImlibImage * im, int xc, int yc, int aa, int bb,
|
||||||
free(table2);
|
free(table2);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (maxy >= im->h) maxy = im->h - 1;
|
if (maxy >= im->h)
|
||||||
|
maxy = im->h - 1;
|
||||||
{
|
{
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
@ -1996,6 +1997,7 @@ __imlib_fill_ellipse(ImlibImage * im, int xc, int yc, int aa, int bb,
|
||||||
if (x1 < clip_xmin) x1 = clip_xmin;
|
if (x1 < clip_xmin) x1 = clip_xmin;
|
||||||
if (x2 > clip_xmax) x2 = clip_xmax;
|
if (x2 > clip_xmax) x2 = clip_xmax;
|
||||||
}
|
}
|
||||||
|
if((x1 != x2) && (x1 < im->w))
|
||||||
span(im, miny, x1, x2, r, g, b, a, op);
|
span(im, miny, x1, x2, r, g, b, a, op);
|
||||||
miny++;
|
miny++;
|
||||||
}
|
}
|
||||||
|
@ -2421,9 +2423,10 @@ __spanlist_clip(edgeRec * table1, edgeRec * table2, int *sy, int *ey,
|
||||||
|
|
||||||
if (pt2->x < pt1->x)
|
if (pt2->x < pt1->x)
|
||||||
exchange(double, pt2->x, pt1->x);
|
exchange(double, pt2->x, pt1->x);
|
||||||
|
if(pt1->x < xmax) {
|
||||||
pt1->x = MAX(pt1->x, xmin);
|
pt1->x = MAX(pt1->x, xmin);
|
||||||
pt2->x = MIN(pt2->x, xmax);
|
pt2->x = MIN(pt2->x, xmax);
|
||||||
|
}
|
||||||
iy1++;
|
iy1++;
|
||||||
}
|
}
|
||||||
while (iy1 <= iy2);
|
while (iy1 <= iy2);
|
||||||
|
|
Loading…
Reference in New Issue