Skip to content
Snippets Groups Projects
Commit b09d90c1 authored by Egli Adrian (IT-SCI-API-PFI)'s avatar Egli Adrian (IT-SCI-API-PFI)
Browse files

auto scale for PIL

parent 19da4450
No related branches found
No related tags found
No related merge requests found
...@@ -28,9 +28,9 @@ class PILGL(GraphicsLayer): ...@@ -28,9 +28,9 @@ class PILGL(GraphicsLayer):
self.screen_height = min(self.screen_height,m.height) self.screen_height = min(self.screen_height,m.height)
self.screen_width = min(self.screen_width,m.width) self.screen_width = min(self.screen_width,m.width)
self.widthPx = 0.95*self.screen_width/(self.width + 1 + self.linewidth) w = 0.95*self.screen_width/(self.width + 1 + self.linewidth)
self.heightPx = 0.95*self.screen_height/(self.height + 1 + self.linewidth) h = 0.95*self.screen_height/(self.height + 1 + self.linewidth)
self.nPixCell = int(max(1,np.floor(min(self.widthPx,self.heightPx)))) self.nPixCell = int(max(1,np.floor(min(w,h))))
# Total grid size at native scale # Total grid size at native scale
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment