1 // SPDX-License-Identifier: GPL-2.0-or-later 2 /** @file 3 * @brief SVG color matrix filter effect 4 *//* 5 * Authors: 6 * Hugo Rodrigues <haa.rodrigues@gmail.com> 7 * 8 * Copyright (C) 2006 Hugo Rodrigues 9 * 10 * Released under GNU GPL v2+, read the file 'COPYING' for more information. 11 */ 12 #ifndef SP_FECOLORMATRIX_H_SEEN 13 #define SP_FECOLORMATRIX_H_SEEN 14 15 #include <vector> 16 #include "sp-filter-primitive.h" 17 #include "display/nr-filter-colormatrix.h" 18 19 #define SP_FECOLORMATRIX(obj) (dynamic_cast<SPFeColorMatrix*>((SPObject*)obj)) 20 #define SP_IS_FECOLORMATRIX(obj) (dynamic_cast<const SPFeColorMatrix*>((SPObject*)obj) != NULL) 21 22 class SPFeColorMatrix : public SPFilterPrimitive { 23 public: 24 SPFeColorMatrix(); 25 ~SPFeColorMatrix() override; 26 27 Inkscape::Filters::FilterColorMatrixType type; 28 gdouble value; 29 std::vector<gdouble> values; 30 31 protected: 32 void build(SPDocument* doc, Inkscape::XML::Node* repr) override; 33 void release() override; 34 35 void set(SPAttr key, const gchar* value) override; 36 37 void update(SPCtx* ctx, unsigned int flags) override; 38 39 Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags) override; 40 41 void build_renderer(Inkscape::Filters::Filter* filter) override; 42 }; 43 44 #endif /* !SP_FECOLORMATRIX_H_SEEN */ 45 46 /* 47 Local Variables: 48 mode:c++ 49 c-file-style:"stroustrup" 50 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) 51 indent-tabs-mode:nil 52 fill-column:99 53 End: 54 */ 55 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : 56