From df08cc238f064ebdac402a4c9abd7e1737e0d274 Mon Sep 17 00:00:00 2001 From: Nicolas Dufour Date: Tue, 9 Aug 2011 22:29:53 +0200 Subject: Filters. New Invert, Wax bump and Felt feather custom predefined filters. Filters. More reorganization and consistency fixes. (bzr r10533) --- src/extension/internal/filter/blurs.h | 10 +- src/extension/internal/filter/bumps.h | 220 ++++++++++++++++++++++++++- src/extension/internal/filter/color.h | 164 ++++++++++++++++++-- src/extension/internal/filter/distort.h | 146 +++++++++++++++++- src/extension/internal/filter/filter-all.cpp | 9 +- src/extension/internal/filter/paint.h | 7 +- 6 files changed, 527 insertions(+), 29 deletions(-) (limited to 'src') diff --git a/src/extension/internal/filter/blurs.h b/src/extension/internal/filter/blurs.h index b09a4f347..b8a6d7c4c 100644 --- a/src/extension/internal/filter/blurs.h +++ b/src/extension/internal/filter/blurs.h @@ -12,7 +12,7 @@ * Clean edges * Cross blur * Feather - * Image blur + * Out of focus * * Released under GNU GPL, read the file 'COPYING' for more information */ @@ -280,7 +280,7 @@ Feather::get_filter_text (Inkscape::Extension::Extension * ext) }; /* Feather filter */ /** - \brief Custom predefined Image blur filter. + \brief Custom predefined Out of Focus filter. Blur eroded by white or transparency @@ -307,7 +307,7 @@ public: static void init (void) { Inkscape::Extension::build_from_mem( "\n" - "" N_("Image Blur") "\n" + "" N_("Out of Focus") "\n" "org.inkscape.effect.filter.ImageBlur\n" "\n" "\n" @@ -380,7 +380,7 @@ ImageBlur::get_filter_text (Inkscape::Extension::Extension * ext) } _filter = g_strdup_printf( - "\n" + "\n" "\n" "\n" "\n" @@ -393,7 +393,7 @@ ImageBlur::get_filter_text (Inkscape::Extension::Extension * ext) background.str().c_str(), blend.str().c_str(), opacity.str().c_str()); return _filter; -}; /* Image blur filter */ +}; /* Out of Focus filter */ }; /* namespace Filter */ }; /* namespace Internal */ diff --git a/src/extension/internal/filter/bumps.h b/src/extension/internal/filter/bumps.h index e8c80315a..9d46a25b2 100644 --- a/src/extension/internal/filter/bumps.h +++ b/src/extension/internal/filter/bumps.h @@ -12,6 +12,7 @@ * Diffuse light * Matte jelly * Specular light + * Wax bump * * Released under GNU GPL, read the file 'COPYING' for more information */ @@ -37,7 +38,7 @@ namespace Filter { Options * Image simplification (0.01->10., default 0.01) -> blur1 (stdDeviation) * Bump simplification (0.01->10., default 0.01) -> blur2 (stdDeviation) - * Crop (-50.->50., default 1) -> composite1 (k3) + * Crop (-50.->50., default 0.) -> composite1 (k3) * Red (-50.->50., default 0.) -> colormatrix1 (values) * Green (-50.->50., default 0.) -> colormatrix1 (values) * Blue (-50.->50., default 0.) -> colormatrix1 (values) @@ -85,7 +86,7 @@ public: "\n" "0.01\n" "0.01\n" - "1\n" + "0\n" "<_param name=\"sourceHeader\" type=\"description\" appearance=\"header\">" N_("Bump source") "\n" "0\n" "0\n" @@ -513,6 +514,221 @@ SpecularLight::get_filter_text (Inkscape::Extension::Extension * ext) return _filter; }; /* SpecularLight filter */ +/** + \brief Custom predefined Wax Bump filter. + + Turns an image to jelly + + Filter's parameters: + Options + * Image simplification (0.01->10., default 1.5) -> blur1 (stdDeviation) + * Bump simplification (0.01->10., default 1) -> blur2 (stdDeviation) + * Crop (-10.->10., default 1.) -> colormatrix2 (4th value of the last line) + * Red (-10.->10., default 0.) -> colormatrix2 (values, substract 0.21) + * Green (-10.->10., default 0.) -> colormatrix2 (values, substract 0.72) + * Blue (-10.->10., default 0.) -> colormatrix2 (values, substract 0.07) + * Background (enum, default color) -> + * color: colormatrix1 (in="flood1") + * image: colormatrix1 (in="SourceGraphic") + * blurred image: colormatrix1 (in="blur1") + * Background opacity (0.->1., default 0) -> colormatrix1 (last value) + Lighting (specular, distant light) + * Color (guint, default -1 (RGB:255,255,255))-> lighting (lighting-color) + * Height (-50.->50., default 5.) -> lighting (surfaceScale) + * Lightness (0.->10., default 1.4) -> lighting [diffuselighting (diffuseConstant)|specularlighting (specularConstant)] + * Precision (0->50, default 35) -> lighting (specularExponent) + * Azimuth (0->360, default 225) -> lightsOptions (distantAzimuth) + * Elevation (0->180, default 60) -> lightsOptions (distantElevation) + * Lighting blend (enum, default screen) -> blend1 (mode) + * Highlight blend (enum, default screen) -> blend2 (mode) + Bump + * Trasparency type (enum [in,atop], default atop) -> composite2 (operator) + * Color (guint, default -520083713 (RGB:225,0,38)) -> flood2 (flood-color) + * Revert bump (boolean, default false) -> composite1 (false: operator="out", true operator="in") +*/ + +class WaxBump : public Inkscape::Extension::Internal::Filter::Filter { +protected: + virtual gchar const * get_filter_text (Inkscape::Extension::Extension * ext); + +public: + WaxBump ( ) : Filter() { }; + virtual ~WaxBump ( ) { if (_filter != NULL) g_free((void *)_filter); return; } + + static void init (void) { + Inkscape::Extension::build_from_mem( + "\n" + "" N_("Wax Bump") "\n" + "org.inkscape.effect.filter.WaxBump\n" + "\n" + "\n" + "1.5\n" + "1\n" + "1\n" + "<_param name=\"sourceHeader\" type=\"description\" appearance=\"header\">" N_("Bump source") "\n" + "0\n" + "0\n" + "0\n" + "\n" + "<_item value=\"flood1\">" N_("Color") "\n" + "<_item value=\"SourceGraphic\">" N_("Image") "\n" + "<_item value=\"blur1\">" N_("Blurred image") "\n" + "\n" + "0\n" + "\n" + "\n" + "-1\n" + "5\n" + "1.4\n" + "35\n" + "225\n" + "60\n" + "\n" + "<_item value=\"screen\">" N_("Screen") "\n" + "<_item value=\"normal\">" N_("Normal") "\n" + "<_item value=\"darken\">" N_("Darken") "\n" + "<_item value=\"multiply\">" N_("Multiply") "\n" + "<_item value=\"lighten\">" N_("Lighten") "\n" + "\n" + "\n" + "<_item value=\"screen\">" N_("Screen") "\n" + "<_item value=\"normal\">" N_("Normal") "\n" + "<_item value=\"darken\">" N_("Darken") "\n" + "<_item value=\"multiply\">" N_("Multiply") "\n" + "<_item value=\"lighten\">" N_("Lighten") "\n" + "\n" + "\n" + "\n" + "-520083713\n" + "false\n" + "\n" + "<_item value=\"atop\">" N_("Atop") "\n" + "<_item value=\"in\">" N_("In") "\n" + "\n" + "\n" + "\n" + "\n" + "all\n" + "\n" + "\n" + "\n" + "\n" + "\n" + "" N_("Turns an image to jelly") "\n" + "\n" + "\n", new WaxBump()); + }; + +}; + +gchar const * +WaxBump::get_filter_text (Inkscape::Extension::Extension * ext) +{ + if (_filter != NULL) g_free((void *)_filter); + + std::ostringstream simplifyImage; + std::ostringstream simplifyBump; + std::ostringstream crop; + + std::ostringstream red; + std::ostringstream green; + std::ostringstream blue; + + std::ostringstream background; + std::ostringstream bgopacity; + + std::ostringstream height; + std::ostringstream lightness; + std::ostringstream precision; + std::ostringstream distantAzimuth; + std::ostringstream distantElevation; + + std::ostringstream lightRed; + std::ostringstream lightGreen; + std::ostringstream lightBlue; + + std::ostringstream floodRed; + std::ostringstream floodGreen; + std::ostringstream floodBlue; + std::ostringstream floodAlpha; + + std::ostringstream revert; + std::ostringstream lightingblend; + std::ostringstream highlightblend; + std::ostringstream transparency; + + simplifyImage << ext->get_param_float("simplifyImage"); + simplifyBump << ext->get_param_float("simplifyBump"); + crop << ext->get_param_float("crop"); + + red << ext->get_param_float("red") - 0.21; + green << ext->get_param_float("green") - 0.72; + blue << ext->get_param_float("blue") - 0.07; + + background << ext->get_param_enum("background"); + bgopacity << ext->get_param_float("bgopacity"); + + height << ext->get_param_float("height"); + lightness << ext->get_param_float("lightness"); + precision << ext->get_param_int("precision"); + distantAzimuth << ext->get_param_int("distantAzimuth"); + distantElevation << ext->get_param_int("distantElevation"); + + guint32 lightingColor = ext->get_param_color("lightingColor"); + lightRed << ((lightingColor >> 24) & 0xff); + lightGreen << ((lightingColor >> 16) & 0xff); + lightBlue << ((lightingColor >> 8) & 0xff); + + guint32 imageColor = ext->get_param_color("imageColor"); + floodRed << ((imageColor >> 24) & 0xff); + floodGreen << ((imageColor >> 16) & 0xff); + floodBlue << ((imageColor >> 8) & 0xff); + floodAlpha << (imageColor & 0xff) / 255.0F; + + if (ext->get_param_bool("revert")) { + revert << "in" ; + } else { + revert << "out" ; + } + + lightingblend << ext->get_param_enum("lightingblend"); + highlightblend << ext->get_param_enum("highlightblend"); + transparency << ext->get_param_enum("transparency"); + + _filter = g_strdup_printf( + "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + + "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + "\n", simplifyImage.str().c_str(), background.str().c_str(), bgopacity.str().c_str(), + red.str().c_str(), green.str().c_str(), blue.str().c_str(), crop.str().c_str(), + floodRed.str().c_str(), floodGreen.str().c_str(), floodBlue.str().c_str(), floodAlpha.str().c_str(), + revert.str().c_str(), simplifyBump.str().c_str(), + lightRed.str().c_str(), lightGreen.str().c_str(), lightBlue.str().c_str(), + lightness.str().c_str(), height.str().c_str(), precision.str().c_str(), + distantElevation.str().c_str(), distantAzimuth.str().c_str(), + lightingblend.str().c_str(), transparency.str().c_str(), highlightblend.str().c_str() ); + + return _filter; + +}; /* Wax bump filter */ + }; /* namespace Filter */ }; /* namespace Internal */ }; /* namespace Extension */ diff --git a/src/extension/internal/filter/color.h b/src/extension/internal/filter/color.h index e19c2054d..b34c2c61f 100644 --- a/src/extension/internal/filter/color.h +++ b/src/extension/internal/filter/color.h @@ -8,12 +8,13 @@ * Nicolas Dufour (UI) * * Color filters - * Brightness + * Brilliance * Channel painting * Color shift * Colorize * Duochrome * Greyscale + * Invert * Lightness * Quadritone * Solarize @@ -35,12 +36,12 @@ namespace Internal { namespace Filter { /** - \brief Custom predefined Brightness filter. + \brief Custom predefined Brilliance filter. - Brightness filter. + Brilliance filter. Filter's parameters: - * Brightness (1.->10., default 2.) -> colorMatrix (RVB entries) + * Brilliance (1.->10., default 2.) -> colorMatrix (RVB entries) * Over-saturation (0.->10., default 0.5) -> colorMatrix (6 other entries) * Lightness (-10.->10., default 0.) -> colorMatrix (last column) * Inverted (boolean, default false) -> colorMatrix @@ -51,18 +52,18 @@ namespace Filter { Vi Vi St 0 Li 0 0 0 1 0 */ -class Brightness : public Inkscape::Extension::Internal::Filter::Filter { +class Brilliance : public Inkscape::Extension::Internal::Filter::Filter { protected: virtual gchar const * get_filter_text (Inkscape::Extension::Extension * ext); public: - Brightness ( ) : Filter() { }; - virtual ~Brightness ( ) { if (_filter != NULL) g_free((void *)_filter); return; } + Brilliance ( ) : Filter() { }; + virtual ~Brilliance ( ) { if (_filter != NULL) g_free((void *)_filter); return; } static void init (void) { Inkscape::Extension::build_from_mem( "\n" - "" N_("Brightness") "\n" + "" N_("Brilliance") "\n" "org.inkscape.effect.filter.Brightness\n" "2\n" "0.5\n" @@ -77,12 +78,12 @@ public: "\n" "" N_("Brightness filter") "\n" "\n" - "\n", new Brightness()); + "\n", new Brilliance()); }; }; gchar const * -Brightness::get_filter_text (Inkscape::Extension::Extension * ext) +Brilliance::get_filter_text (Inkscape::Extension::Extension * ext) { if (_filter != NULL) g_free((void *)_filter); @@ -101,7 +102,7 @@ Brightness::get_filter_text (Inkscape::Extension::Extension * ext) } _filter = g_strdup_printf( - "\n" + "\n" "\n" "\n", brightness.str().c_str(), sat.str().c_str(), sat.str().c_str(), lightness.str().c_str(), sat.str().c_str(), brightness.str().c_str(), @@ -109,7 +110,7 @@ Brightness::get_filter_text (Inkscape::Extension::Extension * ext) sat.str().c_str(), brightness.str().c_str(), lightness.str().c_str()); return _filter; -}; /* Brightness filter */ +}; /* Brilliance filter */ /** \brief Custom predefined Channel Painting filter. @@ -607,6 +608,145 @@ Greyscale::get_filter_text (Inkscape::Extension::Extension * ext) return _filter; }; /* Greyscale filter */ +/** + \brief Custom predefined Invert filter. + + Manage hue, lightness and transparency inversions + + Filter's parameters: + * Invert hue (boolean, default false) -> color1 (values, true: 180, false: 0) + * Invert lightness (boolean, default false) -> color1 (values, true: 180, false: 0; XOR with Invert hue), + color2 (values: from a00 to a22, if 1, set -1 and set 1 in ax4, if -1, set 1 and set 0 in ax4) + * Invert transparency (boolean, default false) -> color2 (values: negate a30, a31 and a32, substract 1 from a33) + * Invert channels (enum, default Red and blue) -> color2 (values -for R&B: swap ax0 and ax2 in the first 3 lines) + * Light transparency (0.->1., default 0.) -> color2 (values: a33=a33-x) +*/ + +class Invert : public Inkscape::Extension::Internal::Filter::Filter { +protected: + virtual gchar const * get_filter_text (Inkscape::Extension::Extension * ext); + +public: + Invert ( ) : Filter() { }; + virtual ~Invert ( ) { if (_filter != NULL) g_free((void *)_filter); return; } + + static void init (void) { + Inkscape::Extension::build_from_mem( + "\n" + "" N_("Invert") "\n" + "org.inkscape.effect.filter.Invert\n" + "\n" + "<_item value=\"0\">" N_("No invertion") "\n" + "<_item value=\"1\">" N_("Red and blue") "\n" + "<_item value=\"2\">" N_("Red and green") "\n" + "<_item value=\"3\">" N_("Green and blue") "\n" + "\n" + "0\n" + "false\n" + "false\n" + "false\n" + "\n" + "all\n" + "\n" + "\n" + "\n" + "\n" + "\n" + "" N_("Manage hue, lightness and transparency inversions") "\n" + "\n" + "\n", new Invert()); + }; + +}; + +gchar const * +Invert::get_filter_text (Inkscape::Extension::Extension * ext) +{ + if (_filter != NULL) g_free((void *)_filter); + + std::ostringstream line1; + std::ostringstream line2; + std::ostringstream line3; + + std::ostringstream col5; + std::ostringstream transparency; + std::ostringstream hue; + + if (ext->get_param_bool("hue") xor ext->get_param_bool("lightness")) { + hue << "\n"; + } else { + hue << ""; + } + + if (ext->get_param_bool("transparency")) { + transparency << "0.21 0.72 0.07 " << 1 - ext->get_param_float("opacify"); + } else { + transparency << "-0.21 -0.72 -0.07 " << 2 - ext->get_param_float("opacify"); + } + + if (ext->get_param_bool("lightness")) { + switch (atoi(ext->get_param_enum("channels"))) { + case 1: + line1 << "0 0 -1"; + line2 << "0 -1 0"; + line3 << "-1 0 0"; + break; + case 2: + line1 << "0 -1 0"; + line2 << "-1 0 0"; + line3 << "0 0 -1"; + break; + case 3: + line1 << "-1 0 0"; + line2 << "0 0 -1"; + line3 << "0 -1 0"; + break; + default: + line1 << "-1 0 0"; + line2 << "0 -1 0"; + line3 << "0 0 -1"; + break; + } + col5 << "1"; + } else { + switch (atoi(ext->get_param_enum("channels"))) { + case 1: + line1 << "0 0 1"; + line2 << "0 1 0"; + line3 << "1 0 0"; + break; + case 2: + line1 << "0 1 0"; + line2 << "1 0 0"; + line3 << "0 0 1"; + break; + case 3: + line1 << "1 0 0"; + line2 << "0 0 1"; + line3 << "0 1 0"; + break; + default: + line1 << "1 0 0"; + line2 << "0 1 0"; + line3 << "0 0 1"; + break; + } + col5 << "0"; + } + + _filter = g_strdup_printf( + "\n" + "%s" + "\n" + "\n", hue.str().c_str(), + line1.str().c_str(), col5.str().c_str(), + line2.str().c_str(), col5.str().c_str(), + line3.str().c_str(), col5.str().c_str(), + transparency.str().c_str() ); + + return _filter; +}; /* Invert filter */ + /** \brief Custom predefined Lightness filter. diff --git a/src/extension/internal/filter/distort.h b/src/extension/internal/filter/distort.h index 7157722d7..3972029ae 100644 --- a/src/extension/internal/filter/distort.h +++ b/src/extension/internal/filter/distort.h @@ -8,6 +8,7 @@ * Nicolas Dufour (UI) * * Distort filters + * Felt Feather * Roughen * * Released under GNU GPL, read the file 'COPYING' for more information @@ -25,6 +26,139 @@ namespace Extension { namespace Internal { namespace Filter { +/** + \brief Custom predefined FeltFeather filter. + + Blur and displace edges of shapes and pictures + + Filter's parameters: + * Type (enum, default "In") -> + in = map (in="composite3") + out = map (in="blur") + * Horizontal blur (0.01->30., default 15) -> blur (stdDeviation) + * Vertical blur (0.01->30., default 15) -> blur (stdDeviation) + * Dilatation (n-1th value, 0.->100., default 1) -> colormatrix (matrix) + * Erosion (nth value, 0.->100., default 0) -> colormatrix (matrix) + * Stroke (enum, default "Normal") -> + Normal = composite4 (operator="atop") + Wide = composite4 (operator="over") + Narrow = composite4 (operator="in") + No fill = composite4 (operator="xor") + + * Roughness (group) + * Turbulence type (enum, default fractalNoise else turbulence) -> turbulence (type) + * Horizontal frequency (0.001->1., default 0.05) -> turbulence (baseFrequency [/1000]) + * Vertical frequency (0.001->1., default 0.05) -> turbulence (baseFrequency [/1000]) + * Complexity (1->5, default 3) -> turbulence (numOctaves) + * Variation (0->100, default 0) -> turbulence (seed) +*/ + +class FeltFeather : public Inkscape::Extension::Internal::Filter::Filter { +protected: + virtual gchar const * get_filter_text (Inkscape::Extension::Extension * ext); + +public: + FeltFeather ( ) : Filter() { }; + virtual ~FeltFeather ( ) { if (_filter != NULL) g_free((void *)_filter); return; } + + static void init (void) { + Inkscape::Extension::build_from_mem( + "\n" + "" N_("Felt Feather") "\n" + "org.inkscape.effect.filter.FeltFeather\n" + "\n" + "<_item value=\"in\">" N_("In") "\n" + "<_item value=\"out\">" N_("Out") "\n" + "\n" + "15\n" + "15\n" + "1\n" + "0\n" + "\n" + "<_item value=\"atop\">" N_("Normal") "\n" + "<_item value=\"over\">" N_("Wide") "\n" + "<_item value=\"in\">" N_("Narrow") "\n" + "<_item value=\"xor\">" N_("No fill") "\n" + "\n" + "\n" + "<_item value=\"fractalNoise\">Fractal noise\n" + "<_item value=\"turbulence\">Turbulence\n" + "\n" + "0.05\n" + "0.05\n" + "3\n" + "0\n" + "\n" + "all\n" + "\n" + "\n" + "\n" + "\n" + "\n" + "" N_("Blur and displace edges of shapes and pictures") "\n" + "\n" + "\n", new FeltFeather()); + }; + +}; + +gchar const * +FeltFeather::get_filter_text (Inkscape::Extension::Extension * ext) +{ + if (_filter != NULL) g_free((void *)_filter); + + + std::ostringstream hblur; + std::ostringstream vblur; + std::ostringstream dilat; + std::ostringstream erosion; + + std::ostringstream turbulence; + std::ostringstream hfreq; + std::ostringstream vfreq; + std::ostringstream complexity; + std::ostringstream variation; + + std::ostringstream map; + std::ostringstream stroke; + + hblur << ext->get_param_float("hblur"); + vblur << ext->get_param_float("vblur"); + dilat << ext->get_param_float("dilat"); + erosion << -ext->get_param_float("erosion"); + + turbulence << ext->get_param_enum("turbulence"); + hfreq << ext->get_param_float("hfreq"); + vfreq << ext->get_param_float("vfreq"); + complexity << ext->get_param_int("complexity"); + variation << ext->get_param_int("variation"); + + stroke << ext->get_param_enum("stroke"); + + const gchar *maptype = ext->get_param_enum("type"); + if (g_ascii_strcasecmp("in", maptype) == 0) { + map << "composite3"; + } else { + map << "blur"; + } + + _filter = g_strdup_printf( + "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + "\n", hblur.str().c_str(), vblur.str().c_str(), + turbulence.str().c_str(), complexity.str().c_str(), variation.str().c_str(), hfreq.str().c_str(), vfreq.str().c_str(), + map.str().c_str(), dilat.str().c_str(), erosion.str().c_str(), stroke.str().c_str() ); + + return _filter; +}; /* Felt feather filter */ + /** \brief Custom predefined Roughen filter. @@ -32,8 +166,8 @@ namespace Filter { Filter's parameters: * Turbulence type (enum, default fractalNoise else turbulence) -> turbulence (type) - * Horizontal frequency (*1000) (0.01->10000., default 13) -> turbulence (baseFrequency [/1000]) - * Vertical frequency (*1000) (0.01->10000., default 13) -> turbulence (baseFrequency [/1000]) + * Horizontal frequency (0.01->10., default 0.013) -> turbulence (baseFrequency) + * Vertical frequency (0.01->10., default 0.013) -> turbulence (baseFrequency) * Complexity (1->5, default 5) -> turbulence (numOctaves) * Variation (1->360, default 1) -> turbulence (seed) * Intensity (0.0->50., default 6.6) -> displacement (scale) @@ -56,8 +190,8 @@ public: "<_item value=\"fractalNoise\">Fractal noise\n" "<_item value=\"turbulence\">Turbulence\n" "\n" - "13\n" - "13\n" + "0.013\n" + "0.013\n" "5\n" "0\n" "6.6\n" @@ -88,8 +222,8 @@ Roughen::get_filter_text (Inkscape::Extension::Extension * ext) std::ostringstream intensity; type << ext->get_param_enum("type"); - hfreq << (ext->get_param_float("hfreq") / 1000); - vfreq << (ext->get_param_float("vfreq") / 1000); + hfreq << ext->get_param_float("hfreq"); + vfreq << ext->get_param_float("vfreq"); complexity << ext->get_param_int("complexity"); variation << ext->get_param_int("variation"); intensity << ext->get_param_float("intensity"); diff --git a/src/extension/internal/filter/filter-all.cpp b/src/extension/internal/filter/filter-all.cpp index 5b3280656..dcd68b75a 100755 --- a/src/extension/internal/filter/filter-all.cpp +++ b/src/extension/internal/filter/filter-all.cpp @@ -45,20 +45,23 @@ Filter::filters_all (void ) DiffuseLight::init(); MatteJelly::init(); SpecularLight::init(); + WaxBump::init(); // Color - Brightness::init(); + Brilliance::init(); ChannelPaint::init(); ColorShift::init(); Colorize::init(); Duochrome::init(); Greyscale::init(); + Invert::init(); Lightness::init(); Quadritone::init(); Solarize::init(); Tritone::init(); // Distort + FeltFeather::init(); Roughen::init(); // Image effect @@ -70,6 +73,7 @@ Filter::filters_all (void ) Drawing::init(); Electrize::init(); NeonDraw::init(); + //PointEngraving::init(); Posterize::init(); PosterizeBasic::init(); @@ -86,6 +90,9 @@ Filter::filters_all (void ) // Shadows and glows ColorizableDropShadow::init(); + // Textures + // InkBlot::init(); + // Fill and transparency ChannelTransparency::init(); Silhouette::init(); diff --git a/src/extension/internal/filter/paint.h b/src/extension/internal/filter/paint.h index c2eb0c0ae..a3077d1c4 100644 --- a/src/extension/internal/filter/paint.h +++ b/src/extension/internal/filter/paint.h @@ -628,12 +628,13 @@ NeonDraw::get_filter_text (Inkscape::Extension::Extension * ext) lightness << ext->get_param_float("lightness"); const gchar *typestr = ext->get_param_enum("type"); - if (ext->get_param_bool("dark")) + if (ext->get_param_bool("dark")) { dark << "component2"; - else if ((g_ascii_strcasecmp("table", typestr) == 0)) + } else if ((g_ascii_strcasecmp("table", typestr) == 0)) { dark << "blur2"; - else + } else { dark << "component1"; + } _filter = g_strdup_printf( "\n" -- cgit v1.2.3