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

Method boundingRect

SLiCAP/schematic/component_item.py:679–689  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

677 # ── geometry ──────────────────────────────────────────────────────────────
678
679 def boundingRect(self):
680 br = super().boundingRect()
681 for lbl in self._labels.values():
682 br = br.united(lbl.mapRectToParent(lbl.boundingRect()))
683 # Always include the pin-marker squares so they're never clipped; kept
684 # independent of connection state so toggling a marker is just an update().
685 size = config.HANDLE_SIZE
686 h = size / 2.0
687 for lx, ly in PIN_POSITIONS.get(self.symbol_name, []):
688 br = br.united(QRectF(lx - h, ly - h, size, size))
689 return br
690
691 def shape(self) -> QPainterPath:
692 tight = SYMBOL_TIGHT_RECT.get(self.symbol_name)

Callers 1

paintMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected