summaryrefslogtreecommitdiff
path: root/gerber/render/render.py
diff options
context:
space:
mode:
authorGarret Fick <garret@ficksworkshop.com>2016-07-20 23:20:15 +0800
committerGarret Fick <garret@ficksworkshop.com>2016-07-20 23:20:15 +0800
commit76a49ec8e7d286f887603d05ee64b78e50ca3112 (patch)
tree6a19bbaefefd0042920f208467a87291f27c679b /gerber/render/render.py
parent34f20ee90fc54ca046460bfae06bce927870536f (diff)
parent6f876edd09d9b81649691e529f85653f14b8fd1c (diff)
downloadgerbonara-76a49ec8e7d286f887603d05ee64b78e50ca3112.tar.gz
gerbonara-76a49ec8e7d286f887603d05ee64b78e50ca3112.tar.bz2
gerbonara-76a49ec8e7d286f887603d05ee64b78e50ca3112.zip
Manually merge change 6f876edd09d9b81649691e529f85653f14b8fd1c
Diffstat (limited to 'gerber/render/render.py')
-rw-r--r--gerber/render/render.py19
1 files changed, 5 insertions, 14 deletions
diff --git a/gerber/render/render.py b/gerber/render/render.py
index 6ae9392..cb65a8d 100644
--- a/gerber/render/render.py
+++ b/gerber/render/render.py
@@ -60,7 +60,6 @@ class GerberContext(object):
def __init__(self, units='inch'):
self._units = units
self._color = (0.7215, 0.451, 0.200)
- 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
@@ -155,9 +154,9 @@ class GerberContext(object):
elif isinstance(primitive, Polygon):
self._render_polygon(primitive, color)
elif isinstance(primitive, Drill):
- self._render_drill(primitive, self.drill_color)
+ self._render_drill(primitive, self.color)
elif isinstance(primitive, Slot):
- self._render_slot(primitive, self.drill_color)
+ self._render_slot(primitive, self.color)
elif isinstance(primitive, AMGroup):
self._render_amgroup(primitive, color)
elif isinstance(primitive, Outline):
@@ -216,15 +215,7 @@ class GerberContext(object):
class Renderable(object):
- def __init__(self, color=None, alpha=None, invert=False):
- self.color = color
- self.alpha = alpha
- self.invert = invert
+ def __init__(self, settings=None):
+ self.settings = settings
+ self.primitives = []
- def to_render(self):
- """ Override this in subclass. Should return a list of Primitives or Renderables
- """
- raise NotImplementedError('to_render() must be implemented in subclass')
-
- def apply_theme(self, theme):
- raise NotImplementedError('apply_theme() must be implemented in subclass')