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 "raise.h"
14 namespace Inkscape {
15 namespace Extension {
16 namespace Internal {
17 namespace Bitmap {
19 void
20 Raise::applyEffect(Magick::Image* image) {
21 Magick::Geometry geometry(_width, _height, 0, 0);
22 image->raise(geometry, _raisedFlag);
23 }
25 void
26 Raise::refreshParameters(Inkscape::Extension::Effect* module) {
27 _width = module->get_param_int("width");
28 _height = module->get_param_int("height");
29 _raisedFlag = module->get_param_bool("raisedFlag");
30 }
32 #include "../clear-n_.h"
34 void
35 Raise::init(void)
36 {
37 Inkscape::Extension::build_from_mem(
38 "<inkscape-extension xmlns=\"" INKSCAPE_EXTENSION_URI "\">\n"
39 "<name>" N_("Raise") "</name>\n"
40 "<id>org.inkscape.effect.bitmap.raise</id>\n"
41 "<param name=\"width\" gui-text=\"" N_("Width:") "\" type=\"int\" min=\"0\" max=\"800\">6</param>\n"
42 "<param name=\"height\" gui-text=\"" N_("Height:") "\" type=\"int\" min=\"0\" max=\"800\">6</param>\n"
43 "<param name=\"raisedFlag\" gui-text=\"" N_("Raised") "\" type=\"boolean\">0</param>\n"
44 "<effect>\n"
45 "<object-type>all</object-type>\n"
46 "<effects-menu>\n"
47 "<submenu name=\"" N_("Raster") "\" />\n"
48 "</effects-menu>\n"
49 "<menu-tip>" N_("Alter lightness the edges of selected bitmap(s) to create a raised appearance") "</menu-tip>\n"
50 "</effect>\n"
51 "</inkscape-extension>\n", new Raise());
52 }
54 }; /* namespace Bitmap */
55 }; /* namespace Internal */
56 }; /* namespace Extension */
57 }; /* namespace Inkscape */