Protocols
protocols
BoxFunction
Bases: Protocol
Protocol for a box function.
Represents bbox/ibbox/dbbox functions.
Source code in kfactory/protocols.py
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | |
__call__
__call__() -> BoxLike[T]
__call__(layer: LayerEnum | int) -> BoxLike[T]
__call__(
layer: LayerEnum | int | None = None,
) -> BoxLike[T]
Call the box function.
Source code in kfactory/protocols.py
65 66 67 | |
BoxLike
Bases: Protocol
Protocol for a box.
Mirrors some functionality of kdb.DBox, kdb.Box, but provides generic types for the units.
Source code in kfactory/protocols.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | |
center
center() -> PointLike[T]
Get the center of the box.
Source code in kfactory/protocols.py
36 37 38 | |
empty
empty() -> bool
Check if the box is empty.
Source code in kfactory/protocols.py
48 49 50 | |
height
height() -> T
Get the height of the box.
Source code in kfactory/protocols.py
44 45 46 | |
width
width() -> T
Get the width of the box.
Source code in kfactory/protocols.py
40 41 42 | |
PointLike
Bases: Protocol
Protocol for a point.
Mirrors some functionality of kdb.DPoint, kdb.Point, but provides generic types for the units.
Source code in kfactory/protocols.py
11 12 13 14 15 16 17 18 19 20 | |