summaryrefslogtreecommitdiff
path: root/gerber/render/render.py
diff options
context:
space:
mode:
authorHamilton Kibbe <hamilton.kibbe@gmail.com>2016-01-21 03:57:44 -0500
committerGarret Fick <garret@ficksworkshop.com>2016-08-06 09:40:40 +0800
commit8cd842a41a55ab3d8f558a2e3e198beba7da58a1 (patch)
tree895d818072e043ac5275ed6cdc1d724ea5cd489a /gerber/render/render.py
parent965d3ce23b92f8aff1063debd6d3364de15791fe (diff)
downloadgerbonara-8cd842a41a55ab3d8f558a2e3e198beba7da58a1.tar.gz
gerbonara-8cd842a41a55ab3d8f558a2e3e198beba7da58a1.tar.bz2
gerbonara-8cd842a41a55ab3d8f558a2e3e198beba7da58a1.zip
Manually mere rendering changes
Diffstat (limited to 'gerber/render/render.py')
-rw-r--r--gerber/render/render.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/gerber/render/render.py b/gerber/render/render.py
index f521c44..7bd4c00 100644
--- a/gerber/render/render.py
+++ b/gerber/render/render.py
@@ -57,12 +57,14 @@ class GerberContext(object):
alpha : float
Rendering opacity. Between 0.0 (transparent) and 1.0 (opaque.)
"""
+
def __init__(self, units='inch'):
self._units = units
self._color = (0.7215, 0.451, 0.200)
self._background_color = (0.0, 0.0, 0.0)
self._alpha = 1.0
self._invert = False
+ self.ctx = None
@property
def units(self):
@@ -134,11 +136,10 @@ class GerberContext(object):
def render(self, primitive):
if not primitive:
return
- color = (self.color if primitive.level_polarity == 'dark'
- else self.background_color)
self._pre_render_primitive(primitive)
+ color = self.color
if isinstance(primitive, Line):
self._render_line(primitive, color)
elif isinstance(primitive, Arc):
@@ -180,6 +181,7 @@ class GerberContext(object):
"""
return
+
def _render_line(self, primitive, color):
pass
@@ -215,9 +217,9 @@ class GerberContext(object):
class RenderSettings(object):
+
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
self.mirror = mirror
-