#7105 closed defect (fixed)
DXF: Don't output dx and dy values in MTEXT style strings
Reported by: | Alan Thomas | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | OGR_SF | Version: | svn-trunk |
Severity: | normal | Keywords: | dxf |
Cc: |
Description
According to the OGR feature style spec, dx and dy values in LABEL style strings relate to offsets from the insertion point. They are used correctly in TEXT entities, but in MTEXT the X and Y components of the unit vector that indicates the text direction are emitted as dx and dy values, which makes no sense.
Patch is to remove lines 633-643 of ogrdxflayer.cpp.
Unfortunately there is no way to derive two alignment points for MTEXT entities in the same way that we do for TEXT - the DXF format just doesn't contain enough information. Users will have to make do with the insertion point combined with the alignment (p) value.
Attachments (2)
Change History (6)
comment:1 by , 6 years ago
by , 6 years ago
Attachment: | mtext-dx-dy.png added |
---|
Screenshot of test case in AutoCAD (note I turned on "text frames" to aid visualisation of the MTEXT entities)
comment:2 by , 6 years ago
The two MTEXT entities in this case are differently sized, one being single-line and the other being multiline, but their 11/21/31 direction vectors are the same (and they are also a unit vector - I don't think this is a coincidence).
We don't need to store this direction vector information in the style string for MTEXTs, because we compute the angle from these components, and the angle is already in the style string.
comment:4 by , 6 years ago
For posterity I will note that there was additional discussion in the pull request https://github.com/OSGeo/gdal/pull/225.
This is a recent addition per : https://trac.osgeo.org/gdal/changeset/39335 / https://github.com/OSGeo/gdal/pull/225 . I don't have myself an informed opinion on what is appropriate