diff options
author | Hamilton Kibbe <hamilton.kibbe@gmail.com> | 2016-01-28 12:19:03 -0500 |
---|---|---|
committer | Hamilton Kibbe <hamilton.kibbe@gmail.com> | 2016-01-28 12:19:03 -0500 |
commit | 5df38c014fd09792995b2b12b1982c535c962c9a (patch) | |
tree | 3dd1f118a752b7b6e75511e1f3b3af3ac1b67bdc /gerber/render/render.py | |
parent | b9f1b106c3006f1dddb1279ae9622630a29d18c7 (diff) | |
download | gerbonara-5df38c014fd09792995b2b12b1982c535c962c9a.tar.gz gerbonara-5df38c014fd09792995b2b12b1982c535c962c9a.tar.bz2 gerbonara-5df38c014fd09792995b2b12b1982c535c962c9a.zip |
Cleanup, rendering fixes.
fixed rendering of tented vias
fixed rendering of semi-transparent layers
fixed file type detection issues
added some examples
Diffstat (limited to 'gerber/render/render.py')
-rw-r--r-- | gerber/render/render.py | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/gerber/render/render.py b/gerber/render/render.py index d7a62e1..724aaea 100644 --- a/gerber/render/render.py +++ b/gerber/render/render.py @@ -45,7 +45,8 @@ class GerberContext(object): Measurement units. 'inch' or 'metric' color : tuple (<float>, <float>, <float>) - Color used for rendering as a tuple of normalized (red, green, blue) values. + Color used for rendering as a tuple of normalized (red, green, blue) + values. drill_color : tuple (<float>, <float>, <float>) Color used for rendering drill hits. Format is the same as for `color`. @@ -62,8 +63,9 @@ class GerberContext(object): self._units = units self._color = (0.7215, 0.451, 0.200) self._background_color = (0.0, 0.0, 0.0) + self._drill_color = (0.0, 0.0, 0.0) self._alpha = 1.0 - self._invert = False + self.invert = False self.ctx = None @property @@ -125,14 +127,6 @@ class GerberContext(object): raise ValueError('Alpha must be between 0.0 and 1.0') self._alpha = alpha - @property - def invert(self): - return self._invert - - @invert.setter - def invert(self, invert): - self._invert = invert - def render(self, primitive): color = self.color if isinstance(primitive, Line): @@ -156,7 +150,6 @@ class GerberContext(object): else: return - def _render_line(self, primitive, color): pass @@ -186,8 +179,8 @@ class GerberContext(object): class RenderSettings(object): - - def __init__(self, color=(0.0, 0.0, 0.0), alpha=1.0, invert=False, mirror=False): + def __init__(self, color=(0.0, 0.0, 0.0), alpha=1.0, invert=False, + mirror=False): self.color = color self.alpha = alpha self.invert = invert |