We're using the paid version 3.25.2. Using the dwg2svg converter leads to the following result:
...
<g transform="">
<text x="0" dx="0" y="0" dy="2" font-family="Arial" font-size="2.8" line-height="1.1" fill="#000000" transform="translate(542.2,418.4046) translate(0,1) scale(1,-1)" text-anchor="middle">UNITE</text>
</g>
...
Our testing was done with the trial version 3.24.3 and there we've got the results:
...
<g transform="">
<text x="542.2" dx="0" y="-419.4188" dy="2" font-family="Arial" font-size="2.8" line-height="1.1" fill="#000000" transform="scale(1,-1) rotate(360 542.2,-419.4188)" text-anchor="middle">UNITE</text>
</g>
...
Is there a way to achive the "old" behavior with text coordinates different from 0?
Thanks & kind regards
dwg2svg - text coordinates are always 0
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
-
- Newbie Member
- Posts: 3
- Joined: Tue Jan 19, 2021 10:49 am
Re: dwg2svg - text coordinates are always 0
The text position has moved to the "transform" attribute of the text. Both SVGs should display exactly the same.
May I ask what your use case is for having x/y attributes instead of transforms?
May I ask what your use case is for having x/y attributes instead of transforms?
-
- Newbie Member
- Posts: 3
- Joined: Tue Jan 19, 2021 10:49 am
Re: dwg2svg - text coordinates are always 0
We've written a parser to identify partiuclar text elements. Does this mean, that we've to adapt our parser? Or do you recommend to use the "old" version from March 2020?
Re: dwg2svg - text coordinates are always 0
I'd recommend to adapt the parser to parse the first "translate" function inside the transform attribute.
Note that unlike in previous versions, this is exactly the position the user clicked when creating the text label, i.e. the reference point of the text. The second "translate" is the offset to account for the vertical alignment of the text (top, middle, base or bottom).
Note that unlike in previous versions, this is exactly the position the user clicked when creating the text label, i.e. the reference point of the text. The second "translate" is the offset to account for the vertical alignment of the text (top, middle, base or bottom).
-
- Newbie Member
- Posts: 3
- Joined: Tue Jan 19, 2021 10:49 am
Re: dwg2svg - text coordinates are always 0
Thanks a lot. We'll follow your suggestion...