~valavanisalex/ubuntu/precise/inkscape/fix-943984

« back to all changes in this revision

Viewing changes to inkscape-0.47pre1/src/extension/internal/bitmap/emboss.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Bryce Harrington
  • Date: 2009-07-02 17:09:45 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20090702170945-nn6d6zswovbwju1t
Tags: 0.47~pre1-0ubuntu1
* New upstream release.
  - Don't constrain maximization on small resolution devices (pre0)
    (LP: #348842)
  - Fixes segfault on startup (pre0)
    (LP: #391149)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 */
 
8
 
 
9
#include "extension/effect.h"
 
10
#include "extension/system.h"
 
11
 
 
12
#include "emboss.h"
 
13
 
 
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
}
 
23
 
 
24
void
 
25
Emboss::refreshParameters(Inkscape::Extension::Effect *module) {        
 
26
        _radius = module->get_param_float("radius");
 
27
        _sigma = module->get_param_float("sigma");
 
28
}
 
29
 
 
30
#include "../clear-n_.h"
 
31
 
 
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
}
 
50
 
 
51
}; /* namespace Bitmap */
 
52
}; /* namespace Internal */
 
53
}; /* namespace Extension */
 
54
}; /* namespace Inkscape */