update to newer ezdxf

This commit is contained in:
Jan Petykiewicz 2023-03-19 10:16:54 -07:00
parent e87b13c4eb
commit 68ac593270
2 changed files with 3 additions and 2 deletions

View File

@ -14,6 +14,7 @@ import gzip
import numpy
import ezdxf
from ezdxf.enums import TextEntityAlignment
from .utils import is_gzipped, tmpfile
from .. import Pattern, Ref, PatternError, Label
@ -358,7 +359,7 @@ def _labels_to_texts(
for label in labels:
attribs = dict(layer=_mlayer2dxf(label.layer))
xy = label.offset
block.add_text(label.string, dxfattribs=attribs).set_pos(xy, align='BOTTOM_LEFT')
block.add_text(label.string, dxfattribs=attribs).set_placement(xy, align=TextEntityAlignment.BOTTOM_LEFT)
def _mlayer2dxf(layer: layer_t) -> str:

View File

@ -52,7 +52,7 @@ path = "masque/__init__.py"
[project.optional-dependencies]
oasis = ["fatamorgana~=0.11"]
dxf = ["ezdxf"]
dxf = ["ezdxf~=1.0.2"]
svg = ["svgwrite"]
visualize = ["matplotlib"]
text = ["matplotlib", "freetype-py"]