Code

add SPCurve::first_segment and last_segment
[inkscape.git] / src / display / nr-filter-component-transfer.h
index b3045780971ca4d02f4eb57f61c7ae189b298874..ae08d6f290c60e55a8f13f3622731b1389694db8 100644 (file)
 
 #include "display/nr-filter-primitive.h"
 #include "display/nr-filter-slot.h"
+#include "display/nr-filter-units.h"
+#include <vector>
 
 namespace NR {
 
+enum FilterComponentTransferType {
+    COMPONENTTRANSFER_TYPE_IDENTITY,
+    COMPONENTTRANSFER_TYPE_TABLE,
+    COMPONENTTRANSFER_TYPE_DISCRETE,
+    COMPONENTTRANSFER_TYPE_LINEAR,
+    COMPONENTTRANSFER_TYPE_GAMMA,
+    COMPONENTTRANSFER_TYPE_ERROR
+};
+
 class FilterComponentTransfer : public FilterPrimitive {
 public:
     FilterComponentTransfer();
     static FilterPrimitive *create();
     virtual ~FilterComponentTransfer();
 
-    virtual int render(FilterSlot &slot, Matrix const &trans);
+    virtual int render(FilterSlot &slot, FilterUnits const &units);
     virtual void area_enlarge(NRRectL &area, Matrix const &trans);
+
+    FilterComponentTransferType type[4];
+    std::vector<gdouble> tableValues[4];
+    double slope[4];
+    double intercept[4];
+    double amplitude[4];
+    double exponent[4];
+    double offset[4];
 };
 
 } /* namespace NR */