Index: src/sp-fecomponenttransfer-funcnode.cpp
===================================================================
--- src/sp-fecomponenttransfer-funcnode.cpp	(revis��o 0)
+++ src/sp-fecomponenttransfer-funcnode.cpp	(revis��o 0)
@@ -0,0 +1,278 @@
+#define __SP_FEFUNCNODE_CPP__
+
+/** \file
+ * SVG <funcR>, <funcG>, <funcB> and <funcA> implementations.
+ */
+/*
+ * Authors:
+ *   Hugo Rodrigues <haa.rodrigues@gmail.com>
+ *   Niko Kiirala <niko@kiirala.com>
+ *   Felipe Corr��a da Silva Sanches <felipe.sanches@gmail.com>
+ * 
+ * Copyright (C) 2006, 2007, 2008 Authors
+ *
+ * Released under GNU GPL, read the file 'COPYING' for more information
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <glib.h>
+
+#include "attributes.h"
+#include "document.h"
+#include "sp-fecomponenttransfer.h"
+#include "sp-fecomponenttransfer-funcnode.h"
+#include "display/nr-filter-component-transfer.h"
+#include "xml/repr.h"
+#include "helper-fns.h"
+
+#define SP_MACROS_SILENT
+#include "macros.h"
+
+/* FeFuncNode class */
+
+static void sp_fefuncnode_class_init(SPFeFuncNodeClass *klass);
+static void sp_fefuncnode_init(SPFeFuncNode *fefuncnode);
+
+static void sp_fefuncnode_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
+static void sp_fefuncnode_release(SPObject *object);
+static void sp_fefuncnode_set(SPObject *object, unsigned int key, gchar const *value);
+static void sp_fefuncnode_update(SPObject *object, SPCtx *ctx, guint flags);
+static Inkscape::XML::Node *sp_fefuncnode_write(SPObject *object, Inkscape::XML::Node *repr, guint flags);
+
+static SPObjectClass *feFuncNode_parent_class;
+
+GType
+sp_fefuncnode_get_type()
+{
+    static GType fefuncnode_type = 0;
+
+    if (!fefuncnode_type) {
+        GTypeInfo fefuncnode_info = {
+            sizeof(SPFeFuncNodeClass),
+            NULL, NULL,
+            (GClassInitFunc) sp_fefuncnode_class_init,
+            NULL, NULL,
+            sizeof(SPFeFuncNode),
+            16,
+            (GInstanceInitFunc) sp_fefuncnode_init,
+            NULL,    /* value_table */
+        };
+        fefuncnode_type = g_type_register_static(SP_TYPE_OBJECT, "SPFeFuncNode", &fefuncnode_info, (GTypeFlags)0);
+    }
+    return fefuncnode_type;
+}
+
+static void
+sp_fefuncnode_class_init(SPFeFuncNodeClass *klass)
+{
+
+    SPObjectClass *sp_object_class = (SPObjectClass *)klass;
+
+    feFuncNode_parent_class = (SPObjectClass*)g_type_class_peek_parent(klass);
+
+    sp_object_class->build = sp_fefuncnode_build;
+    sp_object_class->release = sp_fefuncnode_release;
+    sp_object_class->write = sp_fefuncnode_write;
+    sp_object_class->set = sp_fefuncnode_set;
+    sp_object_class->update = sp_fefuncnode_update;
+}
+
+static void
+sp_fefuncnode_init(SPFeFuncNode *fefuncnode)
+{
+    fefuncnode->type = NR::COMPONENTTRANSFER_TYPE_IDENTITY;
+    //fefuncnode->tableValues = NULL;
+    fefuncnode->slope = 1;
+    fefuncnode->intercept = 0;
+    fefuncnode->amplitude = 1;
+    fefuncnode->exponent = 1;
+    fefuncnode->offset = 0;
+}
+
+/**
+ * Reads the Inkscape::XML::Node, and initializes SPDistantLight variables.  For this to get called,
+ * our name must be associated with a repr via "sp_object_type_register".  Best done through
+ * sp-object-repr.cpp's repr_name_entries array.
+ */
+static void
+sp_fefuncnode_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
+{
+    if (((SPObjectClass *) feFuncNode_parent_class)->build) {
+        ((SPObjectClass *) feFuncNode_parent_class)->build(object, document, repr);
+    }
+
+    //Read values of key attributes from XML nodes into object.
+    sp_object_read_attr(object, "type");
+    sp_object_read_attr(object, "tableValues");
+    sp_object_read_attr(object, "slope");
+    sp_object_read_attr(object, "intercept");
+    sp_object_read_attr(object, "amplitude");
+    sp_object_read_attr(object, "expoent");
+    sp_object_read_attr(object, "offset");
+    
+
+//is this necessary?
+    sp_document_add_resource(document, "fefuncnode", object); //maybe feFuncR, fefuncG, feFuncB and fefuncA ?
+}
+
+/**
+ * Drops any allocated memory.
+ */
+static void
+sp_fefuncnode_release(SPObject *object)
+{
+    //SPFeFuncNode *fefuncnode = SP_FEFUNCNODE(object);
+
+    if (SP_OBJECT_DOCUMENT(object)) {
+        /* Unregister ourselves */
+        sp_document_remove_resource(SP_OBJECT_DOCUMENT(object), "fefuncnode", SP_OBJECT(object));
+    }
+
+//TODO: release resources here
+}
+
+static NR::FilterComponentTransferType sp_feComponenttransfer_read_type(gchar const *value){
+    if (!value) return NR::COMPONENTTRANSFER_TYPE_ERROR; //type attribute is REQUIRED.
+    switch(value[0]){
+        case 'i':
+            if (strncmp(value, "identity", 8) == 0) return NR::COMPONENTTRANSFER_TYPE_IDENTITY;
+            break;
+        case 't':
+            if (strncmp(value, "table", 5) == 0) return NR::COMPONENTTRANSFER_TYPE_TABLE;
+            break;
+        case 'd':
+            if (strncmp(value, "discrete", 8) == 0) return NR::COMPONENTTRANSFER_TYPE_DISCRETE;
+            break;
+        case 'l':
+            if (strncmp(value, "linear", 6) == 0) return NR::COMPONENTTRANSFER_TYPE_LINEAR;
+            break;
+        case 'g':
+            if (strncmp(value, "gamma", 5) == 0) return NR::COMPONENTTRANSFER_TYPE_GAMMA;
+            break;
+    }
+    return NR::COMPONENTTRANSFER_TYPE_ERROR; //type attribute is REQUIRED.
+}
+
+/**
+ * Sets a specific value in the SPFeFuncNode.
+ */
+static void
+sp_fefuncnode_set(SPObject *object, unsigned int key, gchar const *value)
+{
+    SPFeFuncNode *feFuncNode = SP_FEFUNCNODE(object);
+    NR::FilterComponentTransferType type;
+    double read_num;
+    switch(key) {
+        case SP_ATTR_TYPE:
+            type = sp_feComponenttransfer_read_type(value);
+            if(type != feFuncNode->type) {
+                feFuncNode->type = type;
+                object->parent->requestModified(SP_OBJECT_MODIFIED_FLAG);
+            }
+            break;
+        case SP_ATTR_TABLEVALUES:
+        //TODO
+            break;
+        case SP_ATTR_SLOPE:
+            read_num = helperfns_read_number(value);
+            if (read_num != feFuncNode->slope) {
+                feFuncNode->slope = read_num;
+                object->parent->requestModified(SP_OBJECT_MODIFIED_FLAG);
+            }
+            break;
+        case SP_ATTR_INTERCEPT:
+            read_num = helperfns_read_number(value);
+            if (read_num != feFuncNode->intercept) {
+                feFuncNode->intercept = read_num;
+                object->parent->requestModified(SP_OBJECT_MODIFIED_FLAG);
+            }
+            break;
+        case SP_ATTR_AMPLITUDE:
+            read_num = helperfns_read_number(value);
+            if (read_num != feFuncNode->amplitude) {
+                feFuncNode->amplitude = read_num;
+                object->parent->requestModified(SP_OBJECT_MODIFIED_FLAG);
+            }
+            break;
+        case SP_ATTR_EXPONENT:
+            read_num = helperfns_read_number(value);
+            if (read_num != feFuncNode->exponent) {
+                feFuncNode->exponent = read_num;
+                object->parent->requestModified(SP_OBJECT_MODIFIED_FLAG);
+            }
+            break;
+        case SP_ATTR_OFFSET:
+            read_num = helperfns_read_number(value);
+            if (read_num != feFuncNode->offset) {
+                feFuncNode->offset = read_num;
+                object->parent->requestModified(SP_OBJECT_MODIFIED_FLAG);
+            }
+            break;
+        default:
+            if (((SPObjectClass *) feFuncNode_parent_class)->set)
+                ((SPObjectClass *) feFuncNode_parent_class)->set(object, key, value);
+            break;
+    }
+}
+
+/**
+ *  * Receives update notifications.
+ *   */
+static void
+sp_fefuncnode_update(SPObject *object, SPCtx *ctx, guint flags)
+{
+    SPFeFuncNode *feFuncNode = SP_FEFUNCNODE(object);
+    (void)feFuncNode;
+
+    if (flags & SP_OBJECT_MODIFIED_FLAG) {
+        /* do something to trigger redisplay, updates? */
+        //TODO
+        //sp_object_read_attr(object, "azimuth");
+        //sp_object_read_attr(object, "elevation");
+    }
+
+    if (((SPObjectClass *) feFuncNode_parent_class)->update) {
+        ((SPObjectClass *) feFuncNode_parent_class)->update(object, ctx, flags);
+    }
+}
+
+/**
+ * Writes its settings to an incoming repr object, if any.
+ */
+static Inkscape::XML::Node *
+sp_fefuncnode_write(SPObject *object, Inkscape::XML::Node *repr, guint flags)
+{
+    SPFeFuncNode *fefuncnode = SP_FEFUNCNODE(object);
+
+    if (!repr) {
+        repr = SP_OBJECT_REPR(object)->duplicate(NULL); // FIXME
+    }
+
+    /*
+TODO: I'm not sure what to do here...
+
+    if (fefuncnode->azimuth_set)
+        sp_repr_set_css_double(repr, "azimuth", fefuncnode->azimuth);
+    if (fefuncnode->elevation_set)
+        sp_repr_set_css_double(repr, "elevation", fefuncnode->elevation);*/
+
+    if (((SPObjectClass *) feFuncNode_parent_class)->write) {
+        ((SPObjectClass *) feFuncNode_parent_class)->write(object, repr, flags);
+    }
+
+    return repr;
+}
+
+/*
+  Local Variables:
+  mode:c++
+  c-file-style:"stroustrup"
+  c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
+  indent-tabs-mode:nil
+  fill-column:99
+  End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
Index: src/sp-fecomponenttransfer-funcnode.h
===================================================================
--- src/sp-fecomponenttransfer-funcnode.h	(revis��o 0)
+++ src/sp-fecomponenttransfer-funcnode.h	(revis��o 0)
@@ -0,0 +1,72 @@
+#ifndef SP_FECOMPONENTTRANSFER_FUNCNODE_H_SEEN
+#define SP_FECOMPONENTTRANSFER_FUNCNODE_H_SEEN
+
+/** \file
+ * SVG <filter> implementation, see sp-filter.cpp.
+ */
+/*
+ * Authors:
+ *   Hugo Rodrigues <haa.rodrigues@gmail.com>
+ *   Niko Kiirala <niko@kiirala.com>
+ *   Jean-Rene Reinhard <jr@komite.net>
+ *   Felipe Corr��a da Silva Sanches <felipe.sanches@gmail.com>
+ *
+ * Copyright (C) 2006,2007 Authors
+ *
+ * Released under GNU GPL, read the file 'COPYING' for more information
+ */
+
+#include "sp-object.h"
+#include "display/nr-filter-component-transfer.h"
+
+#define SP_TYPE_FEFUNCNODE (sp_fefuncnode_get_type())
+#define SP_FEFUNCNODE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), SP_TYPE_FEFUNCNODE, SPFeFuncNode))
+#define SP_FEFUNCNODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), SP_TYPE_FEFUNCNODE, SPFeFuncNodeClass))
+#define SP_IS_FEFUNCNODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_FEFUNCNODE))
+#define SP_IS_FEFUNCNODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_FEFUNCNODE))
+
+/* Component Transfer funcNode class */
+
+class SPFeFuncNode;
+class SPFeFuncNodeClass;
+
+struct SPFeFuncNode : public SPObject {
+    NR::FilterComponentTransferType type;
+    std::vector<double> tableValues;
+    double slope;
+    double intercept;
+    double amplitude;
+    double exponent;
+    double offset;
+};
+
+struct SPFeFuncNodeClass {
+    SPObjectClass parent_class;
+};
+
+GType
+sp_fefuncnode_get_type();
+
+/* TODO: 
+class SPFeFuncR : SPFeFuncNode{};
+class SPFeFuncG : SPFeFuncNode{};
+class SPFeFuncB : SPFeFuncNode{};
+class SPFeFuncA : SPFeFuncNode{};
+class SPFeFuncRClass : SPFeFuncNodeClass{};
+class SPFeFuncGClass : SPFeFuncNodeClass{};
+class SPFeFuncBClass : SPFeFuncNodeClass{};
+class SPFeFuncAClass : SPFeFuncNodeClass{};*/
+
+
+#endif /* !SP_FECOMPONENTTRANSFER_FUNCNODE_H_SEEN */
+
+/*
+  Local Variables:
+  mode:c++
+  c-file-style:"stroustrup"
+  c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
+  indent-tabs-mode:nil
+  fill-column:99
+  End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
Index: src/Makefile_insert
===================================================================
--- src/Makefile_insert	(revis��o 17273)
+++ src/Makefile_insert	(c��pia de trabalho)
@@ -165,6 +165,7 @@
 	sp-fecolormatrix.cpp sp-fecolormatrix.h	\
 	sp-fecolormatrix-fns.h	\
 	sp-fecomponenttransfer.cpp sp-fecomponenttransfer.h	\
+	sp-fecomponenttransfer-funcnode.cpp sp-fecomponenttransfer-funcnode.h	\
 	sp-fecomponenttransfer-fns.h	\
 	sp-fecomposite.cpp sp-fecomposite.h	\
 	sp-fecomposite-fns.h	\
Index: src/sp-fecomponenttransfer.cpp
===================================================================
--- src/sp-fecomponenttransfer.cpp	(revis��o 17273)
+++ src/sp-fecomponenttransfer.cpp	(c��pia de trabalho)
@@ -19,11 +19,13 @@
 
 #include <string.h>
 
+#include "document.h"
 #include "attributes.h"
 #include "svg/svg.h"
 #include "sp-fecomponenttransfer.h"
+#include "sp-fecomponenttransfer-funcnode.h"
 #include "xml/repr.h"
-#include "display/nr-filter-component-transfer.h"
+//#include "display/nr-filter-component-transfer.h"
 
 /* FeComponentTransfer base class */
 
