Wrap Pattern functions for label, ref, polygon, etc.
This commit is contained in:
parent
c7736a18c3
commit
55e3066485
@ -4,6 +4,7 @@ Simplified Pattern assembly (`Builder`)
|
|||||||
from typing import Self, Sequence, Mapping
|
from typing import Self, Sequence, Mapping
|
||||||
import copy
|
import copy
|
||||||
import logging
|
import logging
|
||||||
|
from functools import wraps
|
||||||
|
|
||||||
from numpy.typing import ArrayLike
|
from numpy.typing import ArrayLike
|
||||||
|
|
||||||
@ -188,6 +189,26 @@ class Builder(PortList):
|
|||||||
new = Builder(library=library, pattern=pat, name=name)
|
new = Builder(library=library, pattern=pat, name=name)
|
||||||
return new
|
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(
|
def plug(
|
||||||
self,
|
self,
|
||||||
other: Abstract | str | Pattern | TreeView,
|
other: Abstract | str | Pattern | TreeView,
|
||||||
|
Loading…
Reference in New Issue
Block a user