gerbonara/gerber/render
jaseg a7a5981e0e Make primitives with unset level polarity inherit from region
This fixes region rendering with programatically generated primitives
such that clear level polarity works in an intuitive way. This is useful
for e.g. cutouts in regions. Before, the renderer would set level
polarity twice, both when starting the region and then again once for
each region primitive (line or arc). The problem was that the primitives
in a region with "clear" polarity would when constructed with unset
polarity default to "dark". Thus the renderer would emit something like
LPC (clear polarity) -> G36 (start region) -> LPD (dark polarity) ->
{lines...} instead of LPC -> G36 -> {lines...}.

After this commit, Line and Arc will retain None as level polarity when
created with unset level polarity, and region rendering will override
None with the region's polarity. Outside regions, the old dark default
remains unchanged.

Note on verification: Somehow, gEDA gerbv would still render the broken
regions the way one would have intended, but other viewers (KiCAD
gerbview, the online EasyEDA one and whatever JLC uses to make their
silkscreens) would not.
2019-02-03 14:37:26 +09:00
..
__init__.py Fix hard requirement of cairo per #83, and add stubs for required subclass methods to GerberContext per #84 2018-06-05 08:57:37 -04:00
cairo_backend.py Merge pull request #92 from curtacircuitos/subclass-bugfix 2019-01-26 13:52:32 -05:00
excellon_backend.py Fix hard requirement of cairo per #83, and add stubs for required subclass methods to GerberContext per #84 2018-06-05 08:57:37 -04:00
render.py Fix hard requirement of cairo per #83, and add stubs for required subclass methods to GerberContext per #84 2018-06-05 08:57:37 -04:00
rs274x_backend.py Make primitives with unset level polarity inherit from region 2019-02-03 14:37:26 +09:00
theme.py Add more layer hints as seen in the wild 2016-09-29 19:43:28 -04:00