提交 c69d1899 编写于 作者: W wenliwyan 提交者: Kentaro Wada

paint the interior of current drawing polygon

For better eye guidance, the interior of the current shape is painted and updated when moving mouse. This feature can be frequently found in other labeling tools.
上级 6dd46432
......@@ -486,6 +486,15 @@ class Canvas(QtWidgets.QWidget):
if self.selectedShapeCopy:
self.selectedShapeCopy.paint(p)
if (
self.createMode == 'polygon' and self.current is not None and
len(self.current.points) >= 2
):
realTimeShape = self.current.copy()
realTimeShape.addPoint(self.line[1])
realTimeShape.fill = True
realTimeShape.paint(p)
p.end()
def transformPos(self, point):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册