Code

fix parameter ranges, copyedit
authorbuliabyak <buliabyak@users.sourceforge.net>
Mon, 26 Jan 2009 21:38:06 +0000 (21:38 +0000)
committerbuliabyak <buliabyak@users.sourceforge.net>
Mon, 26 Jan 2009 21:38:06 +0000 (21:38 +0000)
src/extension/internal/bitmap/modulate.cpp
src/extension/internal/bitmap/sample.cpp

index d8ea288bab2b0aa508eb25bceb7ff53fd8f8f88f..9b7a1a655a7e6d72c3878a2914047762ba7be793 100644 (file)
@@ -18,8 +18,8 @@ namespace Bitmap {
        
 void
 Modulate::applyEffect(Magick::Image* image) {
-       float hue = (_hue + 180.0) / 180.0;
-       image->modulate(_brightness, _saturation, hue);
+       float hue = (_hue * 200 / 360.0) + 100;
+       image->modulate(_brightness + 100, _saturation + 100, hue);
 }
 
 void
@@ -36,17 +36,17 @@ Modulate::init(void)
 {
        Inkscape::Extension::build_from_mem(
                "<inkscape-extension xmlns=\"" INKSCAPE_EXTENSION_URI "\">\n"
-                       "<name>" N_("Modulate") "</name>\n"
+                       "<name>" N_("HSB Adjust") "</name>\n"
                        "<id>org.inkscape.effect.bitmap.modulate</id>\n"                        
-                       "<param name=\"brightness\" gui-text=\"" N_("Brightness") "\" type=\"float\" min=\"0\" max=\"100\">1</param>\n"
-                       "<param name=\"saturation\" gui-text=\"" N_("Saturation") "\" type=\"float\" min=\"0\" max=\"100\">1</param>\n"
-                       "<param name=\"hue\" gui-text=\"" N_("Hue") "\" type=\"float\" min=\"-180\" max=\"180\">0</param>\n"
+                       "<param name=\"hue\" gui-text=\"" N_("Hue") "\" type=\"float\" min=\"-360\" max=\"360\">0</param>\n"
+                       "<param name=\"saturation\" gui-text=\"" N_("Saturation") "\" type=\"float\" min=\"-200\" max=\"200\">0</param>\n"
+                       "<param name=\"brightness\" gui-text=\"" N_("Brightness") "\" type=\"float\" min=\"-200\" max=\"200\">0</param>\n"
                        "<effect>\n"
                                "<object-type>all</object-type>\n"
                                "<effects-menu>\n"
                                        "<submenu name=\"" N_("Raster") "\" />\n"
                                "</effects-menu>\n"
-                               "<menu-tip>" N_("Modulate percent hue, saturation, and brightness of selected bitmap(s).") "</menu-tip>\n"
+                               "<menu-tip>" N_("Adjust the amount of hue, saturation, and brightness in selected bitmap(s)") "</menu-tip>\n"
                        "</effect>\n"
                "</inkscape-extension>\n", new Modulate());
 }
index 4c2e95a2161cc9c772780f6dd8666cd1addbc854..70c8995ac014f83ea06b6ea2a644ffa56ccef042 100644 (file)
@@ -35,7 +35,7 @@ Sample::init(void)
 {
        Inkscape::Extension::build_from_mem(
                "<inkscape-extension xmlns=\"" INKSCAPE_EXTENSION_URI "\">\n"
-                       "<name>" N_("Sample") "</name>\n"
+                       "<name>" N_("Resample") "</name>\n"
                        "<id>org.inkscape.effect.bitmap.sample</id>\n"
                        "<param name=\"width\" gui-text=\"" N_("Width") "\" type=\"int\" min=\"0\" max=\"6400\">100</param>\n"
                        "<param name=\"height\" gui-text=\"" N_("Height") "\" type=\"int\" min=\"0\" max=\"6400\">100</param>\n"
@@ -44,7 +44,7 @@ Sample::init(void)
                                "<effects-menu>\n"
                                        "<submenu name=\"" N_("Raster") "\" />\n"
                                "</effects-menu>\n"
-                               "<menu-tip>" N_("Alter the resolution of selected image by resizing it by given dimensions.") "</menu-tip>\n"
+                               "<menu-tip>" N_("Alter the resolution of selected image by resizing it to the given pixel size") "</menu-tip>\n"
                        "</effect>\n"
                "</inkscape-extension>\n", new Sample());
 }