skymakerolof / dxf

DXF parser for node/browser
https://www.npmjs.com/package/dxf
MIT License
335 stars 122 forks source link

Fix. If the color defined in the entity is 256, the color used should be the one defined in the layer #104

Closed rafaelgc closed 2 years ago

rafaelgc commented 2 years ago

256 is a special value to say that the color used should be the one defined in the layer.

I've experienced this problem with a DXF file that has red entity (it's rendered red in LibreCAD) but it was rendered in a different color when it was exported to SVG using this library.

train_with_red_entities.zip

Discussion about colors defined in the entity: [https://groups.google.com/g/comp.cad.autocad/c/onnSe9gdaV8/m/Nm-s-e2WuNEJ](https://groups.google.com/g/comp.cad.autocad/c/onnSe9gdaV8/m/Nm-s-e2WuNEJ

skymakerolof commented 2 years ago

Thank you, looks good!