Fix PDF rendering of strokes with cosmetic pens
The PDF backend was ignoring the cosmetic attribute for certain pens, resulting in strokes rendered incorrectly. Task-number: QTBUG-68537 Change-Id: Ib9fd5a510716056c8afe67733f51fc682bbb7354 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>bb10
parent
bf1f17364f
commit
b72a9cbaaf
|
|
@ -1109,8 +1109,9 @@ void QPdfEngine::updateState(const QPaintEngineState &state)
|
|||
d->hasPen = d->pen.style() != Qt::NoPen;
|
||||
d->stroker.setPen(d->pen, state.renderHints());
|
||||
QBrush penBrush = d->pen.brush();
|
||||
bool cosmeticPen = qt_pen_is_cosmetic(d->pen, state.renderHints());
|
||||
bool oldSimple = d->simplePen;
|
||||
d->simplePen = (d->hasPen && (penBrush.style() == Qt::SolidPattern) && penBrush.isOpaque() && d->opacity == 1.0);
|
||||
d->simplePen = (d->hasPen && !cosmeticPen && (penBrush.style() == Qt::SolidPattern) && penBrush.isOpaque() && d->opacity == 1.0);
|
||||
if (oldSimple != d->simplePen)
|
||||
flags |= DirtyTransform;
|
||||
} else if (flags & DirtyHints) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue