Code

98c245b378cc7a23ddb86ef4d44e22494ff048cf
[inkscape.git] / src / extension / internal / bitmap / emboss.cpp
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 "emboss.h"
14 namespace Inkscape {
15 namespace Extension {
16 namespace Internal {
17 namespace Bitmap {
18         
19 void
20 Emboss::applyEffect(Magick::Image *image) {
21         image->emboss(_radius, _sigma);
22 }
24 void
25 Emboss::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 Emboss::init(void)
34 {
35         Inkscape::Extension::build_from_mem(
36                 "<inkscape-extension xmlns=\"" INKSCAPE_EXTENSION_URI "\">\n"
37                         "<name>" N_("Emboss") "</name>\n"
38                         "<id>org.inkscape.effect.bitmap.emboss</id>\n"
39                         "<param name=\"radius\" gui-text=\"" N_("Radius") "\" type=\"float\" min=\"0\" max=\"100\">1.0</param>\n"
40                         "<param name=\"sigma\" gui-text=\"" N_("Sigma") "\" type=\"float\" min=\"-50\" max=\"50\">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_("Emboss selected bitmap(s) -- highlight edges with 3D effect.") "</menu-tip>\n"
47                         "</effect>\n"
48                 "</inkscape-extension>\n", new Emboss());
49 }
51 }; /* namespace Bitmap */
52 }; /* namespace Internal */
53 }; /* namespace Extension */
54 }; /* namespace Inkscape */