summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJames McDonnell <jmcdonnell@blackberry.com>2017-10-17 16:23:30 -0400
committerJames McDonnell <jmcdonnell@blackberry.com>2017-11-29 14:04:29 +0000
commit49597a7b584d707f0c093299ec96c3a0f121513b (patch)
treea15c491088c0c4efffcbf4355236c8818545e78b /src
parentbc9941db42172b7f55c69bad27a7b6ae378f4e4a (diff)
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 <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/gui/text/qdistancefield.cpp4
1 files changed, 2 insertions, 2 deletions
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;