forked from old/legacy-imlib2
fix a small segv problem with pollies! :)
SVN revision: 3583
This commit is contained in:
parent
72f81a4c4d
commit
0af7f642be
|
@ -2903,9 +2903,9 @@ imlib_image_fill_polygon(ImlibPolygon poly)
|
||||||
__imlib_DirtyImage(im);
|
__imlib_DirtyImage(im);
|
||||||
__imlib_DirtyPixmapsForImage(im);
|
__imlib_DirtyPixmapsForImage(im);
|
||||||
__imlib_draw_polygon_filled(im, poly, ctxt_cliprect.x,
|
__imlib_draw_polygon_filled(im, poly, ctxt_cliprect.x,
|
||||||
ctxt_cliprect.x + ctxt_cliprect.w,
|
ctxt_cliprect.x + ctxt_cliprect.w - 1,
|
||||||
ctxt_cliprect.y,
|
ctxt_cliprect.y,
|
||||||
ctxt_cliprect.y + ctxt_cliprect.h,
|
ctxt_cliprect.y + ctxt_cliprect.h - 1,
|
||||||
ctxt_color.red, ctxt_color.green,
|
ctxt_color.red, ctxt_color.green,
|
||||||
ctxt_color.blue, ctxt_color.alpha,
|
ctxt_color.blue, ctxt_color.alpha,
|
||||||
ctxt_operation, ctxt_anti_alias);
|
ctxt_operation, ctxt_anti_alias);
|
||||||
|
|
|
@ -2164,7 +2164,7 @@ __imlib_draw_polygon_filled(ImlibImage * im, ImlibPoly poly, int clip_xmin,
|
||||||
if (poly->pointcount < 3) return;
|
if (poly->pointcount < 3) return;
|
||||||
|
|
||||||
/* if no clip is set or clip is outside image, clip it to the image */
|
/* if no clip is set or clip is outside image, clip it to the image */
|
||||||
if (clip_xmin != clip_xmax)
|
if (clip_xmin < clip_xmax)
|
||||||
{
|
{
|
||||||
if (clip_xmax < 0) return;
|
if (clip_xmax < 0) return;
|
||||||
if (clip_xmin >= im->w) return;
|
if (clip_xmin >= im->w) return;
|
||||||
|
@ -2242,6 +2242,8 @@ __imlib_draw_polygon_filled(ImlibImage * im, ImlibPoly poly, int clip_xmin,
|
||||||
/* current point and next point - line connecting the 2 */
|
/* current point and next point - line connecting the 2 */
|
||||||
pt1 = ((j + top) % poly->pointcount);
|
pt1 = ((j + top) % poly->pointcount);
|
||||||
pt2 = ((j + top + 1) % poly->pointcount);
|
pt2 = ((j + top + 1) % poly->pointcount);
|
||||||
|
while (pt1 < 0) pt1 += poly->pointcount;
|
||||||
|
while (pt2 < 0) pt2 += poly->pointcount;
|
||||||
/* conveneince for 2 points */
|
/* conveneince for 2 points */
|
||||||
x1 = poly->points[pt1].x;
|
x1 = poly->points[pt1].x;
|
||||||
y1 = poly->points[pt1].y;
|
y1 = poly->points[pt1].y;
|
||||||
|
@ -2369,7 +2371,8 @@ __imlib_draw_polygon_filled(ImlibImage * im, ImlibPoly poly, int clip_xmin,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
span(im, i + clip_ymin, x1, x1, r, g, b, a, op);
|
if ((x1 <= clip_xmax) && (x1 >= clip_xmin))
|
||||||
|
span(im, i + clip_ymin, x1, x1, r, g, b, a, op);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue