Closed MarceloSanchez-Aerial closed 2 years ago
color
of the add_hatch()
factory method defines the ACI (AutoCAD Color Index) of the HATCH
, which you set to 0
and 0
means BYBLOCK
and defaults to ACI 7
outside of a block. ACI 7
means black on light background and white on dark background. The color
argument overrides the dxfattribs
arguments.255
is white in model space but grey in paper space.hatch.rgb = (255, 255, 255)
, true color overrides ACI.Thanks for the help, now the hatch appears white if I open it in zwcad 2021 but when open it with QCAD, the hatch still in white.
Do not use QCAD or LibreCAD to verify DXF rendering, they are not reliable.
But the problem is that the .dxf created is processed by a QCAD plugin, and I need the hatch in white color, do you know any option that will force qcad to display that hatch in white?
Verify the DXF with one of these reliable applications:
If the result is different from the QCAD rendering, report it to QCAD.
Can not find a way to create a solid fill hatch of white color. In the tutorial https://ezdxf.readthedocs.io/en/stable/tutorials/hatch.html i have seen that color=2 is the white/black color. But it is always black no matter the background. I attach below the code to create two hatches in a "test" layout, one white and the other black, but both of them are black
hatch_bug.zip