----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/108709/#review26584 -----------------------------------------------------------
This review has been submitted with commit 780fe134176171a032b58c75cb7d6614aa42613d by Friedrich W. H. Kossebau to branch master. - Commit Hook On Feb. 3, 2013, 1:12 a.m., Friedrich W. H. Kossebau wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://git.reviewboard.kde.org/r/108709/ > ----------------------------------------------------------- > > (Updated Feb. 3, 2013, 1:12 a.m.) > > > Review request for Calligra, Cyrille Berger Skott and Boudewijn Rempt. > > > Description > ------- > > While I just wanted to fix the warning about "(qint16)255 - weight" possibly > being out-of-range, I wondered if the calculation of the parts of the colors > being mixed in is behaving like wanted. > The old code "(int)(mix * 255)" will map to "0" for values of mix in the > range of [0..1/255[, while it will only map to 255 when mix is exactly 1.0. > Which gives the foreground color less power than the background color in > average here. > > Attached patch fixes that by using the formula "int(mix * 256)" which > distributes the values [0.0..1.0[ equally to the range [0..255], with the > exception of 1.0, which would be 256, but that can be catched. > > The proposed algorithm might be more correct, but has the problem that any > stored settings of the mix value would result in slight color changes. No > idea if that can happen, your call. > > Any better algorithm? > > If okay, okay to also backport to 2.6? > > > Diffs > ----- > > krita/plugins/paintops/libpaintop/kis_color_source.cpp fe19834 > > Diff: http://git.reviewboard.kde.org/r/108709/diff/ > > > Testing > ------- > > > Thanks, > > Friedrich W. H. Kossebau > >
_______________________________________________ calligra-devel mailing list calligra-devel@kde.org https://mail.kde.org/mailman/listinfo/calligra-devel