MCPcopy Index your code
hub / github.com/SLiCAP/SLiCAP_python / rescale

Method rescale

SLiCAP/schematic/image_item.py:48–54  ·  view source on GitHub ↗
(self, ratio: float)

Source from the content-addressed store, hash-verified

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

Callers 1

_applyFunction · 0.45

Calls 1

_loadMethod · 0.95

Tested by

no test coverage detected