1 #ifndef __NR_FILTER_DISPLACEMENT_MAP_H__
2 #define __NR_FILTER_DISPLACEMENT_MAP_H__
4 /*
5 * feDisplacementMap filter primitive renderer
6 *
7 * Authors:
8 * Felipe CorrĂȘa da Silva Sanches <felipe.sanches@gmail.com>
9 *
10 * Copyright (C) 2007 authors
11 *
12 * Released under GNU GPL, read the file 'COPYING' for more information
13 */
15 #include "display/nr-filter-primitive.h"
16 #include "display/nr-filter-slot.h"
17 #include "libnr/nr-matrix.h"
18 #include "libnr/nr-rect-l.h"
20 namespace NR {
22 class FilterDisplacementMap : public FilterPrimitive {
23 public:
24 FilterDisplacementMap();
25 static FilterPrimitive *create();
26 virtual ~FilterDisplacementMap();
28 virtual void set_input(int slot);
29 virtual void set_input(int input, int slot);
30 virtual void set_scale(double s);
31 virtual void set_channel_selector(int channel, int s);
32 virtual int render(FilterSlot &slot, Matrix const &trans);
33 virtual void area_enlarge(NRRectL &area, Matrix const &trans);
34 virtual FilterTraits get_input_traits();
36 private:
37 double scale;
38 int _input2;
39 int Xchannel;
40 int Ychannel;
41 int out_x0, out_y0, out_w, out_h;
42 };
44 } /* namespace NR */
46 #endif /* __NR_FILTER_DISPLACEMENT_MAP_H__ */
47 /*
48 Local Variables:
49 mode:c++
50 c-file-style:"stroustrup"
51 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
52 indent-tabs-mode:nil
53 fill-column:99
54 End:
55 */
56 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :