summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNicholas Bishop <nicholasbishop@gmail.com>2007-08-20 11:19:17 +0000
committernicholasbishop <nicholasbishop@users.sourceforge.net>2007-08-20 11:19:17 +0000
commit761f7da58cd6d625b88c24eee6fae1b7fa3bfcdd (patch)
tree5599e22f12aa5369dce1b8217c93f7a77fae18ba /src
parentUse the embedded thumbnails for preview when poppler-cairo is not available (diff)
downloadinkscape-761f7da58cd6d625b88c24eee6fae1b7fa3bfcdd.tar.gz
inkscape-761f7da58cd6d625b88c24eee6fae1b7fa3bfcdd.zip
Filter effects dialog:
* A couple small corrections to settings colors in the filter dialog (bzr r3551)
Diffstat (limited to 'src')
-rw-r--r--src/ui/dialog/filter-effects-dialog.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ui/dialog/filter-effects-dialog.cpp b/src/ui/dialog/filter-effects-dialog.cpp
index 72ee99684..3fa7d73d4 100644
--- a/src/ui/dialog/filter-effects-dialog.cpp
+++ b/src/ui/dialog/filter-effects-dialog.cpp
@@ -292,7 +292,7 @@ public:
{
std::ostringstream os;
const Gdk::Color c = get_color();
- const int r = (c.get_red() + 1) / 256 - 1, g = (c.get_green() + 1) / 256 - 1, b = (c.get_blue() + 1) / 256 - 1;
+ const int r = c.get_red() / 257, g = c.get_green() / 257, b = c.get_blue() / 257;
os << "rgb(" << r << "," << g << "," << b << ")";
return os.str();
}
@@ -303,9 +303,9 @@ public:
const gchar* val = attribute_value(o);
if(val) {
const guint32 i = sp_svg_read_color(val, 0xFFFFFFFF);
- const int r = SP_RGBA32_R_U(i) + 1, g = SP_RGBA32_G_U(i) + 1, b = SP_RGBA32_B_U(i) + 1;
+ const int r = SP_RGBA32_R_U(i), g = SP_RGBA32_G_U(i), b = SP_RGBA32_B_U(i);
Gdk::Color col;
- col.set_rgb(r * 256 - 1, g * 256 - 1, b * 256 - 1);
+ col.set_rgb(r * 257, g * 257, b * 257);
set_color(col);
}
}