Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
nr-filter-colormatrix.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
2#ifndef SEEN_NR_FILTER_COLOR_MATRIX_H
3#define SEEN_NR_FILTER_COLOR_MATRIX_H
4
5/*
6 * feColorMatrix filter primitive renderer
7 *
8 * Authors:
9 * Felipe CorrĂȘa da Silva Sanches <juca@members.fsf.org>
10 *
11 * Copyright (C) 2007 authors
12 *
13 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
14 */
15
16#include <vector>
17#include <2geom/forward.h>
19
20typedef unsigned int guint32;
21typedef signed int gint32;
22
23namespace Inkscape {
24namespace Filters {
25
26class FilterSlot;
27
36
38{
39public:
42
43 void render_cairo(FilterSlot &slot) const override;
44 bool can_handle_affine(Geom::Affine const &) const override;
45 double complexity(Geom::Affine const &ctm) const override;
46
48 virtual void set_value(double value);
49 virtual void set_values(std::vector<double> const &values);
50
51 Glib::ustring name() const override { return Glib::ustring("Color Matrix"); }
52
53public:
55 {
56 ColorMatrixMatrix(std::vector<double> const &values);
57 guint32 operator()(guint32 in) const;
58 private:
60 };
61
62private:
63 std::vector<double> values;
64 double value;
66};
67
68} // namespace Filters
69} // namespace Inkscape
70
71#endif // SEEN_NR_FILTER_COLOR_MATRIX_H
72/*
73 Local Variables:
74 mode:c++
75 c-file-style:"stroustrup"
76 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
77 indent-tabs-mode:nil
78 fill-column:99
79 End:
80*/
81// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
3x3 matrix representing an affine transformation.
Definition affine.h:70
bool can_handle_affine(Geom::Affine const &) const override
Indicate whether the filter primitive can handle the given affine.
virtual void set_values(std::vector< double > const &values)
Glib::ustring name() const override
virtual void set_type(FilterColorMatrixType type)
double complexity(Geom::Affine const &ctm) const override
void render_cairo(FilterSlot &slot) const override
unsigned int guint32
Contains forward declarations of 2geom types.
Helper class to stream background task notifications as a series of messages.
unsigned int guint32
signed int gint32