From 49597a7b584d707f0c093299ec96c3a0f121513b Mon Sep 17 00:00:00 2001 From: James McDonnell Date: Tue, 17 Oct 2017 16:23:30 -0400 Subject: Correct the vertex used to calculate v1/v2Frac The NoClip version of the drawTriangle code had the vertices swapped. Task-number: QTBUG-50845 Change-Id: I731dafee6cc140ea017b3b7d1051a27ad3081aa7 Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/gui/text/qdistancefield.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/gui/text/qdistancefield.cpp b/src/gui/text/qdistancefield.cpp index 064c2aca7f..4b5d4a48b6 100644 --- a/src/gui/text/qdistancefield.cpp +++ b/src/gui/text/qdistancefield.cpp @@ -177,8 +177,8 @@ void drawTriangle(qint32 *bits, int width, int height, const QPoint *center, const int y2 = clip == Clip ? qBound(0, v2->y() >> 8, height) : v2->y() >> 8; const int yC = clip == Clip ? qBound(0, center->y() >> 8, height) : center->y() >> 8; - const int v1Frac = clip == Clip ? (y1 << 8) + 0xff - v1->y() : ~v2->y() & 0xff; - const int v2Frac = clip == Clip ? (y2 << 8) + 0xff - v2->y() : ~v1->y() & 0xff; + const int v1Frac = clip == Clip ? (y1 << 8) + 0xff - v1->y() : ~v1->y() & 0xff; + const int v2Frac = clip == Clip ? (y2 << 8) + 0xff - v2->y() : ~v2->y() & 0xff; const int centerFrac = clip == Clip ? (yC << 8) + 0xff - center->y() : ~center->y() & 0xff; int dx1 = 0, x1 = 0, dx2 = 0, x2 = 0; -- cgit v1.2.3