1 /*
2 * Copyright (C) 2007 Authors:
3 * Christopher Brown <audiere@gmail.com>
4 * Ted Gould <ted@gould.cx>
5 *
6 * Released under GNU GPL, read the file 'COPYING' for more information
7 */
9 #include "extension/effect.h"
10 #include "extension/system.h"
12 #include "blur.h"
14 namespace Inkscape {
15 namespace Extension {
16 namespace Internal {
17 namespace Bitmap {
19 void
20 Blur::applyEffect(Magick::Image *image) {
21 image->blur(_radius, _sigma);
22 }
24 void
25 Blur::refreshParameters(Inkscape::Extension::Effect *module) {
26 _radius = module->get_param_float("radius");
27 _sigma = module->get_param_float("sigma");
28 }
30 #include "../clear-n_.h"
32 void
33 Blur::init(void)
34 {
35 Inkscape::Extension::build_from_mem(
36 "<inkscape-extension xmlns=\"" INKSCAPE_EXTENSION_URI "\">\n"
37 "<name>" N_("Blur") "</name>\n"
38 "<id>org.inkscape.effect.bitmap.blur</id>\n"
39 "<param name=\"radius\" gui-text=\"" N_("Radius:") "\" type=\"float\" min=\"0\" max=\"100\">1</param>\n"
40 "<param name=\"sigma\" gui-text=\"" N_("Sigma:") "\" type=\"float\" min=\"0\" max=\"100\">0.5</param>\n"
41 "<effect>\n"
42 "<object-type>all</object-type>\n"
43 "<effects-menu>\n"
44 "<submenu name=\"" N_("Raster") "\" />\n"
45 "</effects-menu>\n"
46 "<menu-tip>" N_("Blur selected bitmap(s)") "</menu-tip>\n"
47 "</effect>\n"
48 "</inkscape-extension>\n", new Blur());
49 }
51 }; /* namespace Bitmap */
52 }; /* namespace Internal */
53 }; /* namespace Extension */
54 }; /* namespace Inkscape */