示例#1
0
文件: opl-tilt.py 项目: ybnd/opl-tilt
    def paint(self, painter, option, widget=None):
        """Overload QGraphicsPathItem method."""

        new_option = QStyleOptionGraphicsItem(option)
        # suppress the "selected" state
        # this avoids the dashed rectangle surrounding the ray when selected
        new_option.state = QStyle.State_None
        QGraphicsPathItem.paint(self, painter, new_option, widget)
示例#2
0
    def paint(self, painter, option, widget):
        painter.save()
        painter.setRenderHint(QPainter.Antialiasing,
                              bool(options.antialiasing))

        pen = self.pen()
        cosm_pen = QPen(pen)
        cosm_pen.setCosmetic(True)
        cosm_pen.setWidthF(1.00001)

        QGraphicsPathItem.paint(self, painter, option, widget)

        painter.setPen(cosm_pen)
        painter.setBrush(Qt.NoBrush)
        painter.setOpacity(0.2)
        painter.drawPath(self.path())

        painter.restore()
示例#3
0
 def paint(self, painter, option, widget):
     painter.save()
     painter.setRenderHint(QPainter.Antialiasing,
                           bool(options.antialiasing))
     QGraphicsPathItem.paint(self, painter, option, widget)
     painter.restore()