Commit 217e658f authored by Øyvind Kolås's avatar Øyvind Kolås

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:

svn path=/trunk/; revision=1874
parent 7edd3e00
2008-01-21 Øyvind Kolås <pippin@gimp.org>
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:
2008-01-20 Øyvind Kolås <pippin@gimp.org>
* gegl/process/gegl-processor.c: reverted commit to use GSLice for
......
......@@ -52,4 +52,12 @@ AM_CPPFLAGS = -DLIBDIR=\""$(libdir)"\"
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
......@@ -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>
......
......@@ -23,6 +23,7 @@
#endif
#include <string.h>
#include <glib.h>
#include <glib-object.h>
#include <glib/gstdio.h>
#ifdef G_OS_WIN32
......
......@@ -24,6 +24,7 @@
#endif
#include <string.h>
#include <glib.h>
#include <glib-object.h>
#include <glib/gstdio.h>
#ifdef G_OS_WIN32
......
......@@ -17,6 +17,7 @@
*/
#include <glib.h>
#include <glib-object.h>
#include <glib/gstdio.h>
#include "../gegl-types.h"
......
......@@ -19,6 +19,7 @@
#include <glib.h>
#include <glib/gstdio.h>
#include <glib-object.h>
#include "../gegl-types.h"
#include "gegl-buffer.h"
......
......@@ -73,6 +73,7 @@
#include <string.h>
#include <glib.h>
#include <glib-object.h>
#include <gegl-region.h>
#include "gegl-region-generic.h"
......
......@@ -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>
......
/* 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 @@ struct GeneratedClass
#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 @@ gegl_chant_class_init (ChantClass * klass)
#undef gegl_chant_vector
}
/****************************************************************************/
......@@ -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,
......
......@@ -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 _GeglFinishVisitor GeglFinishVisitor;
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 _GeglOperation GeglOperation;
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 @@ struct _GeglDimension
gint height;
};
G_END_DECLS
#endif /* __GEGL_TYPES_H__ */
......@@ -760,6 +760,7 @@ void gegl_processor_destroy (GeglProcessor *processor);
#ifndef GEGL_INTERNAL
#ifndef GEGL_TYPE_COLOR
/***
......@@ -780,6 +781,7 @@ GType gegl_color_get_type (void) G_GNUC_CONST;
#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 @@ void gegl_vector_calc_values (GeglVector *self,
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
......
......@@ -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))
......
......@@ -31,8 +31,8 @@ G_BEGIN_DECLS
/* 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 @@ struct _GeglModuleInfo
gchar *date;
};
typedef const GeglModuleInfo * (* GeglModuleQueryFunc) (GTypeModule *module);
typedef gboolean (* GeglModuleRegisterFunc) (GTypeModule *module);
......
......@@ -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
......
......@@ -13,7 +13,13 @@ EXTRA_DIST = $(wildcard *.c) $(wildcard *.h)
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)
......
......@@ -73,7 +73,7 @@ process (GeglOperation *operation,
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);
......
......@@ -240,7 +240,7 @@ fix_saturation (GeglBuffer *buf,
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 @@ fix_saturation (GeglBuffer *buf,
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 @@ fix_saturation (GeglBuffer *buf,
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 @@ reconstruct_chroma (GeglBuffer *buf,
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 @@ convert_yca_to_rgba (GeglBuffer *buf,
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 @@ convert_yca_to_rgba (GeglBuffer *buf,
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 @@ import_exr (GeglBuffer *gegl_buffer,
{
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);
}
}
......
......@@ -27,6 +27,8 @@ gegl_chant_object (buffer, "GeglBuffer to use")
#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)
......
......@@ -157,11 +157,18 @@ detect (GeglOperation *operation,
GeglNode *node = operation->node;
Priv *priv = (Priv*)GEGL_CHANT_OPERATION (operation)->priv;
GeglNode *output = priv->output;
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 )
GeglRectangle bounds;
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;
}
......
......@@ -92,8 +92,11 @@ gegl_buffer_export_png (GeglBuffer *gegl_buffer,
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)
......
......@@ -49,7 +49,7 @@ process (GeglOperation *operation,
gint bps;
guint i;
babl = input->format;
g_object_get (input, "format", &babl, NULL);
format = (BablFormat*) babl;
has_alpha = FALSE;
......
......@@ -35,6 +35,7 @@ gegl_chant_color (color2, "white", "The other cell color (defa
#define GEGL_CHANT_CLASS_INIT
#define GEGL_CHANT_PREPARE
#include "gegl-chant.h"
static void
......
......@@ -28,13 +28,12 @@ gegl_chant_pointer(buf, "Buffer")
#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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment