1 #ifndef __NR_FILTER_COLOR_MATRIX_H__
2 #define __NR_FILTER_COLOR_MATRIX_H__
4 /*
5 * feColorMatrix 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 "display/nr-filter-units.h"
18 #include<vector>
20 namespace NR {
22 enum FilterColorMatrixType {
23 COLORMATRIX_MATRIX,
24 COLORMATRIX_SATURATE,
25 COLORMATRIX_HUEROTATE,
26 COLORMATRIX_LUMINANCETOALPHA,
27 COLORMATRIX_ENDTYPE
28 };
30 class FilterColorMatrix : public FilterPrimitive {
31 public:
32 FilterColorMatrix();
33 static FilterPrimitive *create();
34 virtual ~FilterColorMatrix();
36 virtual int render(FilterSlot &slot, FilterUnits const &units);
37 virtual void area_enlarge(NRRectL &area, Matrix const &trans);
38 virtual void set_type(FilterColorMatrixType type);
39 virtual void set_value(gdouble value);
40 virtual void set_values(std::vector<gdouble> &values);
41 private:
42 std::vector<gdouble> values;
43 gdouble value;
44 FilterColorMatrixType type;
45 };
47 } /* namespace NR */
49 #endif /* __NR_FILTER_COLOR_MATRIX_H__ */
50 /*
51 Local Variables:
52 mode:c++
53 c-file-style:"stroustrup"
54 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
55 indent-tabs-mode:nil
56 fill-column:99
57 End:
58 */
59 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :