Exemplo n.º 1
0
 def end_composite(self):
     # sort composite_items by their depth
     items = self.composite_items
     depths = map(self.depths.get, map(id, items), [-10000] * len(items))
     depths = map(None, depths, range(len(items)), items)
     depths.sort()
     self.composite_items = map(getitem, depths, [2] * len(items))
     SimplifiedLoader.end_composite(self)
Exemplo n.º 2
0
 def __init__(self, file, filename, match):
     SimplifiedLoader.__init__(self, file, filename, match)
     self.layout = None
     self.format_version = atof(match.group('version'))
     self.trafo = Trafo(1.0, 0.0, 0.0, -1.0, 0.0, 800)
     self.colors = std_colors + [StandardColors.black] * 512
     self.depths = {}  # map object ids to depth
     self.guess_cont()
Exemplo n.º 3
0
 def end_composite(self):
     # sort composite_items by their depth
     items = self.composite_items
     depths = map(self.depths.get, map(id, items), [-10000] * len(items))
     depths = map(None, depths, range(len(items)), items)
     depths.sort()
     self.composite_items = map(getitem, depths, [2] * len(items))
     SimplifiedLoader.end_composite(self)
Exemplo n.º 4
0
 def __init__(self, file, filename, match):
     SimplifiedLoader.__init__(self, file, filename, match)
     self.layout = None
     self.format_version = atof(match.group("version"))
     self.trafo = Trafo(1.0, 0.0, 0.0, -1.0, 0.0, 800)
     self.colors = std_colors + [StandardColors.black] * 512
     self.depths = {}  # map object ids to depth
     self.guess_cont()
Exemplo n.º 5
0
 def readline(self):
     line = SimplifiedLoader.readline(self)
     while line[:1] == '#':
         line = SimplifiedLoader.readline(self)
     return line
Exemplo n.º 6
0
 def readline(self):
     line = SimplifiedLoader.readline(self)
     while line[:1] == "#":
         line = SimplifiedLoader.readline(self)
     return line