summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8df80ac)
raw | patch | inline | side by side (parent: 8df80ac)
author | nicholasbishop <nicholasbishop@users.sourceforge.net> | |
Thu, 9 Aug 2007 06:06:33 +0000 (06:06 +0000) | ||
committer | nicholasbishop <nicholasbishop@users.sourceforge.net> | |
Thu, 9 Aug 2007 06:06:33 +0000 (06:06 +0000) |
* Added controls for feMorphology
index be9ad20310f43465ebead48e1ebe66dbf1565175..be182203ca0697cc1034c0c406451fd2e6c2e5b7 100644 (file)
enum FilterMorphologyOperator {
MORPHOLOGY_OPERATOR_ERODE,
- MORPHOLOGY_OPERATOR_DILATE
+ MORPHOLOGY_OPERATOR_DILATE,
+ MORPHOLOGY_OPERATOR_END
};
class FilterMorphology : public FilterPrimitive {
diff --git a/src/filter-enums.cpp b/src/filter-enums.cpp
index bd855d102b9964ca08a6c71eed27172ff724e584..d9f0a39861787ce03472b75e0e457d2694a13bd7 100644 (file)
--- a/src/filter-enums.cpp
+++ b/src/filter-enums.cpp
};
const EnumDataConverter<int> DisplacementMapChannelConverter(DisplacementMapChannelData, 4);
+// feMorphology
+const EnumData<NR::FilterMorphologyOperator> MorphologyOperatorData[NR::MORPHOLOGY_OPERATOR_END] = {
+ {NR::MORPHOLOGY_OPERATOR_ERODE, _("Erode"), "erode"},
+ {NR::MORPHOLOGY_OPERATOR_DILATE, _("Dilate"), "dilate"}
+};
+const EnumDataConverter<NR::FilterMorphologyOperator> MorphologyOperatorConverter(MorphologyOperatorData, NR::MORPHOLOGY_OPERATOR_END);
+
// Light source
const EnumData<LightSource> LightSourceData[LIGHT_ENDSOURCE] = {
{LIGHT_DISTANT, _("Distance Light"), "svg:feDistanceLight"},
diff --git a/src/filter-enums.h b/src/filter-enums.h
index 7e5a641c88511176386e10e0973574c2cae76981..37c7e6f0d7b677e195757f2f05dbde115f82d4f4 100644 (file)
--- a/src/filter-enums.h
+++ b/src/filter-enums.h
#include "display/nr-filter-colormatrix.h"
#include "display/nr-filter-composite.h"
#include "display/nr-filter-convolve-matrix.h"
+#include "display/nr-filter-morphology.h"
#include "display/nr-filter-types.h"
#include "util/enums.h"
// DisplacementMap channel
extern const Inkscape::Util::EnumData<int> DisplacementMapChannelData[4];
extern const Inkscape::Util::EnumDataConverter<int> DisplacementMapChannelConverter;
+// Morphology operator
+extern const Inkscape::Util::EnumData<NR::FilterMorphologyOperator> MorphologyOperatorData[NR::MORPHOLOGY_OPERATOR_END];
+extern const Inkscape::Util::EnumDataConverter<NR::FilterMorphologyOperator> MorphologyOperatorConverter;
// Lighting
enum LightSource {
LIGHT_DISTANT,
index af413bc0ebfd9197f01af3e731052e594c51fb1d..3c5a351e67be9cb9b396ff449f678fec3eec3145 100644 (file)
_settings->type(NR_FILTER_GAUSSIANBLUR);
_settings->add_dualspinslider(SP_ATTR_STDDEVIATION, _("Standard Deviation"), 0.01, 100, 1, 0.01, 1);
+ _settings->type(NR_FILTER_MORPHOLOGY);
+ _settings->add_combo(SP_ATTR_OPERATOR, _("Operator"), MorphologyOperatorConverter);
+ _settings->add_dualspinslider(SP_ATTR_RADIUS, _("Radius"), 0, 100, 1, 0.01, 1);
+
_settings->type(NR_FILTER_OFFSET);
_settings->add_spinslider(SP_ATTR_DX, _("Delta X"), -100, 100, 1, 0.01, 1);
_settings->add_spinslider(SP_ATTR_DY, _("Delta Y"), -100, 100, 1, 0.01, 1);