forked from old/legacy-imlib2
parent
62ceffab44
commit
05d0572575
|
@ -465,6 +465,8 @@ extern "C"
|
||||||
|
|
||||||
void imlib_apply_filter(char *script, ...);
|
void imlib_apply_filter(char *script, ...);
|
||||||
|
|
||||||
|
void imlib_clear_image(void);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
17
src/api.c
17
src/api.c
|
@ -4253,3 +4253,20 @@ imlib_polygon_contains_point(ImlibPolygon poly, int x, int y)
|
||||||
0);
|
0);
|
||||||
return __imlib_polygon_contains_point(poly, x, y);
|
return __imlib_polygon_contains_point(poly, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
imlib_clear_image(void)
|
||||||
|
{
|
||||||
|
ImlibImage *im;
|
||||||
|
|
||||||
|
if (!ctx) ctx = imlib_context_new();
|
||||||
|
CHECK_PARAM_POINTER("imlib_fill_ellipse", "image", ctx->image);
|
||||||
|
CAST_IMAGE(im, ctx->image);
|
||||||
|
if ((!(im->data)) && (im->loader) && (im->loader->load))
|
||||||
|
im->loader->load(im, NULL, 0, 1);
|
||||||
|
if (!(im->data))
|
||||||
|
return;
|
||||||
|
__imlib_DirtyImage(im);
|
||||||
|
__imlib_DirtyPixmapsForImage(im);
|
||||||
|
memset(im->data, 0, im->w * im->h * sizeof(DATA32));
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue