gegl r2964 - in trunk: . gegl
- From: martinn svn gnome org
- To: svn-commits-list gnome org
- Subject: gegl r2964 - in trunk: . gegl
- Date: Tue, 17 Mar 2009 20:00:55 +0000 (UTC)
Author: martinn
Date: Tue Mar 17 20:00:54 2009
New Revision: 2964
URL: http://svn.gnome.org/viewvc/gegl?rev=2964&view=rev
Log:
Add utility functions for GeglRectangles representing infinite planes
Add utility functions for GeglRectangles representing infinite planes,
namely gegl_rectangle_infinite_plane() and
gegl_rectangle_is_infinite_plane().
Modified:
trunk/ChangeLog
trunk/gegl/gegl-utils.c
trunk/gegl/gegl-utils.h
Modified: trunk/gegl/gegl-utils.c
==============================================================================
--- trunk/gegl/gegl-utils.c (original)
+++ trunk/gegl/gegl-utils.c Tue Mar 17 20:00:54 2009
@@ -175,6 +175,22 @@
return result;
}
+GeglRectangle
+gegl_rectangle_infinite_plane (void)
+{
+ GeglRectangle infinite_plane_rect = {G_MININT / 2, G_MININT / 2, G_MAXINT, G_MAXINT};
+ return infinite_plane_rect;
+}
+
+gboolean
+gegl_rectangle_is_infinite_plane (const GeglRectangle *rectangle)
+{
+ return (rectangle->x == G_MININT / 2 &&
+ rectangle->y == G_MININT / 2 &&
+ rectangle->width == G_MAXINT &&
+ rectangle->height == G_MAXINT);
+}
+
GType
gegl_rectangle_get_type (void)
{
Modified: trunk/gegl/gegl-utils.h
==============================================================================
--- trunk/gegl/gegl-utils.h (original)
+++ trunk/gegl/gegl-utils.h Tue Mar 17 20:00:54 2009
@@ -139,6 +139,22 @@
gboolean gegl_rectangle_contains (const GeglRectangle *parent,
const GeglRectangle *child);
+/**
+ * gegl_rectangle_infinite_plane:
+ *
+ * Returns a GeglRectangle that represents an infininte plane.
+ */
+GeglRectangle gegl_rectangle_infinite_plane (void);
+
+/**
+ * gegl_rectangle_is_infinite_plane:
+ * @rectangle: A GeglRectangle.
+ *
+ * Returns TRUE if the GeglRectangle represents an infininte plane,
+ * FALSE otherwise.
+ */
+gboolean gegl_rectangle_is_infinite_plane (const GeglRectangle *rectangle);
+
/***
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]