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=82a37a6aa787c250e20fba20522d9fb5097a9961;hb=79af2e1423d604b987e323c3a87ea755dfc4257c;hp=08ba4b475dc81e110505d619142089b42e6b0232;hpb=2db300164334e95c7b73b6f2b12ea12be5db2142;p=inkscape.git diff --git a/src/extension/internal/filter/color.h b/src/extension/internal/filter/color.h index 08ba4b475..82a37a6aa 100644 --- a/src/extension/internal/filter/color.h +++ b/src/extension/internal/filter/color.h @@ -39,6 +39,7 @@ public: // "\n" // "\n" "false\n" + "false\n" "<_param name=\"header1\" type=\"groupheader\">Color 1\n" "1364325887\n" // "\n" @@ -75,10 +76,13 @@ Duochrome::get_filter_text (Inkscape::Extension::Extension * ext) std::ostringstream g2; std::ostringstream b2; std::ostringstream fluo; + std::ostringstream swapc; guint32 color1 = ext->get_param_color("color1"); guint32 color2 = ext->get_param_color("color2"); bool fluorescence = ext->get_param_bool("fluo"); + bool swapcolors = ext->get_param_bool("swapcolors"); + a1 << (color1 & 0xff) / 255.0F; r1 << ((color1 >> 24) & 0xff); g1 << ((color1 >> 16) & 0xff); @@ -87,24 +91,30 @@ Duochrome::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\""; + if (fluorescence) + fluo << ""; + else + fluo << " in=\"blend\""; + if (swapcolors) + swapc << "in"; + else + swapc << "out"; _filter = g_strdup_printf( "\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(), fluo.str().c_str()); + "\n", a1.str().c_str(), r1.str().c_str(), g1.str().c_str(), b1.str().c_str(), swapc.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; };