index eab5bb8beae0fd6dbc2aeb3fa4b84e2051f736a6..747ceeb4f1195470fd7ed3c3fc438fa975397e3b 100644 (file)
--- a/src/sp-fecolormatrix.cpp
+++ b/src/sp-fecolormatrix.cpp
#include "attributes.h"
#include "svg/svg.h"
-#include "sp-fecolorMatrix.h"
+#include "sp-fecolormatrix.h"
#include "xml/repr.h"
-//#define SP_MACROS_SILENT
-//#include "macros.h"
-
-#define DEBUG_FECOLORMATRIX
-#ifdef DEBUG_FECOLORMATRIX
-# define debug(f, a...) { g_print("%s(%d) %s:", \
- __FILE__,__LINE__,__FUNCTION__); \
- g_print(f, ## a); \
- g_print("\n"); \
- }
-#else
-# define debug(f, a...) /**/
-#endif
/* FeColorMatrix base class */
static void sp_feColorMatrix_update(SPObject *object, SPCtx *ctx, guint flags);
static Inkscape::XML::Node *sp_feColorMatrix_write(SPObject *object, Inkscape::XML::Node *repr, guint flags);
-static SPObjectClass *feColorMatrix_parent_class;
+static SPFilterPrimitiveClass *feColorMatrix_parent_class;
GType
sp_feColorMatrix_get_type()
(GInstanceInitFunc) sp_feColorMatrix_init,
NULL, /* value_table */
};
- feColorMatrix_type = g_type_register_static(SP_TYPE_OBJECT, "SPFeColorMatrix", &feColorMatrix_info, (GTypeFlags)0);
+ feColorMatrix_type = g_type_register_static(SP_TYPE_FILTER_PRIMITIVE, "SPFeColorMatrix", &feColorMatrix_info, (GTypeFlags)0);
}
return feColorMatrix_type;
}
{
SPObjectClass *sp_object_class = (SPObjectClass *)klass;
- feColorMatrix_parent_class = (SPObjectClass*)g_type_class_peek_parent(klass);
+ feColorMatrix_parent_class = (SPFilterPrimitiveClass*)g_type_class_peek_parent(klass);
sp_object_class->build = sp_feColorMatrix_build;
sp_object_class->release = sp_feColorMatrix_release;
static void
sp_feColorMatrix_init(SPFeColorMatrix *feColorMatrix)
{
- debug("0x%p",feColorMatrix);
}
/**
static void
sp_feColorMatrix_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
- debug("0x%p",object);
if (((SPObjectClass *) feColorMatrix_parent_class)->build) {
((SPObjectClass *) feColorMatrix_parent_class)->build(object, document, repr);
}
static void
sp_feColorMatrix_release(SPObject *object)
{
- debug("0x%p",object);
-
if (((SPObjectClass *) feColorMatrix_parent_class)->release)
((SPObjectClass *) feColorMatrix_parent_class)->release(object);
}
static void
sp_feColorMatrix_set(SPObject *object, unsigned int key, gchar const *value)
{
- debug("0x%p %s(%u): '%s'",object,
- sp_attribute_name(key),key,value);
SPFeColorMatrix *feColorMatrix = SP_FECOLORMATRIX(object);
+ (void)feColorMatrix;
- switch(key) {\r
+ switch(key) {
/*DEAL WITH SETTING ATTRIBUTES HERE*/
default:
if (((SPObjectClass *) feColorMatrix_parent_class)->set)
static void
sp_feColorMatrix_update(SPObject *object, SPCtx *ctx, guint flags)
{
- debug("0x%p",object);
-
if (flags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG |
SP_OBJECT_VIEWPORT_MODIFIED_FLAG)) {
static Inkscape::XML::Node *
sp_feColorMatrix_write(SPObject *object, Inkscape::XML::Node *repr, guint flags)
{
- debug("0x%p",object);
-
// Inkscape-only object, not copied during an "plain SVG" dump:
if (flags & SP_OBJECT_WRITE_EXT) {
if (repr) {
// is this sane?
repr->mergeFrom(SP_OBJECT_REPR(object), "id");
} else {
- repr = SP_OBJECT_REPR(object)->duplicate();
+ repr = SP_OBJECT_REPR(object)->duplicate(NULL); // FIXME
}
}