Code

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