| 69 | self.drawsig.emit(False) |
| 70 | |
| 71 | def paintEvent(self, ev): |
| 72 | if len(self.points) <= 0 and len(self.current_points) <= 0 : return |
| 73 | p = self._painter |
| 74 | p.begin(self) |
| 75 | p.setRenderHint(QPainter.Antialiasing) |
| 76 | p.setRenderHint(QPainter.HighQualityAntialiasing) |
| 77 | p.setRenderHint(QPainter.SmoothPixmapTransform) |
| 78 | p.scale(self.scale, self.scale) |
| 79 | p.setPen(QColor(0, 0, 0)) |
| 80 | for pts in self.points: |
| 81 | p.drawPolyline(QPolygon(pts)) |
| 82 | if len(self.current_points) > 0: |
| 83 | p.drawPolyline(QPolygon(self.current_points)) |
| 84 | p.end() |
| 85 | |
| 86 | |
| 87 | |