summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d2ee5d1)
raw | patch | inline | side by side (parent: d2ee5d1)
author | nicholasbishop <nicholasbishop@users.sourceforge.net> | |
Mon, 20 Aug 2007 11:19:17 +0000 (11:19 +0000) | ||
committer | nicholasbishop <nicholasbishop@users.sourceforge.net> | |
Mon, 20 Aug 2007 11:19:17 +0000 (11:19 +0000) |
* A couple small corrections to settings colors in the filter dialog
src/ui/dialog/filter-effects-dialog.cpp | patch | blob | history |
index 72ee9968451a21f3d8502ae947fac272f41bf081..3fa7d73d416320ede7df5736d103716170562f35 100644 (file)
{
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();
}
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);
}
}