Code

Store cached icons to disk between runs, and invalidate/purge as needed.
[inkscape.git] / src / display / nr-filter-morphology.h
1 #ifndef __NR_FILTER_MORPHOLOGY_H__
2 #define __NR_FILTER_MORPHOLOGY_H__
4 /*
5  * feMorphology filter primitive renderer
6  *
7  * Authors:
8  *   Felipe CorrĂȘa da Silva Sanches <juca@members.fsf.org>
9  *
10  * Copyright (C) 2007 authors
11  *
12  * Released under GNU GPL, read the file 'COPYING' for more information
13  */
15 #include "display/nr-filter-primitive.h"
16 #include "display/nr-filter-slot.h"
17 #include "display/nr-filter-units.h"
19 namespace Inkscape {
20 namespace Filters {
22 enum FilterMorphologyOperator {
23     MORPHOLOGY_OPERATOR_ERODE,
24     MORPHOLOGY_OPERATOR_DILATE,
25     MORPHOLOGY_OPERATOR_END
26 };
28 class FilterMorphology : public FilterPrimitive {
29 public:
30     FilterMorphology();
31     static FilterPrimitive *create();
32     virtual ~FilterMorphology();
34     virtual int render(FilterSlot &slot, FilterUnits const &units);
35     virtual void area_enlarge(NRRectL &area, Geom::Matrix const &trans);
36     virtual FilterTraits get_input_traits();
37     void set_operator(FilterMorphologyOperator &o);
38     void set_xradius(double x);
39     void set_yradius(double y);
41 private:
42     FilterMorphologyOperator Operator;
43     double xradius;
44     double yradius;
45 };
47 } /* namespace Filters */
48 } /* namespace Inkscape */
50 #endif /* __NR_FILTER_MORPHOLOGY_H__ */
51 /*
52   Local Variables:
53   mode:c++
54   c-file-style:"stroustrup"
55   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
56   indent-tabs-mode:nil
57   fill-column:99
58   End:
59 */
60 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :