mirror of https://github.com/GNOME/gimp.git
app: add a GIMP_GEGL_RECT utility macro
It is evil, but it is possible to take the address of an inline defined struct as an argument in C. =)
This commit is contained in:
parent
6274b269ca
commit
390d48d436
|
@ -140,15 +140,10 @@ gimp_drawable_offset (GimpDrawable *drawable,
|
|||
/* Copy the center region */
|
||||
if (width && height)
|
||||
{
|
||||
src_rect.x = src_x;
|
||||
src_rect.y = src_y;
|
||||
src_rect.width = width;
|
||||
src_rect.height = height;
|
||||
|
||||
dest_rect.x = dest_x;
|
||||
dest_rect.y = dest_y;
|
||||
|
||||
gegl_buffer_copy (src_buffer, &src_rect, dest_buffer, &dest_rect);
|
||||
gegl_buffer_copy (src_buffer,
|
||||
GIMP_GEGL_RECT (src_x, src_y, width, height),
|
||||
dest_buffer,
|
||||
GIMP_GEGL_RECT (dest_x,dest_y, width, height));
|
||||
}
|
||||
|
||||
if (wrap_around)
|
||||
|
|
|
@ -44,5 +44,6 @@ void gimp_gegl_buffer_refetch_tiles (GeglBuffer *buffer)
|
|||
|
||||
GeglColor * gimp_gegl_color_new (const GimpRGB *rgb);
|
||||
|
||||
#define GIMP_GEGL_RECT(x,y,w,h) (&((GeglRectangle){(x), (y), (w), (h)}))
|
||||
|
||||
#endif /* __GIMP_GEGL_UTILS_H__ */
|
||||
|
|
Loading…
Reference in New Issue