@@ -34,8 +36,10 @@
 static void sp_feComponentTransfer_release(SPObject *object);
 static void sp_feComponentTransfer_set(SPObject *object, unsigned int key, gchar const *value);
 static void sp_feComponentTransfer_update(SPObject *object, SPCtx *ctx, guint flags);
+static void sp_feComponentTransfer_build_renderer(SPFilterPrimitive *primitive, NR::Filter *filter);
+static void sp_feComponentTransfer_remove_child(SPObject *object, Inkscape::XML::Node *child);
+static void sp_feComponentTransfer_child_added(SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref);
 static Inkscape::XML::Node *sp_feComponentTransfer_write(SPObject *object, Inkscape::XML::Node *repr, guint flags);
-
 static SPFilterPrimitiveClass *feComponentTransfer_parent_class;
 
 GType
@@ -63,7 +67,7 @@
 sp_feComponentTransfer_class_init(SPFeComponentTransferClass *klass)
 {
     SPObjectClass *sp_object_class = (SPObjectClass *)klass;
-
+    SPFilterPrimitiveClass *sp_primitive_class = (SPFilterPrimitiveClass *)klass;
     feComponentTransfer_parent_class = (SPFilterPrimitiveClass*)g_type_class_peek_parent(klass);
 
     sp_object_class->build = sp_feComponentTransfer_build;
@@ -71,20 +75,15 @@
     sp_object_class->write = sp_feComponentTransfer_write;
     sp_object_class->set = sp_feComponentTransfer_set;
     sp_object_class->update = sp_feComponentTransfer_update;
+    sp_object_class->child_added = sp_feComponentTransfer_child_added;
+    sp_object_class->remove_child = sp_feComponentTransfer_remove_child;
+
+    sp_primitive_class->build_renderer = sp_feComponentTransfer_build_renderer;
 }
 
 static void
 sp_feComponentTransfer_init(SPFeComponentTransfer *feComponentTransfer)
