diff options
author | Jani Hautakangas <jani.hautakangas@nokia.com> | 2011-01-11 11:14:23 (GMT) |
---|---|---|
committer | Jani Hautakangas <jani.hautakangas@nokia.com> | 2011-01-11 11:21:06 (GMT) |
commit | e0ed2387bc818f11b16460b0150d4ea75bcf37d6 (patch) | |
tree | b504d6314cfaac88adc7b3c62088615df309366b /src | |
parent | e9e4fb8b15b5fd353a9728a76f5d528ec312ebb3 (diff) | |
download | Qt-e0ed2387bc818f11b16460b0150d4ea75bcf37d6.zip Qt-e0ed2387bc818f11b16460b0150d4ea75bcf37d6.tar.gz Qt-e0ed2387bc818f11b16460b0150d4ea75bcf37d6.tar.bz2 |
OpenVG paint engine doesn't draw glyphs well to non-integer offsets.
Solution is to round adjustment offsets to integer values to prevent
blurry text.
Task-number: QTBUG-16240
Reviewed-by: Alessandro Portale
Diffstat (limited to 'src')
-rw-r--r-- | src/openvg/qpaintengine_vg.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp index d2304e7..09cbc36 100644 --- a/src/openvg/qpaintengine_vg.cpp +++ b/src/openvg/qpaintengine_vg.cpp @@ -3539,8 +3539,8 @@ void QVGPaintEngine::drawStaticTextItem(QStaticTextItem *textItem) QVarLengthArray<VGfloat> adjustments_x(numGlyphs); QVarLengthArray<VGfloat> adjustments_y(numGlyphs); for (int i = 1; i < numGlyphs; ++i) { - adjustments_x[i-1] = (positions[i].x - positions[i-1].x).toReal(); - adjustments_y[i-1] = (positions[i].y - positions[i-1].y).toReal(); + adjustments_x[i-1] = (positions[i].x - positions[i-1].x).round().toReal(); + adjustments_y[i-1] = (positions[i].y - positions[i-1].y).round().toReal(); } // Set the glyph drawing origin. |