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)
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)
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 )