Colors as assigned to imported drawing entities if they are not merged
with other entities.
The code has been refactored to remove much duplication in reading of
attributes.
The code gives brief messages on the Python console about unsupported
DXF festures and also issues some new errors.
There is no support yet for making colors 1-9 and 250-255 contrast with
the creeen background color. Colors are generated by code rather than a
lookup table; this code can eventually modify the colors it generates to
contrast with a specific background color.
* Import: Support DXF text rotation - fixes#10882
- Reads and supports text rotation in builtin DXF import
- Makes the builtin DXF import produce Draft texts instead of App::Annotations
- Extends the arguments of Draft make_text()
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Required GIL locking has been added where Python methods are
called.
The code mapping from codepage names like ansi_nnn to cpnnnn has
been altered a bit to shorten it.
The "a" in "aci" refers to a trademark which we want to avoid mentioning
in code. These values are indices into a color table (plus two special
values for BYBLOCK and BYLAYER) so using the term colorIndex seems more
readable.
The C++ importer incorrectly treated the contents of all TEXT and MTEXT
objects as beind encoded as UTF-8, but this is not true for DXF files
before AutoCAD 2007, where the encoding is "plain ASCII" plus some in-band
\U+dddd encoding. This would cause errors if the text contained non-ASCII
characters such as the Degree Sign.
This change causes the correct encoding to be used.
If the MTEXT exceeds 250 characters, the contents are broken up into
several records in the DXF file. The C++ importer has been changed
to collect all these pieces into a single string containing all the text.