Code

Filters. New custom predefined filters (all ABCs, Neon draw, Color shilf, Silhouette...
[inkscape.git] / src / extension / internal / filter / drop-shadow.h
index 22890d39a67e2afb1394454958d5fc704d2ae34c..12f0c60559a4b5e57f9a726d32226521bb2faa4c 100644 (file)
@@ -141,71 +141,6 @@ DropGlow::get_filter_text (Inkscape::Extension::Extension * ext)
        return _filter;
 };
 
-class ColorizableDropShadow : public Inkscape::Extension::Internal::Filter::Filter {
-protected:
-       virtual gchar const * get_filter_text (Inkscape::Extension::Extension * ext);
-
-public:
-       ColorizableDropShadow ( ) : Filter() { };
-       virtual ~ColorizableDropShadow ( ) { if (_filter != NULL) g_free((void *)_filter); return; }
-
-       static void init (void) {
-               Inkscape::Extension::build_from_mem(
-                       "<inkscape-extension xmlns=\"" INKSCAPE_EXTENSION_URI "\">\n"
-                               "<name>" N_("Drop shadow, color") "</name>\n"
-                               "<id>org.inkscape.effect.filter.colorizable-drop-shadow</id>\n"
-                               "<param name=\"blur\" gui-text=\"" N_("Blur radius (px):") "\" type=\"float\" min=\"0.0\" max=\"200.0\">3.0</param>\n"
-                               "<param name=\"xoffset\" gui-text=\"" N_("Horizontal offset (px):") "\" type=\"float\" min=\"-50.0\" max=\"50.0\">6.0</param>\n"
-                               "<param name=\"yoffset\" gui-text=\"" N_("Vertical offset (px):") "\" type=\"float\" min=\"-50.0\" max=\"50.0\">6.0</param>\n"
-                               "<param name=\"color\" gui-text=\"" N_("Color") "\" type=\"color\">127</param>\n"
-                               "<effect>\n"
-                                       "<object-type>all</object-type>\n"
-                                       "<effects-menu>\n"
-                                               "<submenu name=\"" N_("Filters") "\">\n"
-                                               "<submenu name=\"" N_("Experimental") "\"/>\n"
-                             "</submenu>\n"
-                                       "</effects-menu>\n"
-                                       "<menu-tip>" N_("Colorizable Drop shadow") "</menu-tip>\n"
-                               "</effect>\n"
-                       "</inkscape-extension>\n", new ColorizableDropShadow());
-       };
-
-};
-
-gchar const *
-ColorizableDropShadow::get_filter_text (Inkscape::Extension::Extension * ext)
-{
-       if (_filter != NULL) g_free((void *)_filter);
-
-    std::ostringstream blur;
-    std::ostringstream a;
-    std::ostringstream r;
-    std::ostringstream g;
-    std::ostringstream b;
-    std::ostringstream x;
-    std::ostringstream y;
-
-    guint32 color = ext->get_param_color("color");
-
-    blur << ext->get_param_float("blur");
-    x << ext->get_param_float("xoffset");
-    y << ext->get_param_float("yoffset");
-    a << (color & 0xff) / 255.0F;
-    r << ((color >> 24) & 0xff);
-    g << ((color >> 16) & 0xff);
-    b << ((color >>  8) & 0xff);
-
-       _filter = g_strdup_printf(
-               "<filter xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\" color-interpolation-filters=\"sRGB\" height=\"1.2\" width=\"1.2\" y=\"-0.1\" x=\"-0.1\" inkscape:label=\"Drop shadow, color\">\n"
-                       "<feFlood flood-opacity=\"%s\" result=\"flood\" flood-color=\"rgb(%s,%s,%s)\" />\n"
-                       "<feComposite in2=\"SourceGraphic\" in=\"flood\" result=\"composite\" operator=\"in\" />\n"
-                       "<feGaussianBlur result=\"blur\" stdDeviation=\"%s\" in=\"composite\" />\n"
-                       "<feOffset result=\"offsetBlur\" dx=\"%s\" dy=\"%s\" />\n"
-               "<feComposite in2=\"offsetBlur\" in=\"SourceGraphic\" operator=\"over\" result=\"compositeBlur\" />\n"
-               "</filter>\n", a.str().c_str(), r.str().c_str(), g.str().c_str(), b.str().c_str(), blur.str().c_str(), x.str().c_str(), y.str().c_str());
-
-       return _filter;
-};
 }; /* namespace Filter */
 }; /* namespace Internal */
 }; /* namespace Extension */