Direct2D QPA: Fix check for cosmetic pen
When checking whether a QPen should be treated as cosmetic we need to take into account the render hints set on the painter as well. Change-Id: I8200611af08000d2d1626d8ef97eb3f6dac4951c Reviewed-by: Risto Avila <risto.avila@digia.com> Reviewed-by: Andrew Knight <andrew.knight@digia.com>
This commit is contained in:
parent
d16508a285
commit
bf284c2bbd
@ -592,9 +592,13 @@ public:
|
||||
|
||||
props.miterLimit = newPen.miterLimit() * qreal(2.0); // D2D and Qt miter specs differ
|
||||
props.dashOffset = newPen.dashOffset();
|
||||
props.transformType = qIsNull(newPen.widthF()) ? D2D1_STROKE_TRANSFORM_TYPE_HAIRLINE
|
||||
: newPen.isCosmetic() ? D2D1_STROKE_TRANSFORM_TYPE_FIXED
|
||||
: D2D1_STROKE_TRANSFORM_TYPE_NORMAL;
|
||||
|
||||
if (newPen.widthF() == 0)
|
||||
props.transformType = D2D1_STROKE_TRANSFORM_TYPE_HAIRLINE;
|
||||
else if (qt_pen_is_cosmetic(newPen, q->state()->renderHints))
|
||||
props.transformType = D2D1_STROKE_TRANSFORM_TYPE_FIXED;
|
||||
else
|
||||
props.transformType = D2D1_STROKE_TRANSFORM_TYPE_NORMAL;
|
||||
|
||||
switch (newPen.style()) {
|
||||
case Qt::SolidLine:
|
||||
|
Loading…
Reference in New Issue
Block a user