mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-21 20:12:30 +00:00
moved function calls out of CLAMP macros.
2008-08-12 Sven Neumann <sven@gimp.org> * app/core/gimpprojection.c (gimp_projection_paint_area): moved function calls out of CLAMP macros. svn path=/trunk/; revision=26520
This commit is contained in:
parent
0847643307
commit
f6771f1987
|
@ -1,3 +1,8 @@
|
|||
2008-08-12 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/core/gimpprojection.c (gimp_projection_paint_area): moved
|
||||
function calls out of CLAMP macros.
|
||||
|
||||
2008-08-12 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/display/gimpdisplayshell.c (gimp_display_shell_empty):
|
||||
|
|
|
@ -654,11 +654,14 @@ gimp_projection_paint_area (GimpProjection *proj,
|
|||
gint w,
|
||||
gint h)
|
||||
{
|
||||
const gint width = gimp_image_get_width (proj->image);
|
||||
const gint height = gimp_image_get_height (proj->image);
|
||||
|
||||
/* Bounds check */
|
||||
gint x1 = CLAMP (x, 0, gimp_image_get_width (proj->image));
|
||||
gint y1 = CLAMP (y, 0, gimp_image_get_height (proj->image));
|
||||
gint x2 = CLAMP (x + w, 0, gimp_image_get_width (proj->image));
|
||||
gint y2 = CLAMP (y + h, 0, gimp_image_get_height (proj->image));
|
||||
gint x1 = CLAMP (x, 0, width);
|
||||
gint y1 = CLAMP (y, 0, height);
|
||||
gint x2 = CLAMP (x + w, 0, width);
|
||||
gint y2 = CLAMP (y + h, 0, height);
|
||||
|
||||
gimp_projection_invalidate (proj, x1, y1, x2 - x1, y2 - y1);
|
||||
|
||||
|
|
Loading…
Reference in a new issue