コード例 #1
0
ファイル: surface.py プロジェクト: snaiperskaya96/sdaps
 def load(self):
     """Load the A1 cairo surface, which is accessible using the surface
     attribute.
     :py:meth`clean` needs to be called when the surface is
     no longer needed."""
     self.surface = image.get_a1_from_tiff(
         self.obj.sheet.survey.path(self.obj.filename), self.obj.tiff_page,
         True if self.obj.rotated else False)
コード例 #2
0
ファイル: surface.py プロジェクト: snaiperskaya96/sdaps
 def load_uncached(self):
     """Load the A1 surface and directly return it. It will not be cached,
     so using this function may result repeated reloads from file."""
     if hasattr(self, 'surface'):
         return self.surface
     else:
         return image.get_a1_from_tiff(
             self.obj.sheet.survey.path(self.obj.filename),
             self.obj.tiff_page, True if self.obj.rotated else False)
コード例 #3
0
ファイル: surface.py プロジェクト: crabhi/sdaps
 def load_uncached(self):
     """Load the A1 surface and directly return it. It will not be cached,
     so using this function may result repeated reloads from file."""
     if hasattr(self, 'surface'):
         return self.surface
     else:
         return image.get_a1_from_tiff(
             self.obj.sheet.survey.path(self.obj.filename),
             self.obj.tiff_page,
             True if self.obj.rotated else False)
コード例 #4
0
ファイル: surface.py プロジェクト: crabhi/sdaps
 def load(self):
     """Load the A1 cairo surface, which is accessible using the surface
     attribute.
     :py:meth`clean` needs to be called when the surface is
     no longer needed."""
     self.surface = image.get_a1_from_tiff(
         self.obj.sheet.survey.path(self.obj.filename),
         self.obj.tiff_page,
         True if self.obj.rotated else False
     )