gegl r2960 - in trunk: . gegl/buffer



Author: martinn
Date: Sun Mar 15 19:15:50 2009
New Revision: 2960
URL: http://svn.gnome.org/viewvc/gegl?rev=2960&view=rev

Log:
Consciously consider a well specified space valid for processing

Consciously consider a well specified subset of the 2d euclidian space
as valid for processing, namely the space within the rectangle

  {x=G_MININT/2, y=G_MININT/2, width=G_MAXINT, height=G_MAXINT},

which typically means

  {x=-1073741824, y=-1073741824, width=2147483647, height=2147483647}.

Processing outside of this area results in undefined behaviour. The
approach taken by the core is to not impose this limitation
artificially in too many places as this would just complicate the code
base and risk too early truncation of data during processing.

The reason for this new policy is be more specific on the behaviour
and limitations of GEGL as a system.

Modified:
   trunk/ChangeLog
   trunk/gegl/buffer/gegl-buffer.c
   trunk/gegl/buffer/gegl-cache.c
   trunk/gegl/buffer/gegl-tile.c

Modified: trunk/gegl/buffer/gegl-buffer.c
==============================================================================
--- trunk/gegl/buffer/gegl-buffer.c	(original)
+++ trunk/gegl/buffer/gegl-buffer.c	Sun Mar 15 19:15:50 2009
@@ -784,12 +784,12 @@
                                                      G_PARAM_CONSTRUCT));
   g_object_class_install_property (gobject_class, PROP_X,
                                    g_param_spec_int ("x", "x", "local origin's offset relative to source origin",
-                                                     G_MININT, G_MAXINT, 0,
+                                                     G_MININT / 2, G_MAXINT / 2, 0,
                                                      G_PARAM_READWRITE |
                                                      G_PARAM_CONSTRUCT));
   g_object_class_install_property (gobject_class, PROP_Y,
                                    g_param_spec_int ("y", "y", "local origin's offset relative to source origin",
-                                                     G_MININT, G_MAXINT, 0,
+                                                     G_MININT / 2, G_MAXINT / 2, 0,
                                                      G_PARAM_READWRITE |
                                                      G_PARAM_CONSTRUCT));
   g_object_class_install_property (gobject_class, PROP_ABYSS_WIDTH,
@@ -804,22 +804,22 @@
                                                      G_PARAM_CONSTRUCT_ONLY));
   g_object_class_install_property (gobject_class, PROP_ABYSS_X,
                                    g_param_spec_int ("abyss-x", "abyss-x", "",
-                                                     G_MININT, G_MAXINT, 0,
+                                                     G_MININT / 2, G_MAXINT / 2, 0,
                                                      G_PARAM_READWRITE |
                                                      G_PARAM_CONSTRUCT_ONLY));
   g_object_class_install_property (gobject_class, PROP_ABYSS_Y,
                                    g_param_spec_int ("abyss-y", "abyss-y", "",
-                                                     G_MININT, G_MAXINT, 0,
+                                                     G_MININT / 2, G_MAXINT / 2, 0,
                                                      G_PARAM_READWRITE |
                                                      G_PARAM_CONSTRUCT_ONLY));
   g_object_class_install_property (gobject_class, PROP_SHIFT_X,
                                    g_param_spec_int ("shift-x", "shift-x", "",
-                                                     G_MININT, G_MAXINT, 0,
+                                                     G_MININT / 2, G_MAXINT / 2, 0,
                                                      G_PARAM_READWRITE |
                                                      G_PARAM_CONSTRUCT_ONLY));
   g_object_class_install_property (gobject_class, PROP_SHIFT_Y,
                                    g_param_spec_int ("shift-y", "shift-y", "",
-                                                     G_MININT, G_MAXINT, 0,
+                                                     G_MININT / 2, G_MAXINT / 2, 0,
                                                      G_PARAM_READWRITE |
                                                      G_PARAM_CONSTRUCT_ONLY));
   g_object_class_install_property (gobject_class, PROP_FORMAT,

Modified: trunk/gegl/buffer/gegl-cache.c
==============================================================================
--- trunk/gegl/buffer/gegl-cache.c	(original)
+++ trunk/gegl/buffer/gegl-cache.c	Sun Mar 15 19:15:50 2009
@@ -138,14 +138,14 @@
   g_object_class_install_property (gobject_class, PROP_X,
                                    g_param_spec_int ("x", "x",
                                                      "local origin's offset relative to source origin",
-                                                     G_MININT, G_MAXINT, -4096,
+                                                     G_MININT / 2, G_MAXINT / 2, -4096,
                                                      G_PARAM_READWRITE |
                                                      G_PARAM_CONSTRUCT_ONLY));
 
   g_object_class_install_property (gobject_class, PROP_Y,
                                    g_param_spec_int ("y", "y",
                                                      "local origin's offset relative to source origin",
-                                                     G_MININT, G_MAXINT, -4096,
+                                                     G_MININT / 2, G_MAXINT / 2, -4096,
                                                      G_PARAM_READWRITE |
                                                      G_PARAM_CONSTRUCT_ONLY));
 

Modified: trunk/gegl/buffer/gegl-tile.c
==============================================================================
--- trunk/gegl/buffer/gegl-tile.c	(original)
+++ trunk/gegl/buffer/gegl-tile.c	Sun Mar 15 19:15:50 2009
@@ -162,12 +162,12 @@
 
   g_object_class_install_property (gobject_class, PROP_X,
                                    g_param_spec_int ("x", "x", "Horizontal index",
-                                                     G_MININT, G_MAXINT, 0,
+                                                     G_MININT / 2, G_MAXINT / 2, 0,
                                                      G_PARAM_READWRITE));
 
   g_object_class_install_property (gobject_class, PROP_Y,
                                    g_param_spec_int ("y", "y", "Vertical index",
-                                                     G_MININT, G_MAXINT, 0,
+                                                     G_MININT / 2, G_MAXINT / 2, 0,
                                                      G_PARAM_READWRITE));
 
   g_object_class_install_property (gobject_class, PROP_Z,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]