def createDrawingCoords(self):
if self.drawingCoords is None:
self.drawingCoords = []
self.pathIterator = self._tokenize_path(self.d)
while True:
try:
command = next(self.pathIterator)
if not command in self.COMMANDS:
self.additionalParameter = float(command)
coord = self.svgAdditionalCoords.get(self.currentCommand)()
else:
coord = self.svgPathSegmentCommands.get(command.strip(), self.unknownCommand)()
self.currentCommand = command.strip()
if coord is not None:
self.drawingCoords.append(coord)
except StopIteration:
break
except:
exc_type, exc_value, exc_traceback = sys.exc_info()
print("test1 main thread exception : %s" % exc_type)
traceback.print_tb(exc_traceback, limit=2, file=sys.stdout)
return self.drawingCoords
评论列表
文章目录