painting/qgammatables.cpp

Switch to Source codePreprocessed file
LineSource CodeCoverage
1 -
2 -
3 -
4 -
5QDrawHelperGammaTables::QDrawHelperGammaTables(qreal smoothing) -
6{ -
7 const qreal gray_gamma = 2.31; -
8 for (int i=0; i<256; ++i)
never evaluated: i<256
0
9 qt_pow_gamma[i] = uint(qRound(qPow(i / qreal(255.), gray_gamma) * 2047));
never executed: qt_pow_gamma[i] = uint(qRound(qPow(i / qreal(255.), gray_gamma) * 2047));
0
10 for (int i=0; i<2048; ++i)
never evaluated: i<2048
0
11 qt_pow_invgamma[i] = uchar(qRound(qPow(i / qreal(2047.0), 1 / gray_gamma) * 255));
never executed: qt_pow_invgamma[i] = uchar(qRound(qPow(i / qreal(2047.0), 1 / gray_gamma) * 255));
0
12 -
13 refresh(smoothing); -
14}
never executed: }
0
15 -
16void QDrawHelperGammaTables::refresh(qreal smoothing) -
17{ -
18 for (int i=0; i<256; ++i) {
never evaluated: i<256
0
19 qt_pow_rgb_gamma[i] = uchar(qRound(qPow(i / qreal(255.0), smoothing) * 255)); -
20 qt_pow_rgb_invgamma[i] = uchar(qRound(qPow(i / qreal(255.), 1 / smoothing) * 255)); -
21 }
never executed: }
0
22}
never executed: }
0
23 -
24 -
25 -
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial