From: nicholasbishop Date: Mon, 20 Aug 2007 11:19:17 +0000 (+0000) Subject: Filter effects dialog: X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2c1198bed6e28190d7d1caae429cbb71dfe2ce44;p=inkscape.git Filter effects dialog: * A couple small corrections to settings colors in the filter dialog --- 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); } }