Code

Using the blur slider no longer destroys filters already applied to the object
[inkscape.git] / src / sp-filter.h
1 #ifndef SP_FILTER_H_SEEN
2 #define SP_FILTER_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  *
12  * Copyright (C) 2006,2007 Authors
13  *
14  * Released under GNU GPL, read the file 'COPYING' for more information
15  */
17 #include <map>
19 #include "number-opt-number.h"
20 #include "sp-object.h"
21 #include "sp-filter-units.h"
22 #include "sp-filter-fns.h"
23 #include "svg/svg-length.h"
24 #include "display/nr-filter.h"
26 /* Filter base class */
28 /* MACROS DEFINED IN FILE sp-filter-fns.h */
30 struct SPFilterReference;
32 class SPFilter;
33 class SPFilterClass;
35 struct ltstr {
36     bool operator()(const char* s1, const char* s2) const;
37 };
39 struct SPFilter : public SPObject {
41     /** filterUnits attribute */
42     SPFilterUnits filterUnits;
43     guint filterUnits_set : 1;
44     /** primitiveUnits attribute */
45     SPFilterUnits primitiveUnits;
46     guint primitiveUnits_set : 1;
47     /** X attribute */    
48     SVGLength x;
49     /** Y attribute */
50     SVGLength y;
51     /** WIDTH attribute */
52     SVGLength width;
53     /** HEIGHT attribute */
54     SVGLength height;
55     /** FILTERRES attribute */
56     NumberOptNumber filterRes;
57     /** HREF attribute */
58     SPFilterReference *href;
60     NR::Filter *_renderer;
62     std::map<gchar *, int, ltstr> _image_name;
63     int _image_number_next;
64 };
66 struct SPFilterClass {
67     SPObjectClass parent_class;
68 };
70 /*
71  * Initializes the given NR::Filter object as a renderer for this
72  * SPFilter object.
73  */
74 void sp_filter_build_renderer(SPFilter *sp_filter, NR::Filter *nr_filter);
76 /*
77  * Returns the number of filter primitives in this SPFilter object.
78  */
79 int sp_filter_primitive_count(SPFilter *filter);
81 int sp_filter_get_image_name(SPFilter *filter, gchar const *name);
82 int sp_filter_set_image_name(SPFilter *filter, gchar const *name);
84 #endif /* !SP_FILTER_H_SEEN */
86 /*
87   Local Variables:
88   mode:c++
89   c-file-style:"stroustrup"
90   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
91   indent-tabs-mode:nil
92   fill-column:99
93   End:
94 */
95 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :