diff --git a/masque/file/dxf.py b/masque/file/dxf.py index 0a5e90c..505b2ba 100644 --- a/masque/file/dxf.py +++ b/masque/file/dxf.py @@ -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: diff --git a/pyproject.toml b/pyproject.toml index df3235f..3d04ecf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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"]