diff options
author | Jakub Adam <jakub.adam@ktknet.cz> | 2016-01-16 15:40:16 +0100 |
---|---|---|
committer | Jakub Adam <jakub.adam@ktknet.cz> | 2016-02-01 18:27:12 +0000 |
commit | 80eabc56349b5efe4acf3fcb467b5b2d6491131f (patch) | |
tree | 764b3b8d6e9e3407ea6f7e5b6af1b005f9308ded /src/quick/scenegraph/util/qsgdefaultpainternode.cpp | |
parent | 16a9c66bc538324ab8a31131e8a6a2a86d459cc0 (diff) |
QSGDefaultRectangleNode: Fix off-by-one color rendering
Implicit conversion from floating-point to int, which simply truncates
the number's fractional part, may have caused the rectangle fill
to be rendered in a color with some of its RGB components different
by ±1 from the specified value.
For example, the actual on-screen color of the following QML item was
#010101 on 32bit Intel (no antialiasing or alpha channel):
Rectangle {
width: 100
height: 100
color: '#020202'
}
This commit improves precision of the calculation by applying qRound()
before the conversion to integer.
Change-Id: Ia849c31ba9872e7a92608245406d178051b21917
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Diffstat (limited to 'src/quick/scenegraph/util/qsgdefaultpainternode.cpp')
0 files changed, 0 insertions, 0 deletions