diff options
Diffstat (limited to 'gerber/render/render.py')
-rw-r--r-- | gerber/render/render.py | 19 |
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') |