-{
-    //Setting default values:
-//TODO: tableValues = "" (empty list);
-    feComponentTransfer->slope = 1;
-    feComponentTransfer->intercept = 0;
-    feComponentTransfer->amplitude = 1;
-    feComponentTransfer->exponent = 1;
-    feComponentTransfer->offset = 0;
-//    feComponentTransfer->type = NR::COMPONENTTRANSFER_TYPE_ERROR;
-}
+{}
 
 /**
  * Reads the Inkscape::XML::Node, and initializes SPFeComponentTransfer variables.  For this to get called,
@@ -99,16 +98,58 @@
     }
 
     /*LOAD ATTRIBUTES FROM REPR HERE*/
-    sp_object_read_attr(object, "type");
-    sp_object_read_attr(object, "tableValues");
-    sp_object_read_attr(object, "slope");
-    sp_object_read_attr(object, "intercept");
-    sp_object_read_attr(object, "amplitude");
-    sp_object_read_attr(object, "exponent");
-    sp_object_read_attr(object, "offset");
+
+    //do we need this?
+    sp_document_add_resource(document, "feComponentTransfer", object);
 }
 
+static void sp_feComponentTransfer_children_modified(SPFeComponentTransfer *sp_componenttransfer)
+{
+    if (sp_componenttransfer->renderer) {
+        SPObject* node = sp_componenttransfer->children;
+        for(int i=0;i<4;i++){
+            if (!SP_IS_FEFUNCNODE(node)) break;
+            g_warning("fefuncnode[%d]: slope=%f", i, ((SPFeFuncNode *) node)->slope );
+            node=node->next;
+        }
+        
+            //TODO: sp_componenttransfer->renderer->func = valor;
+    }
+}
+
 /**
+ * Callback for child_added event.
+ */
+static void
+sp_feComponentTransfer_child_added(SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref)
+{
+    g_warning("child_added");
+    SPFeComponentTransfer *f = SP_FECOMPONENTTRANSFER(object);
+
+    if (((SPObjectClass *) feComponentTransfer_parent_class)->child_added)
+        (* ((SPObjectClass *) feComponentTransfer_parent_class)->child_added)(object, child, ref);
+
+    sp_feComponentTransfer_children_modified(f);
+    object->parent->requestModified(SP_OBJECT_MODIFIED_FLAG);
+}
+            
+
+/**
+ * Callback for remove_child event.
+ */
+static void
+sp_feComponentTransfer_remove_child(SPObject *object, Inkscape::XML::Node *child)
+{   
+    SPFeComponentTransfer *f = SP_FECOMPONENTTRANSFER(object);
+
+    if (((SPObjectClass *) feComponentTransfer_parent_class)->remove_child)
+        (* ((SPObjectClass *) feComponentTransfer_parent_class)->remove_child)(object, child);   
+
+    sp_feComponentTransfer_children_modified(f);
+    object->parent->requestModified(SP_OBJECT_MODIFIED_FLAG);
+}
+
+/**
  * Drops any allocated memory.
  */
 static void
