Logo Search packages:      
Sourcecode: adesklets version File versions

void imlib_blend_image_onto_image_skewed ( 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  h_angle_x,
int  h_angle_y,
int  v_angle_x,
int  v_angle_y 
)

Parameters:
source_image The source image.
merge_alpha A char
source_x The source x coordinate.
source_y The source y coordinate.
source_width The source width.
source_height The source height.
destination_x The destination x coordinate.
destination_y The destination y coordinate.
h_angle_x An angle.
h_angle_y An angle.
v_angle_x An angle.
v_angle_y An angle.
Blends the source rectangle (source_x, source_y, source_width, source_height) from the source_image onto the current image at the destination (destination_x, destination_y) location. It will be rotated and scaled so that the upper right corner will be positioned h_angle_x pixels to the right (or left, if negative) and h_angle_y pixels down (from (destination_x, destination_y). If v_angle_x and v_angle_y are not 0, the image will also be skewed so that the lower left corner will be positioned v_angle_x pixels to the right and v_angle_y pixels down. The at_angle versions simply have the v_angle_x and v_angle_y set to 0 so the rotation doesn't get skewed, and the render_..._on_drawable ones seem obvious enough; they do the same on a drawable.

Example:

 imlib_blend_image_onto_image_skewed(..., 0, 0, 100, 0, 0, 100);
will simply scale the image to be 100x100.
 imlib_blend_image_onto_image_skewed(..., 0, 0, 0, 100, 100, 0);
will scale the image to be 100x100, and flip it diagonally.
 imlib_blend_image_onto_image_skewed(..., 100, 0, 0, 100, -100, 0);
will scale the image and rotate it 90 degrees clockwise.
 imlib_blend_image_onto_image_skewed(..., 50, 0, 50, 50, -50, 50);
will rotate the image 45 degrees clockwise, and will scale it so its corners are at (50,0)-(100,50)-(50,100)-(0,50) i.e. it fits into the 100x100 square, so it's scaled down to 70.7% (sqrt(2)/2).
 imlib_blend_image_onto_image_skewed(..., 50, 50, 100 * cos(a), 100 * sin(a), 0);
will rotate the image `a' degrees, with its upper left corner at (50,50).

Definition at line 5396 of file imlib2.c.

{
   ImlibImage         *im_src, *im_dst;

   if (!ctx)
      ctx = imlib_context_new();
   CHECK_PARAM_POINTER("imlib_blend_image_onto_image_skewed", "source_image",
                       source_image);
   CHECK_PARAM_POINTER("imlib_blend_image_onto_image_skewed", "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);
   __imlib_BlendImageToImageSkewed(im_src, im_dst, ctx->anti_alias,
                                   ctx->blend, merge_alpha, source_x,
                                   source_y, source_width, source_height,
                                   destination_x, destination_y, h_angle_x,
                                   h_angle_y, v_angle_x, v_angle_y,
                                   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