From b7d95f994b4858eeab9ce480b04933b5e94d40eb Mon Sep 17 00:00:00 2001 From: tavmjong Date: Fri, 28 Sep 2007 15:31:46 +0000 Subject: [PATCH] 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. --- src/display/nr-filter-colormatrix.cpp | 14 +++++++------- src/ui/dialog/filter-effects-dialog.cpp | 3 ++- 2 files changed, 9 insertions(+), 8 deletions(-) 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); } } } -- 2.30.2