Logo Search packages:      
Sourcecode: adesklets version File versions

Imlib_Updates imlib_image_draw_line ( int  x1,
int  y1,
int  x2,
int  y2,
char  make_updates 
)

Parameters:
x1 The x coordinate of the first point.
y1 The y coordinate of the first point.
x2 The x coordinate of the second point.
y2 The y coordinate of the second point.
make_updates,: a char.
Returns:
An updates list.
Draws a line using the current color on the current image from coordinates (x1, y1) to (x2, y2). If make_updates is 1 it will also return an update you can use for an updates list, otherwise it returns NULL.

Definition at line 4421 of file imlib2.c.

{
   ImlibImage         *im;
   DATA32              color;

   if (!ctx)
      ctx = imlib_context_new();
   CHECK_PARAM_POINTER_RETURN("imlib_image_draw_line", "image", ctx->image,
                              NULL);
   CAST_IMAGE(im, ctx->image);
   if ((!(im->data)) && (im->loader) && (im->loader->load))
      im->loader->load(im, NULL, 0, 1);
   if (!(im->data))
      return NULL;
   __imlib_DirtyImage(im);
   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;
   return  (Imlib_Updates) __imlib_Line_DrawToImage(x1, y1, x2, y2, color, im,
                                        ctx->cliprect.x, ctx->cliprect.y,
                                        ctx->cliprect.w, ctx->cliprect.h,
                                        ctx->operation, ctx->blend,
                                        ctx->anti_alias, make_updates);
}


Generated by  Doxygen 1.6.0   Back to index