|
@@ -75,6 +75,7 @@ class Shape(object):
|
|
|
for p in self.points[1:]:
|
|
|
path.lineTo(QPointF(p))
|
|
|
return path.contains(QPointF(point))
|
|
|
+
|
|
|
def moveBy(self,dx,dy):
|
|
|
index=0
|
|
|
for point in self.points:
|
|
@@ -82,6 +83,7 @@ class Shape(object):
|
|
|
newYPos=point.y()+dy
|
|
|
self.points[index]=QPoint(newXPos,newYPos)
|
|
|
index +=1
|
|
|
+
|
|
|
def __len__(self):
|
|
|
return len(self.points)
|
|
|
|