(self, ratio: float)
| 46 | self._load() |
| 47 | |
| 48 | def rescale(self, ratio: float) -> None: |
| 49 | self.prepareGeometryChange() |
| 50 | self.display_width = max(1, round(self.display_width * ratio)) |
| 51 | self.display_height = max(1, round(self.display_height * ratio)) |
| 52 | if self._pixmap is not None: |
| 53 | self._load() # reload raster/PDF pixmap at new size |
| 54 | self.update() |
| 55 | |
| 56 | # ── loading ─────────────────────────────────────────────────────────────── |
| 57 |