1 #ifndef SP_FECOMPONENTTRANSFER_FUNCNODE_H_SEEN
2 #define SP_FECOMPONENTTRANSFER_FUNCNODE_H_SEEN
4 /** \file
5 * SVG <filter> implementation, see sp-filter.cpp.
6 */
7 /*
8 * Authors:
9 * Hugo Rodrigues <haa.rodrigues@gmail.com>
10 * Niko Kiirala <niko@kiirala.com>
11 * Felipe Corrêa da Silva Sanches <felipe.sanches@gmail.com>
12 *
13 * Copyright (C) 2006,2007 Authors
14 *
15 * Released under GNU GPL, read the file 'COPYING' for more information
16 */
18 #include "sp-object.h"
19 #include "display/nr-filter-component-transfer.h"
21 #define SP_TYPE_FEFUNCR (sp_fefuncR_get_type())
22 #define SP_TYPE_FEFUNCG (sp_fefuncG_get_type())
23 #define SP_TYPE_FEFUNCB (sp_fefuncB_get_type())
24 #define SP_TYPE_FEFUNCA (sp_fefuncA_get_type())
26 #define SP_IS_FEFUNCR(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_FEFUNCR))
27 #define SP_IS_FEFUNCG(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_FEFUNCG))
28 #define SP_IS_FEFUNCB(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_FEFUNCB))
29 #define SP_IS_FEFUNCA(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_FEFUNCA))
31 #define SP_FEFUNCNODE(obj) (SP_IS_FEFUNCR(obj) ? G_TYPE_CHECK_INSTANCE_CAST((obj), SP_TYPE_FEFUNCR, SPFeFuncNode) : (SP_IS_FEFUNCG(obj) ? G_TYPE_CHECK_INSTANCE_CAST((obj), SP_TYPE_FEFUNCG, SPFeFuncNode) : (SP_IS_FEFUNCB(obj) ? G_TYPE_CHECK_INSTANCE_CAST((obj), SP_TYPE_FEFUNCB, SPFeFuncNode):(SP_IS_FEFUNCA(obj) ? G_TYPE_CHECK_INSTANCE_CAST((obj), SP_TYPE_FEFUNCA, SPFeFuncNode): NULL))))
33 #define SP_FEFUNCNODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), SP_TYPE_FEFUNCNODE, SPFeFuncNodeClass))
35 #define SP_IS_FEFUNCNODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_FEFUNCNODE))
37 /* Component Transfer funcNode class */
39 class SPFeFuncNode;
40 class SPFeFuncNodeClass;
42 struct SPFeFuncNode : public SPObject {
43 NR::FilterComponentTransferType type;
44 std::vector<double> tableValues;
45 double slope;
46 double intercept;
47 double amplitude;
48 double exponent;
49 double offset;
50 };
52 struct SPFeFuncNodeClass {
53 SPObjectClass parent_class;
54 };
56 GType sp_fefuncR_get_type();
57 GType sp_fefuncG_get_type();
58 GType sp_fefuncB_get_type();
59 GType sp_fefuncA_get_type();
61 #endif /* !SP_FECOMPONENTTRANSFER_FUNCNODE_H_SEEN */
63 /*
64 Local Variables:
65 mode:c++
66 c-file-style:"stroustrup"
67 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
68 indent-tabs-mode:nil
69 fill-column:99
70 End:
71 */
72 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :