From 7abb03d75155cef86df58f117031b092b637876f Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Mon, 22 Nov 2010 12:07:01 +0100 Subject: Round origin of text in OpenVG engine The origin of text needs to be rounded, just like the translation in the transform because text drawn at subpixel positions is unsupported on some devices. Since the font is integer-based, the advance-array does not need to be rounded. Task-number: QTBUG-15263 Reviewed-by: Jason Barron --- src/openvg/qpaintengine_vg.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp index aea203f..430575b 100644 --- a/src/openvg/qpaintengine_vg.cpp +++ b/src/openvg/qpaintengine_vg.cpp @@ -3543,8 +3543,8 @@ void QVGPaintEngine::drawStaticTextItem(QStaticTextItem *textItem) // Set the glyph drawing origin. VGfloat origin[2]; - origin[0] = positions[0].x.toReal(); - origin[1] = positions[0].y.toReal(); + origin[0] = positions[0].x.round().toReal(); + origin[1] = positions[0].y.round().toReal(); vgSetfv(VG_GLYPH_ORIGIN, 2, origin); // Fast anti-aliasing for paths, better for images. -- cgit v0.12