42:1d03dc1173cd | 43:08dc62e03a6d |
---|---|
80 const int alpha = pattern.cap(5).toInt(); | 80 const int alpha = pattern.cap(5).toInt(); |
81 definition.faceColor.setAlpha(alpha); | 81 definition.faceColor.setAlpha(alpha); |
82 } | 82 } |
83 } | 83 } |
84 } | 84 } |
85 | |
86 /* | |
87 * Calculates the luma-value for the given color. | |
88 * c.f. https://en.wikipedia.org/wiki/Luma_(video) | |
89 */ | |
90 double luma(const QColor& color) | |
91 { | |
92 return 0.2126 * color.redF() + 0.7152 * color.greenF() + 0.0722 * color.blueF(); | |
93 } |