Ejemplo n.º 1
0
 def setPoints(self, *points):
     #print points
     assert_arg_list_type(points, Point2D)
     if (type == self.TYPE_CIRCLE) and (len(points) != 3):
         raise TypeError(self.TYPE_CIRCLE + ' requires exactly 3 points.')
     elif (type == self.TYPE_POLYGON) and (len(points) < 2):
         raise TypeError(self.TYPE_POLYGON + ' requires at least 2 points.')
     else:
         self.points = points
Ejemplo n.º 2
0
 def setPoints(self, *points):
     #print points
     assert_arg_list_type(points, Point2D)
     if (type == self.TYPE_CIRCLE) and (len(points) != 3):
         raise TypeError(self.TYPE_CIRCLE + ' requires exactly 3 points.')
     elif (type == self.TYPE_POLYGON) and (len(points) < 2):
         raise TypeError(self.TYPE_POLYGON + ' requires at least 2 points.')
     else:
         self.points = points
Ejemplo n.º 3
0
 def setList(self, argList):
     assert_arg_type(argList, list)
     assert_arg_list_type(argList, self.elemType)
     self.argList = argList
Ejemplo n.º 4
0
 def setList(self, argList):
     assert_arg_type(argList, list)
     assert_arg_list_type(argList, self.elemType)
     self.argList = argList