X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fextension%2Finternal%2Ffilter%2Fcolor.h;fp=src%2Fextension%2Finternal%2Ffilter%2Fcolor.h;h=08ba4b475dc81e110505d619142089b42e6b0232;hb=642b1bd5f081069ac0dc8fea88468735465cfe1f;hp=4fd60aab81457eece9499d4f4b00c80190e9fc60;hpb=630c2f7a7d55151e08f18d258d3fa7b5e59a583a;p=inkscape.git
diff --git a/src/extension/internal/filter/color.h b/src/extension/internal/filter/color.h
index 4fd60aab8..08ba4b475 100644
--- a/src/extension/internal/filter/color.h
+++ b/src/extension/internal/filter/color.h
@@ -22,28 +22,29 @@ namespace Extension {
namespace Internal {
namespace Filter {
-class Bicolorizer : public Inkscape::Extension::Internal::Filter::Filter {
+class Duochrome : public Inkscape::Extension::Internal::Filter::Filter {
protected:
virtual gchar const * get_filter_text (Inkscape::Extension::Extension * ext);
public:
- Bicolorizer ( ) : Filter() { };
- virtual ~Bicolorizer ( ) { if (_filter != NULL) g_free((void *)_filter); return; }
+ Duochrome ( ) : Filter() { };
+ virtual ~Duochrome ( ) { if (_filter != NULL) g_free((void *)_filter); return; }
static void init (void) {
Inkscape::Extension::build_from_mem(
"\n"
- "" N_("Bicolorizer -EXP-") "\n"
- "org.inkscape.effect.filter.bicolorizer\n"
+ "" N_("Duochrome, custom -EXP-") "\n"
+ "org.inkscape.effect.filter.Duochrome\n"
// Using color widgets in tabs makes Inkscape crash...
// "\n"
// "\n"
+ "false\n"
"<_param name=\"header1\" type=\"groupheader\">Color 1\n"
- "1946122495\n"
+ "1364325887\n"
// "\n"
// "\n"
"<_param name=\"header2\" type=\"groupheader\">Color 2\n"
- "367387135\n"
+ "-65281\n"
// "\n"
// "\n"
"\n"
@@ -55,13 +56,13 @@ public:
"\n"
"" N_("Change colors to a two colors palette") "\n"
"\n"
- "\n", new Bicolorizer());
+ "\n", new Duochrome());
};
};
gchar const *
-Bicolorizer::get_filter_text (Inkscape::Extension::Extension * ext)
+Duochrome::get_filter_text (Inkscape::Extension::Extension * ext)
{
if (_filter != NULL) g_free((void *)_filter);
@@ -73,9 +74,11 @@ Bicolorizer::get_filter_text (Inkscape::Extension::Extension * ext)
std::ostringstream r2;
std::ostringstream g2;
std::ostringstream b2;
+ std::ostringstream fluo;
guint32 color1 = ext->get_param_color("color1");
guint32 color2 = ext->get_param_color("color2");
+ bool fluorescence = ext->get_param_bool("fluo");
a1 << (color1 & 0xff) / 255.0F;
r1 << ((color1 >> 24) & 0xff);
g1 << ((color1 >> 16) & 0xff);
@@ -84,25 +87,24 @@ Bicolorizer::get_filter_text (Inkscape::Extension::Extension * ext)
r2 << ((color2 >> 24) & 0xff);
g2 << ((color2 >> 16) & 0xff);
b2 << ((color2 >> 8) & 0xff);
+ if (fluorescence) fluo << "";
+ else fluo << " in=\"result6\"";
_filter = g_strdup_printf(
- "\n"
- "\n"
- "\n"
- "\n"
- "\n"
- "\n"
- "\n"
- "\n"
- "\n"
- "\n"
+ "\n"
+ "\n"
+ "\n"
+ "\n"
+ "\n"
+ "\n"
"\n"
- "\n"
+ "\n"
"\n"
"\n"
- "\n"
- "\n"
- "\n", a1.str().c_str(), r1.str().c_str(), g1.str().c_str(), b1.str().c_str(), a2.str().c_str(), r2.str().c_str(), g2.str().c_str(), b2.str().c_str());
+ "\n"
+ "\n"
+ "\n"
+ "\n", a1.str().c_str(), r1.str().c_str(), g1.str().c_str(), b1.str().c_str(), a2.str().c_str(), r2.str().c_str(), g2.str().c_str(), b2.str().c_str(), fluo.str().c_str());
return _filter;
};