def drawEllipse(self, rect): device = self.nullDevice() if device is None: return if device.mode() != QwtNullPaintDevice.NormalMode: QPaintEngine.drawEllipse(rect) return device.drawEllipse(rect)
def drawTiledPixmap(self, rect, pixmap, subRect): device = self.nullDevice() if device is None: return if device.mode() != QwtNullPaintDevice.NormalMode: QPaintEngine.drawTiledPixmap(rect, pixmap, subRect) return device.drawTiledPixmap(rect, pixmap, subRect)
def drawTextItem(self, pos, textItem): device = self.nullDevice() if device is None: return if device.mode() != QwtNullPaintDevice.NormalMode: QPaintEngine.drawTextItem(pos, textItem) return device.drawTextItem(pos, textItem)
def drawPoints(self, points, pointCount=None): if pointCount is None: pointCount = len(points) device = self.nullDevice() if device is None: return if device.mode() != QwtNullPaintDevice.NormalMode: try: QPaintEngine.drawPoints(points, pointCount) except TypeError: # PyQt <=4.9 QPaintEngine.drawPoints(self, points) return device.drawPoints(points, pointCount)
def drawLines(self, lines, lineCount=None): if lineCount is None: lineCount = len(lines) device = self.nullDevice() if device is None: return if device.mode() != QwtNullPaintDevice.NormalMode and not PYSIDE2: try: QPaintEngine.drawLines(lines, lineCount) except TypeError: # PyQt <=4.9 QPaintEngine.drawLines(self, lines) return device.drawLines(lines, lineCount)