From: tavmjong Date: Fri, 28 Sep 2007 15:31:46 +0000 (+0000) Subject: Color Matrix Filter: X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b7d95f994b4858eeab9ce480b04933b5e94d40eb;p=inkscape.git Color Matrix Filter: Matrix mode: set default to Identity matrix. Matrix mode: multiply 5th column by 255. Hue Rotation mode: convert degrees to radians for sin/cos. --- diff --git a/src/display/nr-filter-colormatrix.cpp b/src/display/nr-filter-colormatrix.cpp index 74394bfc1..3ed193984 100644 --- a/src/display/nr-filter-colormatrix.cpp +++ b/src/display/nr-filter-colormatrix.cpp @@ -47,7 +47,7 @@ int FilterColorMatrix::render(FilterSlot &slot, Matrix const &trans) { switch(type){ case COLORMATRIX_MATRIX: if (values.size()!=20) { - g_warning("ColorMatrix: values parameter error. Wrong size."); + g_warning("ColorMatrix: values parameter error. Wrong size: %i.", values.size()); return -1; } for (x=x0;xappend()); + // Default to identity matrix for(int c = 0; c < cols; ++c, ++ndx) - row[_columns.cols[c]] = ndx < (int)values->size() ? (*values)[ndx] : 0; + row[_columns.cols[c]] = ndx < (int)values->size() ? (*values)[ndx] : (r == c ? 1 : 0); } } }