update to newer ezdxf
This commit is contained in:
parent
e5ed28a854
commit
59c8f47f4d
@ -14,6 +14,7 @@ import gzip
|
|||||||
|
|
||||||
import numpy
|
import numpy
|
||||||
import ezdxf
|
import ezdxf
|
||||||
|
from ezdxf.enums import TextEntityAlignment
|
||||||
|
|
||||||
from .utils import is_gzipped, tmpfile
|
from .utils import is_gzipped, tmpfile
|
||||||
from .. import Pattern, Ref, PatternError, Label
|
from .. import Pattern, Ref, PatternError, Label
|
||||||
@ -358,7 +359,7 @@ def _labels_to_texts(
|
|||||||
for label in labels:
|
for label in labels:
|
||||||
attribs = dict(layer=_mlayer2dxf(label.layer))
|
attribs = dict(layer=_mlayer2dxf(label.layer))
|
||||||
xy = label.offset
|
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:
|
def _mlayer2dxf(layer: layer_t) -> str:
|
||||||
|
@ -52,7 +52,7 @@ path = "masque/__init__.py"
|
|||||||
|
|
||||||
[project.optional-dependencies]
|
[project.optional-dependencies]
|
||||||
oasis = ["fatamorgana~=0.11"]
|
oasis = ["fatamorgana~=0.11"]
|
||||||
dxf = ["ezdxf"]
|
dxf = ["ezdxf~=1.0.2"]
|
||||||
svg = ["svgwrite"]
|
svg = ["svgwrite"]
|
||||||
visualize = ["matplotlib"]
|
visualize = ["matplotlib"]
|
||||||
text = ["matplotlib", "freetype-py"]
|
text = ["matplotlib", "freetype-py"]
|
||||||
|
Loading…
Reference in New Issue
Block a user