This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository legacy-imlib2.

View the commit online.

commit dafd7eb33dd6397a23d47067371c0e9688f43ed2
Author: Kim Woelders <k...@woelders.dk>
AuthorDate: Fri Jan 13 13:09:33 2023 +0100

    api: Change some parameter names
    
    - Shorten some names - mostly to avoid some line wrapping
      source_...      -> src_...
      destination_... -> dst_...
    
    - Change some parameter names for consistency/clarity
      Change (x, y, width, height) to (src_x, src_y, src_width, src_height)
      or (dst_x, dst_y, dst_width, dst_height) a couple of places.
---
 src/lib/Imlib2.h.in | 344 ++++++++++++++++++++++++++--------------------------
 src/lib/api.c       | 108 ++++++++---------
 src/lib/api_x11.c   | 139 +++++++++++----------
 3 files changed, 289 insertions(+), 302 deletions(-)

diff --git a/src/lib/Imlib2.h.in b/src/lib/Imlib2.h.in
index 08e52c9..b56e192 100644
--- a/src/lib/Imlib2.h.in
+++ b/src/lib/Imlib2.h.in
@@ -1141,27 +1141,28 @@ EAPI void           imlib_render_image_on_drawable_at_size(int x, int y,
 /**
  * Render part of image onto drawable at given size
  *
- * Renders the source (@p source_x, @p source_y, @p source_width, @p source_height)
+ * Renders the source (@p src_x, @p src_y, @p src_width, @p src_height)
  * pixel rectangle from the current image onto the current drawable at the
- * (@p x, @p y) location scaled to the width @p width and height @p height.
- *
- * @param source_x      X coordinate of the source image
- * @param source_y      Y coordinate of the source image
- * @param source_width  Width of the source image
- * @param source_height Height of the source image
- * @param x             X coordinate of the destination image
- * @param y             Y coordinate of the destination image
- * @param width         Width of the destination image
- * @param height        Height of the destination image
- */
-EAPI void           imlib_render_image_part_on_drawable_at_size(int source_x,
-                                                                int source_y,
-                                                                int
-                                                                source_width, int
-                                                                source_height,
-                                                                int x, int y,
-                                                                int width,
-                                                                int height);
+ * (@p dst_x, @p dst_y) location scaled to the width @p dst_width and
+ * height @p dst_height.
+ *
+ * @param src_x         X coordinate of the source image
+ * @param src_y         Y coordinate of the source image
+ * @param src_width     Width of the source image
+ * @param src_height    Height of the source image
+ * @param dst_x         X coordinate of the destination image
+ * @param dst_y         Y coordinate of the destination image
+ * @param dst_width     Width of the destination image
+ * @param dst_height    Height of the destination image
+ */
+EAPI void           imlib_render_image_part_on_drawable_at_size(int src_x,
+                                                                int src_y,
+                                                                int src_width,
+                                                                int src_height,
+                                                                int dst_x,
+                                                                int dst_y,
+                                                                int dst_width,
+                                                                int dst_height);
 
 /**
  * Return X11 pixel value of current color
@@ -1173,33 +1174,29 @@ EAPI uint32_t       imlib_render_get_pixel_color(void);
 /**
  * Blend part of image onto image
  *
- * Blends the source rectangle (@p source_x, @p source_y,
- * @p source_width, @p source_height) from @p source_image onto the current
- * image at the destination (@p destination_x, @p destination_y) location
- * scaled to the width @p destination_width and height @p * destination_height.
+ * Blends the source rectangle (@p src_x, @p src_y, @p src_width, @p src_height)
+ * from @p src_image onto the current image at the destination (@p dst_x, @p dst_y)
+ * location scaled to the width @p dst_width and height @p * dst_height.
  * If @p merge_alpha is set to 1 it will also modify the destination image
  * alpha channel, otherwise the destination alpha channel is left untouched.
  *
- * @param source_image  The source image
+ * @param src_image     The source image
  * @param merge_alpha   Alpha flag
- * @param source_x      X coordinate of the source image
- * @param source_y      Y coordinate of the source image
- * @param source_width  Width of the source image
- * @param source_height Height of the source image
- * @param destination_x X coordinate of the destination image
- * @param destination_y Y coordinate of the destination image
- * @param destination_width  Width of the destination image
- * @param destination_height Height of the destination image
- */
-EAPI void           imlib_blend_image_onto_image(Imlib_Image source_image,
+ * @param src_x         X coordinate of the source image
+ * @param src_y         Y coordinate of the source image
+ * @param src_width     Width of the source image
+ * @param src_height    Height of the source image
+ * @param dst_x         X coordinate of the destination image
+ * @param dst_y         Y coordinate of the destination image
+ * @param dst_width     Width of the destination image
+ * @param dst_height    Height of the destination image
+ */
+EAPI void           imlib_blend_image_onto_image(Imlib_Image src_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);
+                                                 int src_x, int src_y,
+                                                 int src_width, int src_height,
+                                                 int dst_x, int dst_y,
+                                                 int dst_width, int dst_height);
 
 /*--------------------------------
  * Image creation functions
@@ -1249,24 +1246,23 @@ EAPI Imlib_Image    imlib_create_cropped_image(int x, int y, int width,
  * Create cropped and scaled image
  *
  * Works the same as imlib_create_cropped_image() but will scale the
- * new image to the new destination @p destination_width and
- * @p destination_height whilst cropping.
+ * new image to the new destination @p dst_width and @p dst_height
+ * whilst cropping.
  *
- * @param source_x      The top left x coordinate of the source rectangle
- * @param source_y      The top left y coordinate of the source rectangle
- * @param source_width  The width of the source rectangle
- * @param source_height The height of the source rectangle
- * @param destination_width The width of the destination image
- * @param destination_height The height of the destination image
+ * @param src_x         The top left x coordinate of the source rectangle
+ * @param src_y         The top left y coordinate of the source rectangle
+ * @param src_width     The width of the source rectangle
+ * @param src_height    The height of the source rectangle
+ * @param dst_width     The width of the destination image
+ * @param dst_height    The height of the destination image
  *
  * @return Image handle (NULL on failure)
  */
-EAPI Imlib_Image    imlib_create_cropped_scaled_image(int source_x,
-                                                      int source_y,
-                                                      int source_width,
-                                                      int source_height,
-                                                      int destination_width,
-                                                      int destination_height);
+EAPI Imlib_Image    imlib_create_cropped_scaled_image(int src_x, int src_y,
+                                                      int src_width,
+                                                      int src_height,
+                                                      int dst_width,
+                                                      int dst_height);
 
 /**
  * Create a new image using given pixel data
@@ -1383,36 +1379,35 @@ EAPI Imlib_Image    imlib_create_image_from_ximage(XImage * image,
  * @p mask pixmap specified to determine alpha transparency) and scale
  * the grabbed data first before converting to an actual image (to
  * minimize reads from the frame buffer which can be slow).
- * The source (@p source_x, @p source_y, @p source_width, @p source_height)
- * rectangle will be grabbed, scaled to the destination @p destination_width
- * and @p destination_height, then converted to an image.
+ * The source (@p src_x, @p src_y, @p src_width, @p src_height)
+ * rectangle will be grabbed, scaled to the destination @p dst_width
+ * and @p dst_height, then converted to an image.
  * If @p need_to_grab_x is 1 the X Server s grabbed to avoid possible
  * race conditions. Set to 1 unless the server is already grabbed.
  * If @p get_mask_from_shape and the current drawable is a window its shape
  * is used for determining the alpha channel.
  *
  * @param mask          A mask
- * @param source_x      The top left x coordinate of the rectangle
- * @param source_y      The top left y coordinate of the rectangle
- * @param source_width  The width of the rectangle
- * @param source_height The height of the rectangle
- * @param destination_width The width of the returned image
- * @param destination_height The height of the returned image
+ * @param src_x         The top left x coordinate of the rectangle
+ * @param src_y         The top left y coordinate of the rectangle
+ * @param src_width     The width of the rectangle
+ * @param src_height    The height of the rectangle
+ * @param dst_width     The width of the returned image
+ * @param dst_height    The height of the returned image
  * @param need_to_grab_x Grab flag
  * @param get_mask_from_shape A char
  *
  * @return Image handle (NULL on failure)
  */
 EAPI Imlib_Image    imlib_create_scaled_image_from_drawable(Pixmap mask,
-                                                            int source_x,
-                                                            int source_y,
-                                                            int source_width,
-                                                            int
-                                                            source_height, int
-                                                            destination_width, int
-                                                            destination_height, char
-                                                            need_to_grab_x, char
-                                                            get_mask_from_shape);
+                                                            int src_x,
+                                                            int src_y,
+                                                            int src_width,
+                                                            int src_height,
+                                                            int dst_width,
+                                                            int dst_height,
+                                                            char need_to_grab_x,
+                                                            char get_mask_from_shape);
 
 /**
  * Copy part of drawable to image
@@ -1421,27 +1416,27 @@ EAPI Imlib_Image    imlib_create_scaled_image_from_drawable(Pixmap mask,
  * provided as a corresponding mask for that drawable - if @p mask is 0
  * this is not used).
  * If @p mask is 1 the mask will be set to the shape mask of the drawable.
- * It grabs the (@p x, @p y, @p width, @p height) rectangle and places it at
- * the destination (@p destination_x, @p destination_y) location in the current
- * image.
+ * It grabs the (@p src_x, @p src_y, @p src_width, @p src_height) rectangle
+ * and places it at the destination (@p dst_x, @p dst_y) location in the
+ * current image.
  * If @p need_to_grab_x is 1 the X Server s grabbed to avoid possible
  * race conditions. Set to 1 unless the server is already grabbed.
  *
  * @param mask          A mask
- * @param x             The top left x coordinate of the rectangle
- * @param y             The top left y coordinate of the rectangle
- * @param width         The width of the rectangle
- * @param height        The height of the rectangle
- * @param destination_x The x coordinate of the new location
- * @param destination_y The x coordinate of the new location
+ * @param src_x         The top left x coordinate of the rectangle
+ * @param src_y         The top left y coordinate of the rectangle
+ * @param src_width     The width of the rectangle
+ * @param src_height    The height of the rectangle
+ * @param dst_x         The x coordinate of the new location
+ * @param dst_y         The x coordinate of the new location
  * @param need_to_grab_x Grab flag
  *
  * @return 1 on success, 0 otherwise
  */
