From: JazzyNico Date: Fri, 14 Jan 2011 11:06:57 +0000 (+0100) Subject: Filters. Some custom predefined filters fixes and tweaks (Silhouette and Neon Draw). X-Git-Url: https://git.tokkee.org/?p=inkscape.git;a=commitdiff_plain;h=2db8b9679b10def9cc67edfd5feab793e0667469 Filters. Some custom predefined filters fixes and tweaks (Silhouette and Neon Draw). --- diff --git a/src/extension/internal/filter/abc.h b/src/extension/internal/filter/abc.h index b96585113..e0eeec7cb 100755 --- a/src/extension/internal/filter/abc.h +++ b/src/extension/internal/filter/abc.h @@ -717,7 +717,7 @@ Roughen::get_filter_text (Inkscape::Extension::Extension * ext) Repaint anything visible monochrome Filter's parameters: - * Blur (0.->50., default 0) -> blur (stdDeviation) + * Blur (0.01->50., default 0.01) -> blur (stdDeviation) * Cutout (boolean, default False) -> composite (false=in, true=out) * Color (guint, default 0,0,0,255) -> flood (flood-color, flood-opacity) */ @@ -735,7 +735,7 @@ public: "\n" "" N_("Silhouette, custom (ABCs)") "\n" "org.inkscape.effect.filter.Silhouette\n" - "0\n" + "0.01\n" "false\n" "255\n" "\n" diff --git a/src/extension/internal/filter/experimental.h b/src/extension/internal/filter/experimental.h index 0375f008d..07b376954 100755 --- a/src/extension/internal/filter/experimental.h +++ b/src/extension/internal/filter/experimental.h @@ -498,8 +498,8 @@ public: "" N_("Neon draw, custom") "\n" "org.inkscape.effect.filter.NeonDraw\n" "\n" - "<_item value=\"smooth\">Smoothed\n" - "<_item value=\"hard\">Contrasted\n" + "<_item value=\"table\">Smoothed\n" + "<_item value=\"discrete\">Contrasted\n" "\n" "1.5\n" "1.5\n" @@ -532,27 +532,19 @@ NeonDraw::get_filter_text (Inkscape::Extension::Extension * ext) std::ostringstream simply; std::ostringstream width; std::ostringstream lightness; - std::ostringstream type1; - std::ostringstream type2; + std::ostringstream type; std::ostringstream dark; - const gchar *type = ext->get_param_enum("type"); - if ((g_ascii_strcasecmp("smooth", type) == 0)) { - type1 << "table"; - type2 << "table"; - } else { - type1 << "discrete"; - type2 << "discrete"; - } - + type << ext->get_param_enum("type"); blend << ext->get_param_enum("blend"); simply << ext->get_param_float("simply"); width << ext->get_param_float("width"); lightness << ext->get_param_float("lightness"); + const gchar *typestr = ext->get_param_enum("type"); if (ext->get_param_bool("dark")) dark << "component2"; - else if ((g_ascii_strcasecmp("smooth", type) == 0)) + else if ((g_ascii_strcasecmp("table", typestr) == 0)) dark << "blur2"; else dark << "component1"; @@ -562,9 +554,9 @@ NeonDraw::get_filter_text (Inkscape::Extension::Extension * ext) "\n" "\n" "\n" - "\n" - "\n" - "\n" + "\n" + "\n" + "\n" "\n" "\n" "\n" @@ -574,7 +566,7 @@ NeonDraw::get_filter_text (Inkscape::Extension::Extension * ext) "\n" "\n" "\n" - "\n", blend.str().c_str(), simply.str().c_str(), type1.str().c_str(), type1.str().c_str(), type1.str().c_str(), width.str().c_str(), type2.str().c_str(), type2.str().c_str(), type2.str().c_str(), dark.str().c_str(), lightness.str().c_str()); + "\n", blend.str().c_str(), simply.str().c_str(), width.str().c_str(), type.str().c_str(), type.str().c_str(), type.str().c_str(), dark.str().c_str(), lightness.str().c_str()); return _filter; }; /* NeonDraw filter */