summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qcosmeticstroker.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-11-10 12:34:22 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-11-12 08:31:18 +0100
commit94dd2cebdcb9446626cd32a00086431eb11ab2a4 (patch)
tree00e549cc499e2b07dc7ec20139a4f9521822b386 /src/gui/painting/qcosmeticstroker.cpp
parent85fe4c89835d862db30b43c775d8863fcf896f20 (diff)
Remove Qt4Compatible painting
Change-Id: Ie54206ca9b509875568f2158e229fca9cb1860a2 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/gui/painting/qcosmeticstroker.cpp')
-rw-r--r--src/gui/painting/qcosmeticstroker.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/gui/painting/qcosmeticstroker.cpp b/src/gui/painting/qcosmeticstroker.cpp
index 9e06a3f109..168e493b41 100644
--- a/src/gui/painting/qcosmeticstroker.cpp
+++ b/src/gui/painting/qcosmeticstroker.cpp
@@ -290,7 +290,7 @@ void QCosmeticStroker::setup()
qreal width = state->lastPen.widthF();
if (width == 0)
opacity = 256;
- else if (qt_pen_is_cosmetic(state->lastPen, state->renderHints))
+ else if (state->lastPen.isCosmetic())
opacity = (int) 256*width;
else
opacity = (int) 256*width*state->txscale;
@@ -434,11 +434,10 @@ void QCosmeticStroker::calculateLastPoint(qreal rx1, qreal ry1, qreal rx2, qreal
if (clipLine(rx1, ry1, rx2, ry2))
return;
- const int half = legacyRounding ? 31 : 0;
- int x1 = toF26Dot6(rx1) + half;
- int y1 = toF26Dot6(ry1) + half;
- int x2 = toF26Dot6(rx2) + half;
- int y2 = toF26Dot6(ry2) + half;
+ int x1 = toF26Dot6(rx1);
+ int y1 = toF26Dot6(ry1);
+ int x2 = toF26Dot6(rx2);
+ int y2 = toF26Dot6(ry2);
int dx = qAbs(x2 - x1);
int dy = qAbs(y2 - y1);
@@ -748,11 +747,10 @@ static bool drawLine(QCosmeticStroker *stroker, qreal rx1, qreal ry1, qreal rx2,
if (stroker->clipLine(rx1, ry1, rx2, ry2))
return true;
- const int half = stroker->legacyRounding ? 31 : 0;
- int x1 = toF26Dot6(rx1) + half;
- int y1 = toF26Dot6(ry1) + half;
- int x2 = toF26Dot6(rx2) + half;
- int y2 = toF26Dot6(ry2) + half;
+ int x1 = toF26Dot6(rx1);
+ int y1 = toF26Dot6(ry1);
+ int x2 = toF26Dot6(rx2);
+ int y2 = toF26Dot6(ry2);
int dx = qAbs(x2 - x1);
int dy = qAbs(y2 - y1);