Logo Search packages:      
Sourcecode: adesklets version File versions

void imlib_image_draw_polygon ( ImlibPolygon  poly,
unsigned char  closed 

poly A polygon.
closed Closed polygon flag.
Draws the polygon poly onto the current context image. Points which have been added to the polygon are drawn in sequence, first to last. The final point will be joined with the first point if closed is non-zero.

Definition at line 5737 of file imlib2.c.

   ImlibImage         *im;
   DATA32              color;

   if (!ctx)
      ctx = imlib_context_new();
   CHECK_PARAM_POINTER("imlib_image_draw_polygon", "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))
   A_VAL(&color) = (DATA8) ctx->color.alpha;
   R_VAL(&color) = (DATA8) ctx->color.red;
   G_VAL(&color) = (DATA8) ctx->color.green;
   B_VAL(&color) = (DATA8) ctx->color.blue;
   __imlib_Polygon_DrawToImage((ImlibPoly) poly, closed, color,
                        im, ctx->cliprect.x, ctx->cliprect.y,
                        ctx->cliprect.w, ctx->cliprect.h,
                        ctx->operation, ctx->blend, ctx->anti_alias);

Generated by  Doxygen 1.6.0   Back to index