mozman / ezdxf

Python interface to DXF

Home Page:https://ezdxf.mozman.at

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Idea: enable customization of ACI RGB values for drawing add-on export

seanpk opened this issue · comments

Simply provide some greater control over the colors used to render ACI colors from the drawing add-on.

It is useful to adjust the colors to have better contrast on some background (it is already possible to set the background color and the contrast color with LayoutProperties). It could also be useful to force all elements to a single color, say blue, to provide a simplified visual, say like a blueprint.

Just "reaching into" the ezdxf.colors module and changing the color values in the DXF_DEFAULT_COLORS and DXF_DEFAULT_PAPERSPACE_COLORS lists doesn't seem to have the intended effect.

I could work on a PR, assuming this would be a welcome feature.

hmm. I just noticed this comment at the top of the draw_layout() implementation in frontend.py, is it related to how it seemed that setting values in those lists didn't work:

        if layout_properties is not None:
            # TODO: this does not work, layer properties have to be re-evaluated!
            self.ctx.current_layout_properties = layout_properties
        else:
            self.ctx.set_current_layout(layout)