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

Function export_bounds

SLiCAP/schematic/export.py:67–77  ·  view source on GitHub ↗
(scene)

Source from the content-addressed store, hash-verified

65
66
67def export_bounds(scene) -> QRectF:
68 from .border_item import BorderItem
69 for item in scene.items():
70 if isinstance(item, BorderItem):
71 pos = item.pos()
72 r = item.rect()
73 return QRectF(pos.x(), pos.y(), r.width(), r.height())
74 b = scene.itemsBoundingRect()
75 if b.isEmpty():
76 b = QRectF(0, 0, 200, 200)
77 return b.adjusted(-_MARGIN, -_MARGIN, _MARGIN, _MARGIN)
78
79
80def _qhex(c) -> str:

Callers 2

_build_svgFunction · 0.85
print_sceneFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected