Logo Search packages:      
Sourcecode: adesklets version File versions

void imlib_blend_image_onto_image ( Imlib_Image  source_image,
char  merge_alpha,
int  source_x,
int  source_y,
int  source_width,
int  source_height,
int  destination_x,
int  destination_y,
int  destination_width,
int  destination_height 
)

Parameters:
source_image The source image.
merge_alpha Alpha flag.
source_x X coordinate of the source image.
source_y Y coordinate of the source image.
source_width Width of the source image.
source_height Height of the source image.
destination_x X coordinate of the destination image.
destination_y Y coordinate of the destination image.
destination_width Width of the destination image.
destination_height Height of the destination image.
Blends the source rectangle (source_x, source_y, source_width, source_height) from source_image onto the current image at the destination (destination_x, destination_y) location scaled to the width destination_width and height destination_height. If merge_alpha is set to 1 it will also modify the destination image alpha channel, otherwise the destination alpha channel is left untouched.

Definition at line 2444 of file imlib2.c.

{
   ImlibImage         *im_src, *im_dst;
   int                 aa;

   if (!ctx)
      ctx = imlib_context_new();
   CHECK_PARAM_POINTER("imlib_blend_image_onto_image", "source_image",
                       source_image);
   CHECK_PARAM_POINTER("imlib_blend_image_onto_image", "image", ctx->image);
   CAST_IMAGE(im_src, source_image);
   CAST_IMAGE(im_dst, ctx->image);
   if ((!(im_src->data)) && (im_src->loader) && (im_src->loader->load))
      im_src->loader->load(im_src, NULL, 0, 1);
   if (!(im_src->data))
      return;
   if ((!(im_dst->data)) && (im_dst->loader) && (im_dst->loader->load))
      im_dst->loader->load(im_dst, NULL, 0, 1);
   if (!(im_dst->data))
      return;
   __imlib_DirtyImage(im_dst);
   /* FIXME: hack to get around infinite loops for scaling down too far */
   aa = ctx->anti_alias;
   if ((abs(destination_width) < (source_width >> 7))
       || (abs(destination_height) < (source_height >> 7)))
      aa = 0;
   __imlib_BlendImageToImage(im_src, im_dst, aa, ctx->blend,
                             merge_alpha, source_x, source_y, source_width,
                             source_height, destination_x, destination_y,
                             destination_width, destination_height,
                             ctx->color_modifier, ctx->operation,
                             ctx->cliprect.x, ctx->cliprect.y,
                             ctx->cliprect.w, ctx->cliprect.h);
}


Generated by  Doxygen 1.6.0   Back to index