def paint_shape(self, shape):
"""
Create all plotting related parts of one shape.
@param shape: The shape to be plotted.
"""
start, start_ang = shape.get_start_end_points(True, True)
shape.path = QPainterPath()
shape.path.moveTo(start.x, -start.y)
drawHorLine = lambda caller, start, end: shape.path.lineTo(end.x, -end.y)
drawVerLine = lambda caller, start: None # Not used in 2D mode
shape.make_path(drawHorLine, drawVerLine)
self.BB = self.BB.joinBB(shape.BB)
shape.stmove = self.createstmove(shape)
shape.starrow = self.createstarrow(shape)
shape.enarrow = self.createenarrow(shape)
shape.stmove.setParentItem(shape)
shape.starrow.setParentItem(shape)
shape.enarrow.setParentItem(shape)
评论列表
文章目录