Code

a hack to prevent the redraw of the entire area when a no-fill ctrlrect is deleted
[inkscape.git] / src / display / nr-filter-component-transfer.cpp
1 /*
2  * feComponentTransfer filter primitive renderer
3  *
4  * Authors:
5  *   Felipe CorrĂȘa da Silva Sanches <felipe.sanches@gmail.com>
6  *
7  * Copyright (C) 2007 authors
8  *
9  * Released under GNU GPL, read the file 'COPYING' for more information
10  */
12 #include "display/nr-filter-component-transfer.h"
14 namespace NR {
16 FilterComponentTransfer::FilterComponentTransfer()
17 {
18     g_warning("FilterComponentTransfer::render not implemented.");
19 }
21 FilterPrimitive * FilterComponentTransfer::create() {
22     return new FilterComponentTransfer();
23 }
25 FilterComponentTransfer::~FilterComponentTransfer()
26 {}
28 int FilterComponentTransfer::render(FilterSlot &slot, Matrix const &trans) {
29     NRPixBlock *in = slot.get(_input);
30     NRPixBlock *out = new NRPixBlock;
32     nr_pixblock_setup_fast(out, in->mode,
33                            in->area.x0, in->area.y0, in->area.x1, in->area.y1,
34                            true);
36     unsigned char *in_data = NR_PIXBLOCK_PX(in);
37     unsigned char *out_data = NR_PIXBLOCK_PX(out);
39 //IMPLEMENT ME!
40     
41     out->empty = FALSE;
42     slot.set(_output, out);
43     return 0;
44 }
46 void FilterComponentTransfer::area_enlarge(NRRectL &area, Matrix const &trans)
47 {
48 }
50 void FilterComponentTransfer::set_type(FilterComponentTransferType t){
51     type = t;
52 }
54 void FilterComponentTransfer::set_slope(double s){
55         slope = s;
56 }
58 void FilterComponentTransfer::set_tableValues(std::vector<double> &tv){
59         tableValues = tv;
60 }
63 void FilterComponentTransfer::set_intercept(double i){
64         intercept = i;
65 }
67 void FilterComponentTransfer::set_amplitude(double a){
68         amplitude = a;
69 }
71 void FilterComponentTransfer::set_exponent(double e){
72         exponent = e;
73 }
75 void FilterComponentTransfer::set_offset(double o){
76         offset = o;
77 }
79 } /* namespace NR */
81 /*
82   Local Variables:
83   mode:c++
84   c-file-style:"stroustrup"
85   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
86   indent-tabs-mode:nil
87   fill-column:99
88   End:
89 */
90 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :