diff options
author | Hamilton Kibbe <hamilton.kibbe@gmail.com> | 2015-09-10 15:54:29 -0400 |
---|---|---|
committer | Hamilton Kibbe <hamilton.kibbe@gmail.com> | 2015-09-10 15:54:29 -0400 |
commit | b81c9d4bf96845ced3495eb158ec3a3c9e4dce3d (patch) | |
tree | ab939229a9735a4c0fd831daf0a11151d3c78d0a /gerber/render/render.py | |
parent | c92d2d9ea2853fd22b5ff51f211b03b4e660c551 (diff) | |
parent | cb2fa34e881a389cf8a4bc98fd12be662ff687f8 (diff) | |
download | gerbonara-b81c9d4bf96845ced3495eb158ec3a3c9e4dce3d.tar.gz gerbonara-b81c9d4bf96845ced3495eb158ec3a3c9e4dce3d.tar.bz2 gerbonara-b81c9d4bf96845ced3495eb158ec3a3c9e4dce3d.zip |
Merge pull request #40 from curtacircuitos/cairo-render-unification
Cairo render unification
Diffstat (limited to 'gerber/render/render.py')
-rw-r--r-- | gerber/render/render.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gerber/render/render.py b/gerber/render/render.py index 68c2115..124e743 100644 --- a/gerber/render/render.py +++ b/gerber/render/render.py @@ -62,6 +62,7 @@ class GerberContext(object): self._drill_color = (0.25, 0.25, 0.25) self._background_color = (0.0, 0.0, 0.0) self._alpha = 1.0 + self._invert = False @property def units(self): @@ -122,6 +123,14 @@ 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 primitive.level_polarity == 'dark' else self.background_color) |