-EAPI char           imlib_copy_drawable_to_image(Pixmap mask, int x, int y,
-                                                 int width, int height,
-                                                 int destination_x,
-                                                 int destination_y,
+EAPI char           imlib_copy_drawable_to_image(Pixmap mask,
+                                                 int src_x, int src_y,
+                                                 int src_width, int src_height,
+                                                 int dst_x, int dst_y,
                                                  char need_to_grab_x);
 
 /**
@@ -1748,26 +1743,27 @@ EAPI void           imlib_image_copy_alpha_to_image(Imlib_Image image_source,
 /**
  * Copy partial image alpha
  *
- * Copies the source (@p x, @p y, @p width, @p height) rectangle alpha channel from
- * the source image @p image_source and replaces the alpha channel on the destination
- * image at the (@p destination_x, @p destination_y) coordinates.
+ * Copies the source (@p src_x, @p src_y, @p src_width, @p src_height) rectangle
+ * alpha channel from the source image @p image_source and replaces the
+ * alpha channel on the destination image at the (@p dst_x, @p dst_y)
+ * coordinates.
  *
  * @param image_source  An image
- * @param x             The top left x coordinate of the rectangle
- * @param y             The top left y coordinate of the rectangle
- * @param width         The width of the rectangle
- * @param height        The height of the rectangle
- * @param destination_x The top left x coordinate of the destination rectangle
- * @param destination_y The top left x coordinate of the destination rectangle
+ * @param src_x         The top left x coordinate of the rectangle
+ * @param src_y         The top left y coordinate of the rectangle
+ * @param src_width     The width of the rectangle
+ * @param src_height    The height of the rectangle
+ * @param dst_x         The top left x coordinate of the destination rectangle
+ * @param dst_y         The top left x coordinate of the destination rectangle
  */
 EAPI void           imlib_image_copy_alpha_rectangle_to_image(Imlib_Image
                                                               image_source,
-                                                              int x, int y,
-                                                              int width,
-                                                              int height,
-                                                              int destination_x,
-                                                              int
-                                                              destination_y);
+                                                              int src_x,
+                                                              int src_y,
+                                                              int src_width,
+                                                              int src_height,
+                                                              int dst_x,
+                                                              int dst_y);
 
 /**
  * Scroll image
@@ -1897,9 +1893,9 @@ EAPI void           imlib_text_draw(int x, int y, const char *text);
 EAPI void           imlib_text_draw_with_return_metrics(int x, int y,
                                                         const char *text,
                                                         int *width_return,
-                                                        int *height_return, int
-                                                        *horizontal_advance_return, int
-                                                        *vertical_advance_return);
+                                                        int *height_return,
+                                                        int *horizontal_advance_return,
+                                                        int *vertical_advance_return);
 
 /**
  * Get text size
@@ -2597,13 +2593,13 @@ EAPI Imlib_Image    imlib_create_rotated_image(double angle);
 /**
  * Rotate image onto image
  *
- * Rotate @ source_image onto current image.
+ * Rotate @ src_image onto current image.
  *
- * @param source_image  The source image
+ * @param src_image     The source image
  * @param angle         An angle in radians
  */
 EAPI void           imlib_rotate_image_from_buffer(double angle,
-                                                   Imlib_Image source_image);
+                                                   Imlib_Image src_image);
 
 /**
  * Blend image onto image at angle
@@ -2611,45 +2607,43 @@ EAPI void           imlib_rotate_image_from_buffer(double angle,
  * Works just like imlib_blend_image_onto_image_skewed() except you
  * cannot skew an image (@p v_angle_x and @p v_angle_y are 0).
  *
- * @param source_image  The image source
+ * @param src_image     The image source
  * @param merge_alpha   A char
- * @param source_x      The source x coordinate
- * @param source_y      The source y coordinate
- * @param source_width  The source width
- * @param source_height The source height
- * @param destination_x The destination x coordinate
- * @param destination_y The destination y coordinate
+ * @param src_x         The source x coordinate
+ * @param src_y         The source y coordinate
+ * @param src_width     The source width
+ * @param src_height    The source height
+ * @param dst_x         The destination x coordinate
+ * @param dst_y         The destination y coordinate
  * @param angle_x       An angle
  * @param angle_y       An angle
  */
 EAPI void           imlib_blend_image_onto_image_at_angle(Imlib_Image
-                                                          source_image,
+                                                          src_image,
                                                           char merge_alpha,
-                                                          int source_x,
-                                                          int source_y,
-                                                          int source_width,
-                                                          int source_height,
-                                                          int destination_x,
-                                                          int destination_y,
+                                                          int src_x,
+                                                          int src_y,
+                                                          int src_width,
+                                                          int src_height,
+                                                          int dst_x,
+                                                          int dst_y,
                                                           int angle_x,
                                                           int angle_y);
 
 /**
  * Blend image onto image at angle, skewed
  *
- * Blends the source rectangle (@p source_x, @p source_y, @p source_width,
- * @p source_height) from the
- * @p source_image onto the current image at the destination
- * (@p destination_x, @p destination_y)
- * location. It will be rotated and scaled so that the upper right
- * corner will be positioned @p h_angle_x pixels to the right (or left,
- * if negative) and @p h_angle_y pixels down (from (@p destination_x,
- * @p destination_y). If
- * @p v_angle_x and @p v_angle_y are not 0, the image will also be skewed so
- * that the lower left corner will be positioned @p v_angle_x pixels to
- * the right and @p v_angle_y pixels down. The at_angle versions simply
- * have the @p v_angle_x and @p v_angle_y set to 0 so the rotation doesn't
- * get skewed, and the render_..._on_drawable ones seem obvious
+ * Blends the source rectangle (@p src_x, @p src_y, @p src_width, * @p src_height)
+ * from the @p src_image onto the current image at the destination
+ * (@p dst_x, @p dst_y) location.
+ * It will be rotated and scaled so that the upper right corner will be
+ * positioned @p h_angle_x pixels to the right (or left, if negative) and
+ * @p h_angle_y pixels down (from (@p dst_x, @p dst_y).
+ * If @p v_angle_x and @p v_angle_y are not 0, the image will also be
+ * skewed so that the lower left corner will be positioned @p v_angle_x
+ * pixels to the right and @p v_angle_y pixels down. The at_angle versions
+ * simply have the @p v_angle_x and @p 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:
@@ -2676,28 +2670,28 @@ EAPI void           imlib_blend_image_onto_image_at_angle(Imlib_Image
  * @endcode
  * will rotate the image `a' degrees, with its upper left corner at (50,50).
  *
- * @param source_image  The source image
+ * @param src_image     The source image
  * @param merge_alpha   A char
- * @param source_x      The source x coordinate
- * @param source_y      The source y coordinate
- * @param source_width  The source width
- * @param source_height The source height
- * @param destination_x The destination x coordinate
- * @param destination_y The destination y coordinate
+ * @param src_x         The source x coordinate
+ * @param src_y         The source y coordinate
+ * @param src_width     The source width
+ * @param src_height    The source height
+ * @param dst_x         The destination x coordinate
+ * @param dst_y         The destination y coordinate
  * @param h_angle_x     An angle
  * @param h_angle_y     An angle
  * @param v_angle_x     An angle
  * @param v_angle_y     An angle
  */
 EAPI void           imlib_blend_image_onto_image_skewed(Imlib_Image
-                                                        source_image,
+                                                        src_image,
                                                         char merge_alpha,
-                                                        int source_x,
-                                                        int source_y,
-                                                        int source_width,
-                                                        int source_height,
-                                                        int destination_x,
-                                                        int destination_y,
+                                                        int src_x,
+                                                        int src_y,
+                                                        int src_width,
+                                                        int src_height,
+                                                        int dst_x,
+                                                        int dst_y,
                                                         int h_angle_x,
                                                         int h_angle_y,
                                                         int v_angle_x,
@@ -2711,23 +2705,23 @@ EAPI void           imlib_blend_image_onto_image_skewed(Imlib_Image
  * blends the image onto the current drawable instead of the current
  * image.
  *
- * @param source_x      The source x coordinate
- * @param source_y      The source y coordinate
- * @param source_width  The source width
- * @param source_height The source height
- * @param destination_x The destination x coordinate
- * @param destination_y The destination y coordinate
+ * @param src_x         The source x coordinate
+ * @param src_y         The source y coordinate
+ * @param src_width     The source width
+ * @param src_height    The source height
+ * @param dst_x         The destination x coordinate
+ * @param dst_y         The destination y coordinate
  * @param h_angle_x     An angle
  * @param h_angle_y     An angle
  * @param v_angle_x     An angle
  * @param v_angle_y     An angle
  */
-EAPI void           imlib_render_image_on_drawable_skewed(int source_x,
-                                                          int source_y,
-                                                          int source_width,
-                                                          int source_height,
-                                                          int destination_x,
-                                                          int destination_y,
+EAPI void           imlib_render_image_on_drawable_skewed(int src_x,
+                                                          int src_y,
+                                                          int src_width,
+                                                          int src_height,
+                                                          int dst_x,
+                                                          int dst_y,
                                                           int h_angle_x,
                                                           int h_angle_y,
                                                           int v_angle_x,
@@ -2739,21 +2733,21 @@ EAPI void           imlib_render_image_on_drawable_skewed(int source_x,
  * Works just like imlib_render_image_on_drawable_skewed() except you
  * cannot skew an image (@p v_angle_x and @p v_angle_y are 0).
  *
- * @param source_x      The source x coordinate
- * @param source_y      The source y coordinate
- * @param source_width  The source width
- * @param source_height The source height
- * @param destination_x The destination x coordinate
- * @param destination_y The destination y coordinate
+ * @param src_x         The source x coordinate
+ * @param src_y         The source y coordinate
+ * @param src_width     The source width
+ * @param src_height    The source height
+ * @param dst_x         The destination x coordinate
+ * @param dst_y         The destination y coordinate
  * @param angle_x       An angle
  * @param angle_y       An angle
  */
-EAPI void           imlib_render_image_on_drawable_at_angle(int source_x,
-                                                            int source_y,
-                                                            int source_width,
-                                                            int source_height,
-                                                            int destination_x,
-                                                            int destination_y,
+EAPI void           imlib_render_image_on_drawable_at_angle(int src_x,
+                                                            int src_y,
+                                                            int src_width,
+                                                            int src_height,
+                                                            int dst_x,
+                                                            int dst_y,
                                                             int angle_x,
                                                             int angle_y);
 
@@ -2879,7 +2873,7 @@ EAPI Imlib_Image    imlib_load_image_frame_mem(const char *file, int frame,
 /**
  * Get information about current image frame
  *
- * @param info		Imlib_Frame_Info struct returning the information
+ * @param info          Imlib_Frame_Info struct returning the information
  */
 EAPI void           imlib_image_get_frame_info(Imlib_Frame_Info * info);
 
@@ -2889,7 +2883,7 @@ EAPI void           imlib_image_get_frame_info(Imlib_Frame_Info * info);
  * @p err must be a value returned by imlib_load/save_image_with_errno_return().
  * The returned string must not be modified or freed.
  *
- * @param err 		The error code
+ * @param err           The error code
  *
  * @return String describing the error code
  */
diff --git a/src/lib/api.c b/src/lib/api.c
index 3403f94..6625ca8 100644
--- a/src/lib/api.c
+++ b/src/lib/api.c
@@ -897,18 +897,18 @@ imlib_image_set_has_alpha(char has_alpha)
 }
 
 EAPI 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)
+imlib_blend_image_onto_image(Imlib_Image src_image, char merge_alpha,
+                             int src_x, int src_y,
+                             int src_width, int src_height,
+                             int dst_x, int dst_y,
+                             int dst_width, int dst_height)
 {
    ImlibImage         *im_src, *im_dst;
    int                 aa;
 
-   CHECK_PARAM_POINTER("source_image", source_image);
+   CHECK_PARAM_POINTER("src_image", src_image);
    CHECK_PARAM_POINTER("image", ctx->image);
-   CAST_IMAGE(im_src, source_image);
+   CAST_IMAGE(im_src, src_image);
    CAST_IMAGE(im_dst, ctx->image);
    if (__imlib_LoadImageData(im_src))
       return;
@@ -917,13 +917,12 @@ imlib_blend_image_onto_image(Imlib_Image source_image, char merge_alpha,
    __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)))
+   if ((abs(dst_width) < (src_width >> 7)) ||
+       (abs(dst_height) < (src_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,
+   __imlib_BlendImageToImage(im_src, im_dst, aa, ctx->blend, merge_alpha,
+                             src_x, src_y, src_width, src_height,
+                             dst_x, dst_y, dst_width, dst_height,
                              ctx->color_modifier, ctx->operation,
                              ctx->cliprect.x, ctx->cliprect.y,
                              ctx->cliprect.w, ctx->cliprect.h);
@@ -1059,22 +1058,20 @@ imlib_create_cropped_image(int x, int y, int width, int height)
 }
 
 EAPI                Imlib_Image
-imlib_create_cropped_scaled_image(int source_x, int source_y,
-                                  int source_width, int source_height,
-                                  int destination_width, int destination_height)
+imlib_create_cropped_scaled_image(int src_x, int src_y,
+                                  int src_width, int src_height,
+                                  int dst_width, int dst_height)
 {
    ImlibImage         *im, *im_old;
 
    CHECK_PARAM_POINTER_RETURN("image", ctx->image, NULL);
-   if (!IMAGE_DIMENSIONS_OK(abs(destination_width), abs(destination_height)))
+   if (!IMAGE_DIMENSIONS_OK(abs(dst_width), abs(dst_height)))
       return NULL;
    CAST_IMAGE(im_old, ctx->image);
    if (__imlib_LoadImageData(im_old))
       return NULL;
-   im = __imlib_CreateImage(abs(destination_width), abs(destination_height),
-                            NULL);
-   im->data =
"">-      malloc(abs(destination_width * destination_height) * sizeof(uint32_t));
+   im = __imlib_CreateImage(abs(dst_width), abs(dst_height), NULL);
+   im->data = "" * dst_height) * sizeof(uint32_t));
    if (!(im->data))
      {
         __imlib_FreeImage(im);
@@ -1083,8 +1080,8 @@ imlib_create_cropped_scaled_image(int source_x, int source_y,
 
    im->has_alpha = im_old->has_alpha;
    __imlib_BlendImageToImage(im_old, im, ctx->anti_alias, 0, im->has_alpha,
-                             source_x, source_y, source_width, source_height,
-                             0, 0, destination_width, destination_height,
+                             src_x, src_y, src_width, src_height,
+                             0, 0, dst_width, dst_height,
                              NULL, (ImlibOp) IMLIB_OP_COPY,
                              ctx->cliprect.x, ctx->cliprect.y,
                              ctx->cliprect.w, ctx->cliprect.h);
@@ -1556,9 +1553,10 @@ imlib_image_copy_alpha_to_image(Imlib_Image image_source, int x, int y)
 }
 
 EAPI void
-imlib_image_copy_alpha_rectangle_to_image(Imlib_Image image_source, int x,
-                                          int y, int width, int height,
-                                          int destination_x, int destination_y)
+imlib_image_copy_alpha_rectangle_to_image(Imlib_Image image_source,
+                                          int src_x, int src_y,
+                                          int src_width, int src_height,
+                                          int dst_x, int dst_y)
 {
    ImlibImage         *im, *im2;
 
@@ -1571,8 +1569,8 @@ imlib_image_copy_alpha_rectangle_to_image(Imlib_Image image_source, int x,
    if (__imlib_LoadImageData(im2))
       return;
    __imlib_DirtyImage(im);
-   __imlib_copy_alpha_data(im, im2, x, y, width, height, destination_x,
-                           destination_y);
+   __imlib_copy_alpha_data(im, im2, src_x, src_y, src_width, src_height,
+                           dst_x, dst_y);
 }
 
 EAPI void
@@ -1967,15 +1965,15 @@ imlib_create_rotated_image(double angle)
 }
 
 void
-imlib_rotate_image_from_buffer(double angle, Imlib_Image source_image)
+imlib_rotate_image_from_buffer(double angle, Imlib_Image src_image)
 {
    ImlibImage         *im, *im_old;
    int                 x, y, dx, dy, sz;
    double              x1, y1, d;
 
    // source image (to rotate)
-   CHECK_PARAM_POINTER("source_image", source_image);
-   CAST_IMAGE(im_old, source_image);
+   CHECK_PARAM_POINTER("src_image", src_image);
+   CAST_IMAGE(im_old, src_image);
 
    // current context image
    CHECK_PARAM_POINTER("image", ctx->image);
@@ -2026,18 +2024,17 @@ imlib_rotate_image_from_buffer(double angle, Imlib_Image source_image)
 }
 
 EAPI void
-imlib_blend_image_onto_image_at_angle(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 angle_x,
-                                      int angle_y)
+imlib_blend_image_onto_image_at_angle(Imlib_Image src_image, char merge_alpha,
+                                      int src_x, int src_y,
+                                      int src_width, int src_height,
+                                      int dst_x, int dst_y,
+                                      int angle_x, int angle_y)
 {
    ImlibImage         *im_src, *im_dst;
 
-   CHECK_PARAM_POINTER("source_image", source_image);
+   CHECK_PARAM_POINTER("src_image", src_image);
    CHECK_PARAM_POINTER("image", ctx->image);
-   CAST_IMAGE(im_src, source_image);
+   CAST_IMAGE(im_src, src_image);
    CAST_IMAGE(im_dst, ctx->image);
    if (__imlib_LoadImageData(im_src))
       return;
@@ -2045,28 +2042,27 @@ imlib_blend_image_onto_image_at_angle(Imlib_Image source_image,
       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, angle_x,
-                                   angle_y, 0, 0, ctx->color_modifier,
-                                   ctx->operation,
+                                   ctx->blend, merge_alpha,
+                                   src_x, src_y, src_width, src_height,
+                                   dst_x, dst_y, angle_x, angle_y,
+                                   0, 0, ctx->color_modifier, ctx->operation,
                                    ctx->cliprect.x, ctx->cliprect.y,
                                    ctx->cliprect.w, ctx->cliprect.h);
 }
 
 EAPI 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)
+imlib_blend_image_onto_image_skewed(Imlib_Image src_image, char merge_alpha,
+                                    int src_x, int src_y,
+                                    int src_width, int src_height,
+                                    int dst_x, int dst_y,
+                                    int h_angle_x, int h_angle_y,
+                                    int v_angle_x, int v_angle_y)
 {
    ImlibImage         *im_src, *im_dst;
 
-   CHECK_PARAM_POINTER("source_image", source_image);
+   CHECK_PARAM_POINTER("src_image", src_image);
    CHECK_PARAM_POINTER("image", ctx->image);
-   CAST_IMAGE(im_src, source_image);
+   CAST_IMAGE(im_src, src_image);
    CAST_IMAGE(im_dst, ctx->image);
    if (__imlib_LoadImageData(im_src))
       return;
@@ -2074,10 +2070,10 @@ imlib_blend_image_onto_image_skewed(Imlib_Image source_image,
       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->blend, merge_alpha,
+                                   src_x, src_y, src_width, src_height,
+                                   dst_x, dst_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);
diff --git a/src/lib/api_x11.c b/src/lib/api_x11.c
index a66d033..2e1e510 100644
--- a/src/lib/api_x11.c
+++ b/src/lib/api_x11.c
@@ -248,18 +248,18 @@ imlib_render_image_on_drawable_at_size(int x, int y, int width, int height)
    if (__imlib_LoadImageData(im))
       return;
    __imlib_RenderImage(ctx->display, im, ctx->drawable, ctx->mask,
-                       ctx->visual, ctx->colormap, ctx->depth, 0, 0, im->w,
-                       im->h, x, y, width, height, ctx->anti_alias,
-                       ctx->dither, ctx->blend, ctx->dither_mask,
-                       ctx->mask_alpha_threshold, ctx->color_modifier,
-                       ctx->operation);
+                       ctx->visual, ctx->colormap, ctx->depth,
+                       0, 0, im->w, im->h, x, y, width, height,
+                       ctx->anti_alias, ctx->dither, ctx->blend,
+                       ctx->dither_mask, ctx->mask_alpha_threshold,
+                       ctx->color_modifier, ctx->operation);
 }
 
 EAPI void
-imlib_render_image_part_on_drawable_at_size(int source_x, int source_y,
-                                            int source_width,
-                                            int source_height, int x, int y,
-                                            int width, int height)
+imlib_render_image_part_on_drawable_at_size(int src_x, int src_y,
+                                            int src_width, int src_height,
+                                            int dst_x, int dst_y,
+                                            int dst_width, int dst_height)
 {
    ImlibImage         *im;
 
@@ -267,11 +267,12 @@ imlib_render_image_part_on_drawable_at_size(int source_x, int source_y,
    CAST_IMAGE(im, ctx->image);
    if (__imlib_LoadImageData(im))
       return;
-   __imlib_RenderImage(ctx->display, im, ctx->drawable, 0, ctx->visual,
-                       ctx->colormap, ctx->depth, source_x, source_y,
-                       source_width, source_height, x, y, width, height,
-                       ctx->anti_alias, ctx->dither, ctx->blend, 0,
-                       0, ctx->color_modifier, ctx->operation);
+   __imlib_RenderImage(ctx->display, im, ctx->drawable, 0,
+                       ctx->visual, ctx->colormap, ctx->depth,
+                       src_x, src_y, src_width, src_height,
+                       dst_x, dst_y, dst_width, dst_height,
+                       ctx->anti_alias, ctx->dither, ctx->blend, 0, 0,
+                       ctx->color_modifier, ctx->operation);
 }
 
 EAPI                uint32_t
@@ -344,40 +345,36 @@ imlib_create_image_from_ximage(XImage * image, XImage * mask, int x, int y,
 }
 
 EAPI                Imlib_Image
-imlib_create_scaled_image_from_drawable(Pixmap mask, int source_x,
-                                        int source_y, int source_width,
-                                        int source_height,
-                                        int destination_width,
-                                        int destination_height,
+imlib_create_scaled_image_from_drawable(Pixmap mask, int src_x, int src_y,
+                                        int src_width, int src_height,
+                                        int dst_width, int dst_height,
                                         char need_to_grab_x,
                                         char get_mask_from_shape)
 {
    ImlibImage         *im;
    char                domask;
 
-   if (!IMAGE_DIMENSIONS_OK(source_width, source_height))
+   if (!IMAGE_DIMENSIONS_OK(src_width, src_height))
       return NULL;
-   if (!IMAGE_DIMENSIONS_OK(destination_width, destination_height))
+   if (!IMAGE_DIMENSIONS_OK(dst_width, dst_height))
       return NULL;
 
    domask = mask != 0 || get_mask_from_shape;
 
-   im = __imlib_CreateImage(destination_width, destination_height, NULL);
+   im = __imlib_CreateImage(dst_width, dst_height, NULL);
    if (!im)
       return NULL;
-   im->data = "" * destination_height * sizeof(uint32_t));
+   im->data = "" * dst_height * sizeof(uint32_t));
    if (!im->data)
      {
         __imlib_FreeImage(im);
         return NULL;
      }
 
-   __imlib_GrabDrawableScaledToRGBA(im->data, 0, 0,
-                                    destination_width, destination_height,
+   __imlib_GrabDrawableScaledToRGBA(im->data, 0, 0, dst_width, dst_height,
                                     ctx->display, ctx->drawable, mask,
                                     ctx->visual, ctx->colormap, ctx->depth,
-                                    source_x, source_y,
-                                    source_width, source_height,
+                                    src_x, src_y, src_width, src_height,
                                     &domask, need_to_grab_x);
 
    im->has_alpha = domask;
@@ -386,8 +383,8 @@ imlib_create_scaled_image_from_drawable(Pixmap mask, int source_x,
 }
 
 EAPI char
-imlib_copy_drawable_to_image(Pixmap mask, int x, int y, int width, int height,
-                             int destination_x, int destination_y,
+imlib_copy_drawable_to_image(Pixmap mask, int src_x, int src_y, int src_width,
+                             int src_height, int dst_x, int dst_y,
                              char need_to_grab_x)
 {
    ImlibImage         *im;
@@ -407,49 +404,49 @@ imlib_copy_drawable_to_image(Pixmap mask, int x, int y, int width, int height,
       return 0;
 
    pre_adj = 0;
-   if (x < 0)
+   if (src_x < 0)
      {
-        width += x;
-        pre_adj = x;
-        x = 0;
+        src_width += src_x;
+        pre_adj = src_x;
+        src_x = 0;
      }
-   if (width < 0)
-      width = 0;
-   if (destination_x < 0)
+   if (src_width < 0)
+      src_width = 0;
+   if (dst_x < 0)
      {
-        width += destination_x;
-        x -= destination_x - pre_adj;
-        destination_x = 0;
+        src_width += dst_x;
+        src_x -= dst_x - pre_adj;
+        dst_x = 0;
      }
-   if ((destination_x + width) >= im->w)
-      width = im->w - destination_x;
+   if ((dst_x + src_width) >= im->w)
+      src_width = im->w - dst_x;
 
    pre_adj = 0;
-   if (y < 0)
+   if (src_y < 0)
      {
-        height += y;
-        pre_adj = y;
-        y = 0;
+        src_height += src_y;
+        pre_adj = src_y;
+        src_y = 0;
      }
-   if (height < 0)
-      height = 0;
-   if (destination_y < 0)
+   if (src_height < 0)
+      src_height = 0;
+   if (dst_y < 0)
      {
-        height += destination_y;
-        y -= destination_y - pre_adj;
-        destination_y = 0;
+        src_height += dst_y;
+        src_y -= dst_y - pre_adj;
+        dst_y = 0;
      }
-   if ((destination_y + height) >= im->h)
-      height = im->h - destination_y;
+   if ((dst_y + src_height) >= im->h)
+      src_height = im->h - dst_y;
 
-   if ((width <= 0) || (height <= 0))
+   if ((src_width <= 0) || (src_height <= 0))
       return 0;
    __imlib_DirtyImage(im);
-   return __imlib_GrabDrawableToRGBA(im->data, destination_x, destination_y,
-                                     im->w, im->h, ctx->display,
-                                     ctx->drawable, mask, ctx->visual,
-                                     ctx->colormap, ctx->depth, x, y, width,
-                                     height, &domask, need_to_grab_x);
+   return __imlib_GrabDrawableToRGBA(im->data, dst_x, dst_y, im->w, im->h,
+                                     ctx->display, ctx->drawable, mask,
+                                     ctx->visual, ctx->colormap, ctx->depth,
+                                     src_x, src_y, src_width, src_height,
+                                     &domask, need_to_grab_x);
 }
 
 EAPI void
@@ -481,9 +478,9 @@ imlib_render_image_updates_on_drawable(Imlib_Updates updates, int x, int y)
 }
 
 EAPI void
-imlib_render_image_on_drawable_skewed(int source_x, int source_y,
-                                      int source_width, int source_height,
-                                      int destination_x, int destination_y,
+imlib_render_image_on_drawable_skewed(int src_x, int src_y,
+                                      int src_width, int src_height,
+                                      int dst_x, int dst_y,
                                       int h_angle_x, int h_angle_y,
                                       int v_angle_x, int v_angle_y)
 {
@@ -494,9 +491,9 @@ imlib_render_image_on_drawable_skewed(int source_x, int source_y,
    if (__imlib_LoadImageData(im))
       return;
    __imlib_RenderImageSkewed(ctx->display, im, ctx->drawable, ctx->mask,
-                             ctx->visual, ctx->colormap, ctx->depth, source_x,
-                             source_y, source_width, source_height,
-                             destination_x, destination_y, h_angle_x,
+                             ctx->visual, ctx->colormap, ctx->depth, src_x,
+                             src_y, src_width, src_height,
+                             dst_x, dst_y, h_angle_x,
                              h_angle_y, v_angle_x, v_angle_y, ctx->anti_alias,
                              ctx->dither, ctx->blend, ctx->dither_mask,
                              ctx->mask_alpha_threshold, ctx->color_modifier,
@@ -504,9 +501,9 @@ imlib_render_image_on_drawable_skewed(int source_x, int source_y,
 }
 
 EAPI void
-imlib_render_image_on_drawable_at_angle(int source_x, int source_y,
-                                        int source_width, int source_height,
-                                        int destination_x, int destination_y,
+imlib_render_image_on_drawable_at_angle(int src_x, int src_y,
+                                        int src_width, int src_height,
+                                        int dst_x, int dst_y,
                                         int angle_x, int angle_y)
 {
    ImlibImage         *im;
@@ -516,9 +513,9 @@ imlib_render_image_on_drawable_at_angle(int source_x, int source_y,
    if (__imlib_LoadImageData(im))
       return;
    __imlib_RenderImageSkewed(ctx->display, im, ctx->drawable, ctx->mask,
-                             ctx->visual, ctx->colormap, ctx->depth, source_x,
-                             source_y, source_width, source_height,
-                             destination_x, destination_y, angle_x, angle_y,
+                             ctx->visual, ctx->colormap, ctx->depth, src_x,
+                             src_y, src_width, src_height,
+                             dst_x, dst_y, angle_x, angle_y,
                              0, 0, ctx->anti_alias, ctx->dither, ctx->blend,
                              ctx->dither_mask, ctx->mask_alpha_threshold,
                              ctx->color_modifier, ctx->operation);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to