mirror of https://github.com/VLSIDA/OpenRAM.git
Use default zoom for text
This commit is contained in:
parent
87493e1e30
commit
9a3776e758
|
|
@ -446,7 +446,7 @@ class path(geometry):
|
|||
class label(geometry):
|
||||
"""Represents a text label"""
|
||||
|
||||
def __init__(self, text, lpp, offset, zoom=-1):
|
||||
def __init__(self, text, lpp, offset, zoom=None):
|
||||
"""Initializes a text label for specified layer"""
|
||||
super().__init__()
|
||||
self.name = "label"
|
||||
|
|
@ -455,8 +455,11 @@ class label(geometry):
|
|||
self.layerPurpose = lpp[1]
|
||||
self.offset = vector(offset).snap_to_grid()
|
||||
|
||||
if zoom<0:
|
||||
self.zoom = tech.GDS["zoom"]
|
||||
if not zoom:
|
||||
try:
|
||||
self.zoom = tech.GDS["zoom"]
|
||||
except:
|
||||
self.zoom = None
|
||||
else:
|
||||
self.zoom = zoom
|
||||
|
||||
|
|
|
|||
|
|
@ -393,15 +393,13 @@ class pin_layout:
|
|||
width=self.width(),
|
||||
height=self.height(),
|
||||
center=False)
|
||||
# Add the tet in the middle of the pin.
|
||||
# Add the text in the middle of the pin.
|
||||
# This fixes some pin label offsetting when GDS gets
|
||||
# imported into Magic.
|
||||
newLayout.addText(text=self.name,
|
||||
layerNumber=layer_num,
|
||||
purposeNumber=label_purpose,
|
||||
offsetInMicrons=self.center(),
|
||||
magnification=GDS["zoom"],
|
||||
rotate=None)
|
||||
offsetInMicrons=self.center())
|
||||
|
||||
def compute_overlap(self, other):
|
||||
""" Calculate the rectangular overlap of two rectangles. """
|
||||
|
|
|
|||
Loading…
Reference in New Issue