summaryrefslogtreecommitdiffstats
path: root/src/openvg
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-11-22 11:07:01 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-11-22 11:23:34 (GMT)
commit7abb03d75155cef86df58f117031b092b637876f (patch)
treee9e60546e08465de6652c0819faa3cf642f3e0a2 /src/openvg
parent202433ee1fd377ac36dc55fb466b9fc616b4d4fd (diff)
downloadQt-7abb03d75155cef86df58f117031b092b637876f.zip
Qt-7abb03d75155cef86df58f117031b092b637876f.tar.gz
Qt-7abb03d75155cef86df58f117031b092b637876f.tar.bz2
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
Diffstat (limited to 'src/openvg')
-rw-r--r--src/openvg/qpaintengine_vg.cpp4
1 files 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.