@@ -118,28 +159,6 @@
         ((SPObjectClass *) feComponentTransfer_parent_class)->release(object);
 }
 
-static NR::FilterComponentTransferType sp_feComponenttransfer_read_type(gchar const *value){
-    if (!value) return NR::COMPONENTTRANSFER_TYPE_ERROR; //type attribute is REQUIRED.
-    switch(value[0]){
-        case 'i':
-            if (strncmp(value, "identity", 8) == 0) return NR::COMPONENTTRANSFER_TYPE_IDENTITY;
-            break;
-        case 't':
-            if (strncmp(value, "table", 5) == 0) return NR::COMPONENTTRANSFER_TYPE_TABLE;
-            break;
-        case 'd':
-            if (strncmp(value, "discrete", 8) == 0) return NR::COMPONENTTRANSFER_TYPE_DISCRETE;
-            break;
-        case 'l':
-            if (strncmp(value, "linear", 6) == 0) return NR::COMPONENTTRANSFER_TYPE_LINEAR;
-            break;
-        case 'g':
-            if (strncmp(value, "gamma", 5) == 0) return NR::COMPONENTTRANSFER_TYPE_GAMMA;
-            break;
-    }
-    return NR::COMPONENTTRANSFER_TYPE_ERROR; //type attribute is REQUIRED.
-}
-
 /**
  * Sets a specific value in the SPFeComponentTransfer.
  */
