gegl r1976 - in trunk: . gegl/buffer
- From: ok svn gnome org
- To: svn-commits-list gnome org
- Subject: gegl r1976 - in trunk: . gegl/buffer
- Date: Tue, 5 Feb 2008 23:30:46 +0000 (GMT)
Author: ok
Date: Tue Feb 5 23:30:46 2008
New Revision: 1976
URL: http://svn.gnome.org/viewvc/gegl?rev=1976&view=rev
Log:
Applied patch from Bradley Broom fixing bug #510371 - Images with
"negative x origin are not displayed or output correctly"
* gegl/buffer/gegl-buffer-allocator.c: (gegl_buffer_alloc): take the
requested offset into account for the shift.
Modified:
trunk/ChangeLog
trunk/gegl/buffer/gegl-buffer-allocator.c
Modified: trunk/gegl/buffer/gegl-buffer-allocator.c
==============================================================================
--- trunk/gegl/buffer/gegl-buffer-allocator.c (original)
+++ trunk/gegl/buffer/gegl-buffer-allocator.c Tue Feb 5 23:30:46 2008
@@ -85,17 +85,20 @@
if (allocator->y_used + needed_height > buffer->extent.height)
{
- g_warning ("requested allocation (%ix%i) does not fit parent buffer (%ix%i)",
- width, height, buffer->extent.width, buffer->extent.height);
+ g_warning (
+ "requested allocation (%ix%i) does not fit parent buffer (%ix%i)",
+ width, height, buffer->extent.width, buffer->extent.height);
return NULL;
}
if (allocator->x_used + needed_width > buffer->extent.width)
{
- if (allocator->y_used + allocator->max_height + needed_height > buffer->extent.height)
+ if (allocator->y_used + allocator->max_height + needed_height >
+ buffer->extent.height)
{
- g_warning ("requested allocation (%ix%i) does not fit parent buffer (%ix%i)",
- width, height, buffer->extent.width, buffer->extent.height);
+ g_warning (
+ "requested allocation (%ix%i) does not fit parent buffer (%ix%i)",
+ width, height, buffer->extent.width, buffer->extent.height);
return NULL;
}
allocator->y_used += allocator->max_height;
@@ -103,8 +106,8 @@
allocator->max_height = 0;
}
- shift_x = allocator->x_used;
- shift_y = allocator->y_used;
+ shift_x = allocator->x_used - x;
+ shift_y = allocator->y_used - y;
allocator->x_used += needed_width;
if (allocator->max_height < needed_height)
@@ -147,7 +150,7 @@
if (gegl_swap != NULL)
{
- GeglStorage *storage;
+ GeglStorage *storage;
gchar *path;
path = g_strdup_printf ("%s/GEGL-%i-%s.swap", gegl_swap,
getpid (), babl_name (babl_format));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]