Code

User message context in extensions
[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 <juca@members.fsf.org>
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 Inkscape {
21 namespace Filters {
23 enum FilterColorMatrixType {
24     COLORMATRIX_MATRIX,
25     COLORMATRIX_SATURATE,
26     COLORMATRIX_HUEROTATE,
27     COLORMATRIX_LUMINANCETOALPHA,
28     COLORMATRIX_ENDTYPE
29 };
31 class FilterColorMatrix : public FilterPrimitive {
32 public:
33     FilterColorMatrix();
34     static FilterPrimitive *create();
35     virtual ~FilterColorMatrix();
37     virtual int render(FilterSlot &slot, FilterUnits const &units);
38     virtual void area_enlarge(NRRectL &area, Geom::Matrix const &trans);
39     virtual void set_type(FilterColorMatrixType type);
40     virtual void set_value(gdouble value);
41     virtual void set_values(std::vector<gdouble> &values);
42 private:
43     std::vector<gdouble> values;
44     gdouble value;
45     FilterColorMatrixType type;
46 };
48 } /* namespace Filters */
49 } /* namespace Inkscape */
51 #endif /* __NR_FILTER_COLOR_MATRIX_H__ */
52 /*
53   Local Variables:
54   mode:c++
55   c-file-style:"stroustrup"
56   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
57   indent-tabs-mode:nil
58   fill-column:99
59   End:
60 */
61 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :