gegl r1874 - in trunk: . gegl gegl/buffer gegl/graph gegl/module operations operations/color operations/io operations/render
- From: ok svn gnome org
- To: svn-commits-list gnome org
- Subject: gegl r1874 - in trunk: . gegl gegl/buffer gegl/graph gegl/module operations operations/color operations/io operations/render
- Date: Mon, 21 Jan 2008 00:14:08 +0000 (GMT)
Author: ok
Date: Mon Jan 21 00:14:07 2008
New Revision: 1874
URL: http://svn.gnome.org/viewvc/gegl?rev=1874&view=rev
Log:
First shout at installing headers making it possible to build external
operations, either as plug-ins or static objects in an application
using GEGL.
* gegl/Makefile.am: added gegl-chant.h and module/geglmodule*.h to the
set of headers to be installed in the gegl header base dir.
* gegl/module/geglmodule.h: added comment about module ABI versions,
and updated instruction on when this ABI should be incremented. (we
should probably allow a range of ABIs, one to be incremented on ABI
addition and the lower threshold to be incremented on ABI change.
* gegl/module/geglmoduletypes.h: removed invalid header.
* gegl/gegl-chant.h: added comment at top.
* gegl/graph/gegl-pad.h: moved definition of GeglPadType ..
* gegl/gegl-types.h: .. here, as well as reorganized this file a bit
to guard against multiple inclusion.
* gegl/gegl.h: added some guards against multiple inclusion.
The rest of these files were changed to make them compile, there are
still some warnings about undeclared functions being issued that needs
sorting out.
* gegl/buffer/gegl-buffer-allocator.c:
* gegl/buffer/gegl-buffer-load.c:
* gegl/buffer/gegl-buffer-save.c:
* gegl/buffer/gegl-buffer.c:
* gegl/buffer/gegl-handler-cache.c:
* gegl/buffer/gegl-region-generic.c:
* gegl/buffer/gegl-tile.c:
* gegl/gegl-dot.c:
* operations/Makefile-operations.am:
* operations/color/mono-mixer.c:
* operations/io/exr-load.cpp:
* operations/io/load-buffer.c:
* operations/io/load.c:
* operations/io/png-save.c:
* operations/io/save-pixbuf.c:
* operations/render/checkerboard.c:
* operations/render/introspect.c:
Modified:
trunk/ChangeLog
trunk/gegl/Makefile.am
trunk/gegl/buffer/gegl-buffer-allocator.c
trunk/gegl/buffer/gegl-buffer-load.c
trunk/gegl/buffer/gegl-buffer-save.c
trunk/gegl/buffer/gegl-buffer.c
trunk/gegl/buffer/gegl-handler-cache.c
trunk/gegl/buffer/gegl-region-generic.c
trunk/gegl/buffer/gegl-tile.c
trunk/gegl/gegl-chant.h
trunk/gegl/gegl-dot.c
trunk/gegl/gegl-types.h
trunk/gegl/gegl.h
trunk/gegl/graph/gegl-pad.h
trunk/gegl/module/geglmodule.h
trunk/gegl/module/geglmoduletypes.h
trunk/operations/Makefile-operations.am
trunk/operations/color/mono-mixer.c
trunk/operations/io/exr-load.cpp
trunk/operations/io/load-buffer.c
trunk/operations/io/load.c
trunk/operations/io/png-save.c
trunk/operations/io/save-pixbuf.c
trunk/operations/render/checkerboard.c
trunk/operations/render/introspect.c
Modified: trunk/gegl/Makefile.am
==============================================================================
--- trunk/gegl/Makefile.am (original)
+++ trunk/gegl/Makefile.am Mon Jan 21 00:14:07 2008
@@ -52,4 +52,12 @@
libgegl_ GEGL_API_VERSION@includedir = $(includedir)/gegl-$(GEGL_API_VERSION)
-libgegl_ GEGL_API_VERSION@include_HEADERS = gegl.h gegl-utils.h buffer/gegl-buffer.h property-types/gegl-paramspecs.h
+libgegl_ GEGL_API_VERSION@include_HEADERS = \
+ gegl.h \
+ gegl-utils.h \
+ gegl-chant.h \
+ buffer/gegl-buffer.h \
+ module/geglmoduletypes.h \
+ module/geglmoduledb.h \
+ module/geglmodule.h \
+ property-types/gegl-paramspecs.h
Modified: trunk/gegl/buffer/gegl-buffer-allocator.c
==============================================================================
--- trunk/gegl/buffer/gegl-buffer-allocator.c (original)
+++ trunk/gegl/buffer/gegl-buffer-allocator.c Mon Jan 21 00:14:07 2008
@@ -25,6 +25,7 @@
#include <glib.h>
#include <glib/gprintf.h>
#include <glib/gstdio.h>
+#include <glib-object.h>
#ifdef G_OS_WIN32
#include <process.h>
Modified: trunk/gegl/buffer/gegl-buffer-load.c
==============================================================================
--- trunk/gegl/buffer/gegl-buffer-load.c (original)
+++ trunk/gegl/buffer/gegl-buffer-load.c Mon Jan 21 00:14:07 2008
@@ -23,6 +23,7 @@
#endif
#include <string.h>
#include <glib.h>
+#include <glib-object.h>
#include <glib/gstdio.h>
#ifdef G_OS_WIN32
Modified: trunk/gegl/buffer/gegl-buffer-save.c
==============================================================================
--- trunk/gegl/buffer/gegl-buffer-save.c (original)
+++ trunk/gegl/buffer/gegl-buffer-save.c Mon Jan 21 00:14:07 2008
@@ -24,6 +24,7 @@
#endif
#include <string.h>
#include <glib.h>
+#include <glib-object.h>
#include <glib/gstdio.h>
#ifdef G_OS_WIN32
Modified: trunk/gegl/buffer/gegl-buffer.c
==============================================================================
--- trunk/gegl/buffer/gegl-buffer.c (original)
+++ trunk/gegl/buffer/gegl-buffer.c Mon Jan 21 00:14:07 2008
@@ -17,6 +17,7 @@
*/
#include <glib.h>
+#include <glib-object.h>
#include <glib/gstdio.h>
#include "../gegl-types.h"
Modified: trunk/gegl/buffer/gegl-handler-cache.c
==============================================================================
--- trunk/gegl/buffer/gegl-handler-cache.c (original)
+++ trunk/gegl/buffer/gegl-handler-cache.c Mon Jan 21 00:14:07 2008
@@ -19,6 +19,7 @@
#include <glib.h>
#include <glib/gstdio.h>
+#include <glib-object.h>
#include "../gegl-types.h"
#include "gegl-buffer.h"
Modified: trunk/gegl/buffer/gegl-region-generic.c
==============================================================================
--- trunk/gegl/buffer/gegl-region-generic.c (original)
+++ trunk/gegl/buffer/gegl-region-generic.c Mon Jan 21 00:14:07 2008
@@ -73,6 +73,7 @@
#include <string.h>
#include <glib.h>
+#include <glib-object.h>
#include <gegl-region.h>
#include "gegl-region-generic.h"
Modified: trunk/gegl/buffer/gegl-tile.c
==============================================================================
--- trunk/gegl/buffer/gegl-tile.c (original)
+++ trunk/gegl/buffer/gegl-tile.c Mon Jan 21 00:14:07 2008
@@ -18,6 +18,7 @@
#include "config.h"
#include <glib.h>
+#include <glib-object.h>
#include <glib/gprintf.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
Modified: trunk/gegl/gegl-chant.h
==============================================================================
--- trunk/gegl/gegl-chant.h (original)
+++ trunk/gegl/gegl-chant.h Mon Jan 21 00:14:07 2008
@@ -1,3 +1,27 @@
+/* gegl-chant contains incantations to that produce the boilerplate
+ * needed to write GEGL operation plug-ins. It abstracts away inheritance
+ * by giving a limited amount of base classes, and reduced creation of
+ * a properties struct and registration of properties for that structure to
+ * a minimum amount of code through use of the C preprocessor. You should
+ * look at the operations implemented using chanting (they #include this file)
+ * to see how it is used in practice.
+ *
+ * GEGL is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * GEGL is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GEGL; if not, see <http://www.gnu.org/licenses/>.
+ *
+ * 2006-2008 Â Ãyvind KolÃs.
+ */
+
#ifndef GEGL_CHANT_SELF
#error "GEGL_CHANT_SELF not defined"
#endif
@@ -9,60 +33,66 @@
#include <string.h>
#include <glib-object.h>
-#include <gegl-plugin.h>
+#include <gegl.h>
+#include <gegl-utils.h>
+#include <gegl-buffer.h>
+#include <operation/gegl-operation.h>
+/*#include "property-types/gegl-color.h"*/
+#include <gegl-paramspecs.h>
+
#ifdef GEGL_CHANT_SOURCE
- #include <gegl/operation/gegl-operation-source.h>
- #include <gegl/operation/gegl-extension-handler.h>
+ #include <operation/gegl-operation-source.h>
+ #include <operation/gegl-extension-handler.h>
#define GEGL_CHANT_PARENT_TypeName GeglOperationSource
#define GEGL_CHANT_PARENT_TypeNameClass GeglOperationSourceClass
#define GEGL_CHANT_PARENT_TYPE GEGL_TYPE_OPERATION_SOURCE
#define GEGL_CHANT_PARENT_CLASS GEGL_OPERATION_SOURCE_CLASS
#endif
#ifdef GEGL_CHANT_SINK
- #include <gegl/operation/gegl-operation-sink.h>
+ #include <operation/gegl-operation-sink.h>
#define GEGL_CHANT_PARENT_TypeName GeglOperationSink
#define GEGL_CHANT_PARENT_TypeNameClass GeglOperationSinkClass
#define GEGL_CHANT_PARENT_TYPE GEGL_TYPE_OPERATION_SINK
#define GEGL_CHANT_PARENT_CLASS GEGL_OPERATION_SINK_CLASS
#endif
#ifdef GEGL_CHANT_FILTER
- #include <gegl/operation/gegl-operation-filter.h>
+ #include <operation/gegl-operation-filter.h>
#define GEGL_CHANT_PARENT_TypeName GeglOperationFilter
#define GEGL_CHANT_PARENT_TypeNameClass GeglOperationFilterClass
#define GEGL_CHANT_PARENT_TYPE GEGL_TYPE_OPERATION_FILTER
#define GEGL_CHANT_PARENT_CLASS GEGL_OPERATION_FILTER_CLASS
#endif
#ifdef GEGL_CHANT_POINT_FILTER
- #include <gegl/operation/gegl-operation-point-filter.h>
+ #include <operation/gegl-operation-point-filter.h>
#define GEGL_CHANT_PARENT_TypeName GeglOperationPointFilter
#define GEGL_CHANT_PARENT_TypeNameClass GeglOperationPointFilterClass
#define GEGL_CHANT_PARENT_TYPE GEGL_TYPE_OPERATION_POINT_FILTER
#define GEGL_CHANT_PARENT_CLASS GEGL_OPERATION_POINT_FILTER_CLASS
#endif
#ifdef GEGL_CHANT_AREA_FILTER
- #include <gegl/operation/gegl-operation-area-filter.h>
+ #include <operation/gegl-operation-area-filter.h>
#define GEGL_CHANT_PARENT_TypeName GeglOperationAreaFilter
#define GEGL_CHANT_PARENT_TypeNameClass GeglOperationAreaFilterClass
#define GEGL_CHANT_PARENT_TYPE GEGL_TYPE_OPERATION_AREA_FILTER
#define GEGL_CHANT_PARENT_CLASS GEGL_OPERATION_AREA_FILTER_CLASS
#endif
#ifdef GEGL_CHANT_COMPOSER
- #include <gegl/operation/gegl-operation-composer.h>
+ #include <operation/gegl-operation-composer.h>
#define GEGL_CHANT_PARENT_TypeName GeglOperationComposer
#define GEGL_CHANT_PARENT_TypeNameClass GeglOperationComposerClass
#define GEGL_CHANT_PARENT_TYPE GEGL_TYPE_OPERATION_COMPOSER
#define GEGL_CHANT_PARENT_CLASS GEGL_OPERATION_COMPOSER_CLASS
#endif
#ifdef GEGL_CHANT_POINT_COMPOSER
- #include <gegl/operation/gegl-operation-point-composer.h>
+ #include <operation/gegl-operation-point-composer.h>
#define GEGL_CHANT_PARENT_TypeName GeglOperationPointComposer
#define GEGL_CHANT_PARENT_TypeNameClass GeglOperationPointComposerClass
#define GEGL_CHANT_PARENT_TYPE GEGL_TYPE_OPERATION_POINT_COMPOSER
#define GEGL_CHANT_PARENT_CLASS GEGL_OPERATION_POINT_COMPOSER_CLASS
#endif
#ifdef GEGL_CHANT_META
- #include <gegl/operation/gegl-operation-meta.h>
+ #include <operation/gegl-operation-meta.h>
#define GEGL_CHANT_PARENT_TypeName GeglOperationMeta
#define GEGL_CHANT_PARENT_TypeNameClass GeglOperationMetaClass
#define GEGL_CHANT_PARENT_TYPE GEGL_TYPE_OPERATION_META
@@ -118,7 +148,8 @@
#define GEGL_CHANT_OPERATION(obj) ((GeglChantOperation*)(obj))
-#include <gegl-module.h>
+#include <geglmoduletypes.h>
+#include <geglmodule.h>
#ifndef GEGL_CHANT_STATIC
# define M_DEFINE_TYPE_EXTENDED(type_name, TYPE_PARENT, flags, CODE) \
@@ -731,5 +762,4 @@
#undef gegl_chant_vector
}
-
/****************************************************************************/
Modified: trunk/gegl/gegl-dot.c
==============================================================================
--- trunk/gegl/gegl-dot.c (original)
+++ trunk/gegl/gegl-dot.c Mon Jan 21 00:14:07 2008
@@ -16,10 +16,17 @@
* 2006 Â Ãyvind KolÃs.
*/
+/* FIXME: this file should be implemented using public API only */
#include <stdio.h>
#include <string.h>
-#include "gegl-plugin.h"
+#include <glib-object.h>
+#define GEGL_INTERNAL
+#include "gegl-types.h"
+#include "graph/gegl-node.h"
+#include "graph/gegl-pad.h"
+#include "graph/gegl-connection.h"
+#include "gegl.h"
static void
gegl_add_graph (GString *string,
Modified: trunk/gegl/gegl-types.h
==============================================================================
--- trunk/gegl/gegl-types.h (original)
+++ trunk/gegl/gegl-types.h Mon Jan 21 00:14:07 2008
@@ -22,8 +22,29 @@
G_BEGIN_DECLS
+#ifndef __GEGL_H__
typedef struct _GeglColor GeglColor;
typedef struct _GeglCurve GeglCurve;
+typedef struct _GeglNode GeglNode;
+typedef struct _GeglVector GeglVector;
+typedef struct _GeglProcessor GeglProcessor;
+typedef struct _GeglRectangle GeglRectangle;
+
+struct _GeglRectangle
+{
+ gint x;
+ gint y;
+ gint width;
+ gint height;
+};
+
+typedef enum
+{
+ GEGL_PARAM_PAD_OUTPUT = 1 << G_PARAM_USER_SHIFT,
+ GEGL_PARAM_PAD_INPUT = 1 << (G_PARAM_USER_SHIFT + 1)
+} GeglPadType;
+
+#endif
typedef struct _GeglCRVisitor GeglCRVisitor;
typedef struct _GeglDebugRectVisitor GeglDebugRectVisitor;
typedef struct _GeglEvalMgr GeglEvalMgr;
@@ -32,7 +53,6 @@
typedef struct _GeglGraph GeglGraph;
typedef struct _GeglHaveVisitor GeglHaveVisitor;
typedef struct _GeglNeedVisitor GeglNeedVisitor;
-typedef struct _GeglNode GeglNode;
#ifndef GEGL_OPERATION_TYPE
#define GEGL_OPERATION_TYPE
typedef struct _GeglPad GeglPad;
@@ -40,24 +60,13 @@
typedef struct _GeglNodeContext GeglNodeContext;
typedef struct _GeglConnection GeglConnection;
#endif
-typedef struct _GeglVector GeglVector;
-typedef struct _GeglProcessor GeglProcessor;
typedef struct _GeglPrepareVisitor GeglPrepareVisitor;
typedef struct _GeglVisitable GeglVisitable; /* dummy typedef */
typedef struct _GeglVisitor GeglVisitor;
-typedef struct _GeglRectangle GeglRectangle;
typedef struct _GeglPoint GeglPoint;
typedef struct _GeglDimension GeglDimension;
-struct _GeglRectangle
-{
- gint x;
- gint y;
- gint width;
- gint height;
-};
-
struct _GeglPoint
{
gint x;
@@ -70,6 +79,7 @@
gint height;
};
+
G_END_DECLS
#endif /* __GEGL_TYPES_H__ */
Modified: trunk/gegl/gegl.h
==============================================================================
--- trunk/gegl/gegl.h (original)
+++ trunk/gegl/gegl.h Mon Jan 21 00:14:07 2008
@@ -760,6 +760,7 @@
#ifndef GEGL_INTERNAL
+#ifndef GEGL_TYPE_COLOR
/***
@@ -780,6 +781,7 @@
#define GEGL_COLOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_COLOR, GeglColor))
#define GEGL_IS_COLOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_COLOR))
#endif
+#endif
/**
* gegl_color_new:
@@ -931,7 +933,15 @@
gdouble *xs,
gdouble *ys);
+#ifndef GEGL_INTERNAL
+typedef enum
+{
+ GEGL_PARAM_PAD_OUTPUT = 1 << G_PARAM_USER_SHIFT,
+ GEGL_PARAM_PAD_INPUT = 1 << (G_PARAM_USER_SHIFT + 1)
+} GeglPadType;
+
+#endif
G_END_DECLS
Modified: trunk/gegl/graph/gegl-pad.h
==============================================================================
--- trunk/gegl/graph/gegl-pad.h (original)
+++ trunk/gegl/graph/gegl-pad.h Mon Jan 21 00:14:07 2008
@@ -24,12 +24,6 @@
G_BEGIN_DECLS
-typedef enum
-{
- GEGL_PARAM_PAD_OUTPUT = 1 << G_PARAM_USER_SHIFT,
- GEGL_PARAM_PAD_INPUT = 1 << (G_PARAM_USER_SHIFT + 1)
-} GeglPadType;
-
#define GEGL_TYPE_PAD (gegl_pad_get_type ())
#define GEGL_PAD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_PAD, GeglPad))
Modified: trunk/gegl/module/geglmodule.h
==============================================================================
--- trunk/gegl/module/geglmodule.h (original)
+++ trunk/gegl/module/geglmodule.h Mon Jan 21 00:14:07 2008
@@ -31,8 +31,8 @@
/* increment the ABI version each time one of the following changes:
*
* - the libgeglmodule implementation (if the change affects modules).
- * - one of the classes implemented by modules (currently GeglColorDisplay,
- * GeglColorSelector and GeglController).
+ * - GeglOperation or one of it's base classes changes. (XXX:
+ * should be extended so a range of abi versions are accepted.
*/
#define GEGL_MODULE_ABI_VERSION 0x0004
@@ -63,7 +63,6 @@
gchar *date;
};
-
typedef const GeglModuleInfo * (* GeglModuleQueryFunc) (GTypeModule *module);
typedef gboolean (* GeglModuleRegisterFunc) (GTypeModule *module);
Modified: trunk/gegl/module/geglmoduletypes.h
==============================================================================
--- trunk/gegl/module/geglmoduletypes.h (original)
+++ trunk/gegl/module/geglmoduletypes.h Mon Jan 21 00:14:07 2008
@@ -19,9 +19,6 @@
G_BEGIN_DECLS
-/* For information look into the C source or the html documentation */
-
-
#ifndef GEGL_DISABLE_DEPRECATED
/*
* GEGL_MODULE_PARAM_SERIALIZE is deprecated, use
Modified: trunk/operations/Makefile-operations.am
==============================================================================
--- trunk/operations/Makefile-operations.am (original)
+++ trunk/operations/Makefile-operations.am Mon Jan 21 00:14:07 2008
@@ -13,7 +13,13 @@
all-local: $(SOBJS)
CFLAGS += @DEP_CFLAGS@ @BABL_CFLAGS@ @CPPFLAGS@ \
- -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/gegl -I$(top_srcdir)/gegl/buffer -I. -fPIC
+ -I$(srcdir) -I$(top_srcdir) \
+ -I$(top_srcdir)/gegl \
+ -I$(top_srcdir)/gegl/buffer \
+ -I$(top_srcdir)/gegl/operation \
+ -I$(top_srcdir)/gegl/property-types \
+ -I$(top_srcdir)/gegl/module \
+ -I. -fPIC
LDFLAGS += -shared $(no_undefined)
LDADD = @DEP_LIBS@ @BABL_LIBS@ $(libgegldlla)
Modified: trunk/operations/color/mono-mixer.c
==============================================================================
--- trunk/operations/color/mono-mixer.c (original)
+++ trunk/operations/color/mono-mixer.c Mon Jan 21 00:14:07 2008
@@ -73,7 +73,7 @@
out_pixel += 2;
}
- gegl_buffer_set (output, result, output->format, out_buf,
+ gegl_buffer_set (output, result, NULL, out_buf,
GEGL_AUTO_ROWSTRIDE);
g_free (in_buf);
Modified: trunk/operations/io/exr-load.cpp
==============================================================================
--- trunk/operations/io/exr-load.cpp (original)
+++ trunk/operations/io/exr-load.cpp Mon Jan 21 00:14:07 2008
@@ -240,7 +240,7 @@
for (y=0; y<2; y++)
{
gegl_rectangle_set (&rect, 0,y, gegl_buffer_get_width (buf), 1);
- gegl_buffer_get (buf, 1.0, &rect, buf->format, row[y+1], GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_get (buf, 1.0, &rect, NULL, row[y+1], GEGL_AUTO_ROWSTRIDE);
}
fix_saturation_row (row[1], row[1], row[2], yw, gegl_buffer_get_width (buf), nc);
@@ -250,11 +250,11 @@
if (y>1)
{
gegl_rectangle_set (&rect, 0, y-2, gegl_buffer_get_width (buf), 1);
- gegl_buffer_set (buf, &rect, buf->format, row[0], GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_set (buf, &rect, NULL, row[0], GEGL_AUTO_ROWSTRIDE);
}
gegl_rectangle_set (&rect, 0,y+1, gegl_buffer_get_width (buf), 1);
- gegl_buffer_get (buf, 1.0, &rect, buf->format, row[0], GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_get (buf, 1.0, &rect, NULL, row[0], GEGL_AUTO_ROWSTRIDE);
tmp = row[0];
row[0] = row[1];
@@ -269,7 +269,7 @@
for (y=gegl_buffer_get_height (buf)-2; y<gegl_buffer_get_height (buf); y++)
{
gegl_rectangle_set (&rect, 0, y, gegl_buffer_get_width (buf), 1);
- gegl_buffer_set (buf, &rect, buf->format, row[y-gegl_buffer_get_height (buf)+2], GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_set (buf, &rect, NULL, row[y-gegl_buffer_get_height (buf)+2], GEGL_AUTO_ROWSTRIDE);
}
for (y=0; y<3; y++)
@@ -335,19 +335,19 @@
for (i=0; i<gegl_buffer_get_height (buf); i+=2)
{
gegl_rectangle_set (&rect, 0, i, gegl_buffer_get_width (buf), 1);
- gegl_buffer_get (buf, 1.0, &rect, buf->format, pixels, GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_get (buf, 1.0, &rect, NULL, pixels, GEGL_AUTO_ROWSTRIDE);
reconstruct_chroma_row (pixels, gegl_buffer_get_width (buf), has_alpha, tmp);
- gegl_buffer_set (buf, &rect, buf->format, pixels, GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_set (buf, &rect, NULL, pixels, GEGL_AUTO_ROWSTRIDE);
}
for (i=0; i<gegl_buffer_get_width (buf); i++)
{
gegl_rectangle_set (&rect, i, 0, 1, gegl_buffer_get_height (buf));
- gegl_buffer_get (buf, 1.0, &rect, buf->format, pixels, GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_get (buf, 1.0, &rect, NULL, pixels, GEGL_AUTO_ROWSTRIDE);
reconstruct_chroma_row (pixels, gegl_buffer_get_height (buf), has_alpha, tmp);
- gegl_buffer_set (buf, &rect, buf->format, pixels, GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_set (buf, &rect, NULL, pixels, GEGL_AUTO_ROWSTRIDE);
}
g_free (tmp);
@@ -372,7 +372,7 @@
for (row=0; row<gegl_buffer_get_height (buf); row++)
{
gegl_rectangle_set (&rect, 0, row, gegl_buffer_get_width (buf), 1);
- gegl_buffer_get (buf, 1.0, &rect, buf->format, pixels, GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_get (buf, 1.0, &rect, NULL, pixels, GEGL_AUTO_ROWSTRIDE);
pxl = (gfloat*) pixels;
for (i=0; i<gegl_buffer_get_width (buf); i++)
@@ -392,7 +392,7 @@
pxl += dx;
}
- gegl_buffer_set (buf, &rect, buf->format, pixels, GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_set (buf, &rect, NULL, pixels, GEGL_AUTO_ROWSTRIDE);
}
g_free (pixels);
@@ -484,7 +484,7 @@
{
gegl_rectangle_set (&rect, 0, i-dw.min.y,gegl_buffer_get_width (gegl_buffer), 1);
file.readPixels (i);
- gegl_buffer_set (gegl_buffer, &rect, gegl_buffer->format, pixels, GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_set (gegl_buffer, &rect, NULL, pixels, GEGL_AUTO_ROWSTRIDE);
}
}
Modified: trunk/operations/io/load-buffer.c
==============================================================================
--- trunk/operations/io/load-buffer.c (original)
+++ trunk/operations/io/load-buffer.c Mon Jan 21 00:14:07 2008
@@ -27,6 +27,8 @@
#define GEGL_CHANT_CATEGORIES "programming:input"
#define GEGL_CHANT_CLASS_INIT
#include "gegl-chant.h"
+#include "gegl-buffer.h"
+#include "graph/gegl-node-context.h"
static void
dispose (GObject *object)
Modified: trunk/operations/io/load.c
==============================================================================
--- trunk/operations/io/load.c (original)
+++ trunk/operations/io/load.c Mon Jan 21 00:14:07 2008
@@ -157,11 +157,18 @@
GeglNode *node = operation->node;
Priv *priv = (Priv*)GEGL_CHANT_OPERATION (operation)->priv;
GeglNode *output = priv->output;
+ GeglRectangle bounds;
- if (x >= output->have_rect.x &&
- y >= output->have_rect.y &&
- x < output->have_rect.x + output->have_rect.width &&
- y < output->have_rect.y + output->have_rect.height )
+ bounds = gegl_node_get_bounding_box (output); /* hopefully this is
+ as correct as original
+ which was peeking
+ directly into output->have_rect
+ */
+
+ if (x >= bounds.x &&
+ y >= bounds.y &&
+ x < bounds.x + bounds.width &&
+ y < bounds.y + bounds.height )
return node;
return NULL;
}
Modified: trunk/operations/io/png-save.c
==============================================================================
--- trunk/operations/io/png-save.c (original)
+++ trunk/operations/io/png-save.c Mon Jan 21 00:14:07 2008
@@ -92,8 +92,11 @@
strcpy (format_string, "R'G'B'A ");
{
- const Babl *babl= gegl_buffer->format;
- BablType **type = babl->format.type;
+ const Babl *babl; /*= gegl_buffer->format;*/
+ BablType **type;
+
+ g_object_get (gegl_buffer, "format", &babl, NULL);
+ type = babl->format.type;
for (i=0; i<babl->format.components; i++)
if ((*type)->bits > 8)
Modified: trunk/operations/io/save-pixbuf.c
==============================================================================
--- trunk/operations/io/save-pixbuf.c (original)
+++ trunk/operations/io/save-pixbuf.c Mon Jan 21 00:14:07 2008
@@ -49,7 +49,7 @@
gint bps;
guint i;
- babl = input->format;
+ g_object_get (input, "format", &babl, NULL);
format = (BablFormat*) babl;
has_alpha = FALSE;
Modified: trunk/operations/render/checkerboard.c
==============================================================================
--- trunk/operations/render/checkerboard.c (original)
+++ trunk/operations/render/checkerboard.c Mon Jan 21 00:14:07 2008
@@ -35,6 +35,7 @@
#define GEGL_CHANT_CLASS_INIT
#define GEGL_CHANT_PREPARE
+
#include "gegl-chant.h"
static void
Modified: trunk/operations/render/introspect.c
==============================================================================
--- trunk/operations/render/introspect.c (original)
+++ trunk/operations/render/introspect.c Mon Jan 21 00:14:07 2008
@@ -28,13 +28,12 @@
#define GEGL_CHANT_CATEGORIES "render"
#define GEGL_CHANT_SOURCE
-#include "gegl-chant.h"
+#include "gegl-chant.h"
+#include "gegl-dot.h"
#include <stdio.h>
#include <string.h>
-#include "gegl-plugin.h"
-#include "gegl-dot.h"
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]