~ubuntu-branches/debian/experimental/inkscape/experimental

« back to all changes in this revision

Viewing changes to src/extension/internal/bitmap/swirl.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Viehmann
  • Date: 2008-09-09 23:29:02 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20080909232902-c50iujhk1w79u8e7
Tags: 0.46-2.1
* Non-maintainer upload.
* Add upstream patch fixing a crash in the open dialog
  in the zh_CN.utf8 locale. Closes: #487623.
  Thanks to Luca Bruno for the patch.

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 "swirl.h"
 
13
 
 
14
namespace Inkscape {
 
15
namespace Extension {
 
16
namespace Internal {
 
17
namespace Bitmap {
 
18
        
 
19
void
 
20
Swirl::applyEffect(Magick::Image* image) {
 
21
        image->swirl(_degrees);
 
22
}
 
23
 
 
24
void
 
25
Swirl::refreshParameters(Inkscape::Extension::Effect* module) {
 
26
        _degrees = module->get_param_int("degrees");
 
27
}
 
28
 
 
29
#include "../clear-n_.h"
 
30
 
 
31
void
 
32
Swirl::init(void)
 
33
{
 
34
        Inkscape::Extension::build_from_mem(
 
35
                "<inkscape-extension>\n"
 
36
                        "<name>" N_("Swirl") "</name>\n"
 
37
                        "<id>org.inkscape.effect.bitmap.swirl</id>\n"
 
38
                        "<param name=\"degrees\" gui-text=\"" N_("Degrees") "\" type=\"int\" min=\"-360\" max=\"360\">30</param>\n"
 
39
                        "<effect>\n"
 
40
                                "<object-type>all</object-type>\n"
 
41
                                "<effects-menu>\n"
 
42
                                        "<submenu name=\"" N_("Raster") "\" />\n"
 
43
                                "</effects-menu>\n"
 
44
                                "<menu-tip>" N_("Swirl selected bitmap(s) around center point.") "</menu-tip>\n"
 
45
                        "</effect>\n"
 
46
                "</inkscape-extension>\n", new Swirl());
 
47
}
 
48
 
 
49
}; /* namespace Bitmap */
 
50
}; /* namespace Internal */
 
51
}; /* namespace Extension */
 
52
}; /* namespace Inkscape */