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 <felipe.sanches@gmail.com>
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"
18 namespace NR {
20 enum FilterMorphologyOperator {
21 MORPHOLOGY_OPERATOR_ERODE,
22 MORPHOLOGY_OPERATOR_DILATE,
23 MORPHOLOGY_OPERATOR_END
24 };
26 class FilterMorphology : public FilterPrimitive {
27 public:
28 FilterMorphology();
29 static FilterPrimitive *create();
30 virtual ~FilterMorphology();
32 virtual int render(FilterSlot &slot, Matrix const &trans);
33 virtual void area_enlarge(NRRectL &area, Matrix const &trans);
34 void set_operator(FilterMorphologyOperator &o);
35 void set_xradius(int x);
36 void set_yradius(int y);
38 private:
39 FilterMorphologyOperator Operator;
40 int xradius;
41 int yradius;
42 };
44 } /* namespace NR */
46 #endif /* __NR_FILTER_MORPHOLOGY_H__ */
47 /*
48 Local Variables:
49 mode:c++
50 c-file-style:"stroustrup"
51 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
52 indent-tabs-mode:nil
53 fill-column:99
54 End:
55 */
56 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :