def __init__(self, text: str, xy: typing.Tuple[int, int], width: int = 0, pathtype: gdstypes.PathType = gdstypes.PathType.BUTT, datatype: gdstypes.DataType = gdstypes.DataType.NO_DATA_PRESENT): super().__init__() self._TEXTTYPE = records.TEXTTYPE() self._XY = records.XY() self.coordinates = xy self._STRING = records.STRING(text) if width != 0: self._WIDTH = records.WIDTH(width) if pathtype != gdstypes.PathType.BUTT: self._PATHTYPE = records.PATHTYPE(pathtype) if datatype != gdstypes.DataType.NO_DATA_PRESENT: self._DATATYPE = records.DATATYPE(datatype)
def __init__(self, layer: int, radii: typing.Tuple[int, int], center: typing.Tuple[int, int], width: int = 0, datatype: gdstypes.DataType = gdstypes.DataType.NO_DATA_PRESENT): super().__init__() self._RAITHCIRCLE = records.RaithCircle() self._LAYER = records.LAYER(layer) self._XY = records.XY() self.radii = radii self.center = center if width != 0: self._WIDTH = records.WIDTH(width) self._DATATYPE = records.DATATYPE(datatype) self._ENDEL = records.ENDEL()
def __init__(self, layer: int, xy: np.ndarray[int], width: int = 0, pathtype: gdstypes.PathType = gdstypes.PathType.BUTT, datatype: gdstypes.DataType = gdstypes.DataType.NO_DATA_PRESENT): super().__init__() self._PATH = records.PATH() self._LAYER = records.LAYER(layer) self._XY = records.XY() self.coordinates = xy if width != 0: self._WIDTH = records.WIDTH(width) if pathtype != gdstypes.PathType.BUTT: self._PATHTYPE = records.PATHTYPE(pathtype) self._DATATYPE = records.DATATYPE(datatype) self._ENDEL = records.ENDEL()
def width(self, width: int): try: self._WIDTH.width = width except AttributeError: self._WIDTH = records.WIDTH(width)