gegl r2731 - in trunk: . gegl/property-types
- From: ok svn gnome org
- To: svn-commits-list gnome org
- Subject: gegl r2731 - in trunk: . gegl/property-types
- Date: Tue, 11 Nov 2008 10:18:23 +0000 (UTC)
Author: ok
Date: Tue Nov 11 10:18:23 2008
New Revision: 2731
URL: http://svn.gnome.org/viewvc/gegl?rev=2731&view=rev
Log:
* gegl/property-types/gegl-path.[ch]: (gegl_path_freeze),
(gegl_path_thaw), (gegl_path_emit_changed): added freeze and thaw
functions to the path, the full extent of the path fill be invalidated
upon the final thaw. Recursive hypothermia is permitted.
Modified:
trunk/ChangeLog
trunk/gegl/property-types/gegl-path.c
trunk/gegl/property-types/gegl-path.h
Modified: trunk/gegl/property-types/gegl-path.c
==============================================================================
--- trunk/gegl/property-types/gegl-path.c (original)
+++ trunk/gegl/property-types/gegl-path.c Tue Nov 11 10:18:23 2008
@@ -529,6 +529,7 @@
GeglRectangle dirtied;
GeglRectangle cached_extent;
+ gint frozen;
};
static GeglPathList *ensure_tail (GeglPathPrivate *priv)
@@ -596,6 +597,22 @@
return GPOINTER_TO_INT (a)-GPOINTER_TO_INT (b);
}
+static void
+gegl_path_emit_changed (GeglPath *self,
+ const GeglRectangle *bounds);
+
+void gegl_path_freeze (GeglPath *path)
+{
+ GeglPathPrivate *priv = GEGL_PATH_GET_PRIVATE (path);
+ priv->frozen ++;
+}
+void gegl_path_thaw (GeglPath *path)
+{
+ GeglPathPrivate *priv = GEGL_PATH_GET_PRIVATE (path);
+ priv->frozen --;
+ gegl_path_emit_changed (path, NULL); /* expose a full changed */
+}
+
static void ensure_flattened (GeglPath *vector)
{
GeglPathPrivate *priv = GEGL_PATH_GET_PRIVATE (vector);
@@ -679,6 +696,9 @@
gdouble min_y;
gdouble max_y;
+ if (priv->frozen)
+ return;
+
gegl_path_get_bounds (self, &min_x, &max_x, &min_y, &max_y);
rect.x = floor (min_x);
Modified: trunk/gegl/property-types/gegl-path.h
==============================================================================
--- trunk/gegl/property-types/gegl-path.h (original)
+++ trunk/gegl/property-types/gegl-path.h Tue Nov 11 10:18:23 2008
@@ -206,6 +206,8 @@
gdouble hardness,
gdouble opacity);
+void gegl_path_freeze (GeglPath *path);
+void gegl_path_thaw (GeglPath *path);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]