1 #ifndef __NR_FILTER_BLEND_H__
2 #define __NR_FILTER_BLEND_H__
4 /*
5 * SVG feBlend renderer
6 *
7 * "This filter composites two objects together using commonly used
8 * imaging software blending modes. It performs a pixel-wise combination
9 * of two input images."
10 * http://www.w3.org/TR/SVG11/filters.html#feBlend
11 *
12 * Authors:
13 * Niko Kiirala <niko@kiirala.com>
14 *
15 * Copyright (C) 2007 authors
16 *
17 * Released under GNU GPL, read the file 'COPYING' for more information
18 */
20 #include "display/nr-filter-primitive.h"
21 #include "display/nr-filter-slot.h"
22 #include "display/nr-filter-units.h"
24 namespace Inkscape {
25 namespace Filters {
27 enum FilterBlendMode {
28 BLEND_NORMAL,
29 BLEND_MULTIPLY,
30 BLEND_SCREEN,
31 BLEND_DARKEN,
32 BLEND_LIGHTEN,
33 BLEND_ENDMODE
34 };
36 class FilterBlend : public FilterPrimitive {
37 public:
38 FilterBlend();
39 static FilterPrimitive *create();
40 virtual ~FilterBlend();
42 virtual int render(FilterSlot &slot, FilterUnits const &units);
44 virtual void set_input(int slot);
45 virtual void set_input(int input, int slot);
46 void set_mode(FilterBlendMode mode);
48 private:
49 FilterBlendMode _blend_mode;
50 int _input2;
51 };
54 } /* namespace Filters */
55 } /* namespace Inkscape */
60 #endif /* __NR_FILTER_BLEND_H__ */
61 /*
62 Local Variables:
63 mode:c++
64 c-file-style:"stroustrup"
65 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
66 indent-tabs-mode:nil
67 fill-column:99
68 End:
69 */
70 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :