Skip to content

Commit e6852ff

Browse files
committed
Removed references to NonCosmeticDefaultPen
1 parent 708b1b2 commit e6852ff

1 file changed

Lines changed: 6 additions & 13 deletions

File tree

qwt/graphic.py

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,26 @@
1414
"""
1515

1616
import math
17-
from qwt.null_paintdevice import QwtNullPaintDevice
18-
from qwt.painter_command import QwtPainterCommand
1917

18+
from qtpy.QtCore import QPointF, QRect, QRectF, QSize, QSizeF, Qt
2019
from qtpy.QtGui import (
20+
QImage,
21+
QPaintEngine,
2122
QPainter,
2223
QPainterPathStroker,
23-
QPaintEngine,
2424
QPixmap,
2525
QTransform,
26-
QImage,
2726
)
28-
from qtpy.QtCore import Qt, QRectF, QSizeF, QSize, QPointF, QRect
27+
28+
from qwt.null_paintdevice import QwtNullPaintDevice
29+
from qwt.painter_command import QwtPainterCommand
2930

3031

3132
def qwtHasScalablePen(painter):
3233
pen = painter.pen()
3334
scalablePen = False
3435
if pen.style() != Qt.NoPen and pen.brush().style() != Qt.NoBrush:
3536
scalablePen = not pen.isCosmetic()
36-
if not scalablePen and pen.widthF() == 0.0:
37-
hints = painter.renderHints()
38-
if hints & QPainter.NonCosmeticDefaultPen:
39-
scalablePen = True
4037
return scalablePen
4138

4239

@@ -65,10 +62,6 @@ def qwtExecCommand(painter, cmd, renderHints, transform, initialTransform):
6562
and painter.transform().isScaling()
6663
):
6764
isCosmetic = painter.pen().isCosmetic()
68-
if isCosmetic and painter.pen().widthF() == 0.0:
69-
hints = painter.renderHints()
70-
if hints & QPainter.NonCosmeticDefaultPen:
71-
isCosmetic = False
7265
doMap = not isCosmetic
7366
if doMap:
7467
tr = painter.transform()

0 commit comments

Comments
 (0)