Ejemplo n.º 1
0
    def save_as_png(self, filename, *args, **kwargs):
        if not 'alpha' in kwargs:
            kwargs['alpha'] = True

        if len(self.tiledict) == 1:
            kwargs['single_tile_pattern'] = True
        pixbufsurface.save_as_png(self, filename, *args, **kwargs)
Ejemplo n.º 2
0
 def save_png(self,
              filename,
              alpha=False,
              multifile=False,
              animation=False,
              **kwargs):
     doc_bbox = self.get_effective_bbox()
     if multifile:
         self.save_multifile_png(filename, **kwargs)
     elif animation:
         self.ani.save_png(filename, **kwargs)
     if alpha:
         tmp_layer = layer.Layer()
         for l in self.layers:
             l.merge_into(tmp_layer)
         tmp_layer._surface.save(filename, *doc_bbox)
     else:
         if alpha:
             tmp_layer = layer.Layer()
             for l in self.layers:
                 l.merge_into(tmp_layer)
             tmp_layer.save_as_png(filename, *doc_bbox)
         else:
             pixbufsurface.save_as_png(self,
                                       filename,
                                       *doc_bbox,
                                       alpha=False,
                                       **kwargs)
Ejemplo n.º 3
0
    def save_as_png(self, filename, *args, **kwargs):
        if 'alpha' not in kwargs:
            kwargs['alpha'] = True

        if len(self.tiledict) == 1:
            kwargs['single_tile_pattern'] = True
        pixbufsurface.save_as_png(self, filename, *args, **kwargs)
Ejemplo n.º 4
0
 def save_png(self, filename, alpha=False, multifile=False, **kwargs):
     doc_bbox = self.get_effective_bbox()
     if multifile:
         self.save_multifile_png(filename, **kwargs)
     else:
         if alpha:
             tmp_layer = layer.Layer()
             for l in self.layers:
                 l.merge_into(tmp_layer)
             tmp_layer.save_as_png(filename, *doc_bbox)
         else:
             pixbufsurface.save_as_png(self, filename, *doc_bbox, alpha=False, **kwargs)
 def save_as_png(self, filename, *args, **kwargs):
     assert 'alpha' not in kwargs
     kwargs['alpha'] = True
     pixbufsurface.save_as_png(self, filename, *args, **kwargs)
 def save_as_png(self, filename, *rect, **kwargs):
     assert 'alpha' not in kwargs
     kwargs['alpha'] = False
     if len(self.tiles) == 1:
         kwargs['single_tile_pattern'] = True
     pixbufsurface.save_as_png(self, filename, *rect, **kwargs)
Ejemplo n.º 7
0
 def save_as_png(self, filename, *args, **kwargs):
     assert 'alpha' not in kwargs
     kwargs['alpha'] = True
     pixbufsurface.save_as_png(self, filename, *args, **kwargs)
 def save_as_png(self, filename, *rect, **kwargs):
     assert 'alpha' not in kwargs
     kwargs['alpha'] = False
     if len(self.tiles) == 1:
         kwargs['single_tile_pattern'] = True
     pixbufsurface.save_as_png(self, filename, *rect, **kwargs)