예제 #1
0
 def drawEllipse(self, rect):
     device = self.nullDevice()
     if device is None:
         return
     if device.mode() != QwtNullPaintDevice.NormalMode:
         QPaintEngine.drawEllipse(rect)
         return
     device.drawEllipse(rect)
예제 #2
0
 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)
예제 #3
0
 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)
예제 #4
0
 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)
예제 #5
0
 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)