Wrap Pattern functions for label, ref, polygon, etc.

This commit is contained in:
Jan Petykiewicz 2023-10-27 21:59:48 -07:00
parent c7736a18c3
commit 55e3066485

View File

@ -4,6 +4,7 @@ Simplified Pattern assembly (`Builder`)
from typing import Self, Sequence, Mapping
import copy
import logging
from functools import wraps
from numpy.typing import ArrayLike
@ -188,6 +189,26 @@ class Builder(PortList):
new = Builder(library=library, pattern=pat, name=name)
return new
@wraps(Pattern.label)
def label(self, *args, **kwargs) -> Self:
self.pattern.label(*args, **kwargs)
@wraps(Pattern.ref)
def ref(self, *args, **kwargs) -> Self:
self.pattern.ref(*args, **kwargs)
@wraps(Pattern.polygon)
def polygon(self, *args, **kwargs) -> Self:
self.pattern.polygon(*args, **kwargs)
@wraps(Pattern.rect)
def rect(self, *args, **kwargs) -> Self:
self.pattern.rect(*args, **kwargs)
@wraps(Pattern.path)
def path(self, *args, **kwargs) -> Self:
self.pattern.path(*args, **kwargs)
def plug(
self,
other: Abstract | str | Pattern | TreeView,