@@ -149,15 +168,7 @@
     SPFeComponentTransfer *feComponentTransfer = SP_FECOMPONENTTRANSFER(object);
     (void)feComponentTransfer;
 
-    NR::FilterComponentTransferType type;
     switch(key) {
-        case SP_ATTR_TYPE:
-            type = sp_feComponenttransfer_read_type(value);
-            if(type != feComponentTransfer->type) {
-                feComponentTransfer->type = type;
-                object->parent->requestModified(SP_OBJECT_MODIFIED_FLAG);
-            }
-            break;
 	/*DEAL WITH SETTING ATTRIBUTES HERE*/
         default:
             if (((SPObjectClass *) feComponentTransfer_parent_class)->set)
@@ -208,7 +219,24 @@
     return repr;
 }
 
+static void sp_feComponentTransfer_build_renderer(SPFilterPrimitive *primitive, NR::Filter *filter) {
+    g_assert(primitive != NULL);
+    g_assert(filter != NULL);
 
+    SPFeComponentTransfer *sp_componenttransfer = SP_FECOMPONENTTRANSFER(primitive);
+
+    int primitive_n = filter->add_primitive(NR::NR_FILTER_COMPONENTTRANSFER);
+    NR::FilterPrimitive *nr_primitive = filter->get_primitive(primitive_n);
+    NR::FilterComponentTransfer *nr_componenttransfer = dynamic_cast<NR::FilterComponentTransfer*>(nr_primitive);
+    g_assert(nr_componenttransfer != NULL);
+
+    sp_componenttransfer->renderer = nr_componenttransfer;
+    sp_filter_primitive_renderer_common(primitive, nr_primitive);
+
+
+    sp_feComponentTransfer_children_modified(sp_componenttransfer);    //do we need it?!
+}
+
 /*
   Local Variables:
   mode:c++
Index: src/ui/dialog/filter-effects-dialog.cpp
===================================================================
--- src/ui/dialog/filter-effects-dialog.cpp	(revis��o 17273)
+++ src/ui/dialog/filter-effects-dialog.cpp	(c��pia de trabalho)
@@ -2346,19 +2346,20 @@
     _k3->set_sensitive(use_k);
     _k4->set_sensitive(use_k);
 
+    // Component transfer not yet implemented
+    /*
     if(SP_IS_FECOMPONENTTRANSFER(prim)) {
         SPFeComponentTransfer* ct = SP_FECOMPONENTTRANSFER(prim);
         const bool linear = ct->type == COMPONENTTRANSFER_TYPE_LINEAR;
         const bool gamma = ct->type == COMPONENTTRANSFER_TYPE_GAMMA;
 
-        // Component transfer not yet implemented
-        /*_ct_table->set_sensitive(ct->type == COMPONENTTRANSFER_TYPE_TABLE || ct->type == COMPONENTTRANSFER_TYPE_DISCRETE);
+        _ct_table->set_sensitive(ct->type == COMPONENTTRANSFER_TYPE_TABLE || ct->type == COMPONENTTRANSFER_TYPE_DISCRETE);
         _ct_slope->set_sensitive(linear);
         _ct_intercept->set_sensitive(linear);
         _ct_amplitude->set_sensitive(gamma);
         _ct_exponent->set_sensitive(gamma);
-        _ct_offset->set_sensitive(gamma);*/
-    }
+        _ct_offset->set_sensitive(gamma);
+    }*/
 }
 
 void FilterEffectsDialog::update_color_matrix()
Index: src/sp-fecomponenttransfer.h
===================================================================
--- src/sp-fecomponenttransfer.h	(revis��o 17273)
+++ src/sp-fecomponenttransfer.h	(c��pia de trabalho)
@@ -23,13 +23,8 @@
 
 struct SPFeComponentTransfer : public SPFilterPrimitive {
     /** COMPONENTTRANSFER ATTRIBUTES HERE */
-    NR::FilterComponentTransferType type;
-    std::vector<double> tableValues;
-    double slope;
-    double intercept;
-    double amplitude;
-    double exponent;
-    double offset;
+
+    NR::FilterComponentTransfer *renderer;
 };
 
 struct SPFeComponentTransferClass {
