Code

Fixed icon loading, cacheing and fallback to use stock mechanisms.
[inkscape.git] / src / display / nr-filter-gaussian.h
1 #ifndef __NR_FILTER_GAUSSIAN_H__
2 #define __NR_FILTER_GAUSSIAN_H__
4 /*
5  * Gaussian blur renderer
6  *
7  * Authors:
8  *   Niko Kiirala <niko@kiirala.com>
9  *   bulia byak
10  *   Jasper van de Gronde <th.v.d.gronde@hccnet.nl>
11  *
12  * Copyright (C) 2006 authors
13  *
14  * Released under GNU GPL, read the file 'COPYING' for more information
15  */
17 #include "display/nr-filter-primitive.h"
18 #include "display/nr-filter-slot.h"
19 #include "display/nr-filter-units.h"
20 #include "libnr/nr-pixblock.h"
21 #include "libnr/nr-matrix.h"
22 #include "libnr/nr-rect-l.h"
24 enum {
25     BLUR_QUALITY_BEST = 2,
26     BLUR_QUALITY_BETTER = 1,
27     BLUR_QUALITY_NORMAL = 0,
28     BLUR_QUALITY_WORSE = -1,
29     BLUR_QUALITY_WORST = -2
30 };
32 namespace NR {
34 class FilterGaussian : public FilterPrimitive {
35 public:
36     FilterGaussian();
37     static FilterPrimitive *create();
38     virtual ~FilterGaussian();
40     virtual int render(FilterSlot &slot, FilterUnits const &units);
41     virtual void area_enlarge(NRRectL &area, Matrix const &m);
42     virtual FilterTraits get_input_traits();
44     /**
45      * Set the standard deviation value for gaussian blur. Deviation along
46      * both axis is set to the provided value.
47      * Negative value, NaN and infinity are considered an error and no
48      * changes to filter state are made. If not set, default value of zero
49      * is used, which means the filter results in transparent black image.
50      */
51     void set_deviation(double deviation);
52     /**
53      * Set the standard deviation value for gaussian blur. First parameter
54      * sets the deviation alogn x-axis, second along y-axis.
55      * Negative value, NaN and infinity are considered an error and no
56      * changes to filter state are made. If not set, default value of zero
57      * is used, which means the filter results in transparent black image.
58      */
59     void set_deviation(double x, double y);
61 private:
62     double _deviation_x;
63     double _deviation_y;
64 };
67 } /* namespace NR */
72 #endif /* __NR_FILTER_GAUSSIAN_H__ */
73 /*
74   Local Variables:
75   mode:c++
76   c-file-style:"stroustrup"
77   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
78   indent-tabs-mode:nil
79   fill-column:99
80   End:
81 */
82 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :