Beispiel #1
0
    def paint(self, painter, option, widget):
        """CONVEX HULL TEST 
        path = []
        self.poly = None
        for i in self.owningNodes:
            relPos = self.mapFromScene(i.scenePos())
            relSize = QtCore.QPointF(i.getNodeWidth(),i.geometry().height())
            path.append((relPos.x(),relPos.y()))
            path.append((relPos.x()+relSize.x(),relPos.y()))
            path.append((relPos.x()+relSize.x(),relPos.y()+relSize.y()))
            path.append((relPos.x(),relPos.y()+relSize.y()))

        if len(path) >= 3:
            c = convex_hull(path)
            self.poly = QtGui.QPolygonF()
            for i in c:
                self.poly.append(QtCore.QPointF(i[0], i[1]))
        """
        NodePainter.asCommentNode(self, painter, option, widget)
Beispiel #2
0
 def paint(self, painter, option, widget):
     NodePainter.asCommentNode(self, painter, option, widget)
     self.updateSize()
Beispiel #3
0
 def paint(self, painter, option, widget):
     NodePainter.asCommentNode(self, painter, option, widget)