summaryrefslogtreecommitdiff
path: root/gerber/render/render.py
diff options
context:
space:
mode:
authorPaulo Henrique Silva <ph.silva@gmail.com>2016-01-05 22:05:19 -0200
committerPaulo Henrique Silva <ph.silva@gmail.com>2016-01-05 22:05:19 -0200
commit7a532514631384dbfc9d7fc2002cbbfe52433c9f (patch)
tree5678cff7ba877e9c93ea63445f081fd0430f8b4b /gerber/render/render.py
parentaf5541ac93b222c05229ee05c9def8dbae5f6e25 (diff)
parent6a005436b475e3517fd6a583473b60e601bcc661 (diff)
downloadgerbonara-7a532514631384dbfc9d7fc2002cbbfe52433c9f.tar.gz
gerbonara-7a532514631384dbfc9d7fc2002cbbfe52433c9f.tar.bz2
gerbonara-7a532514631384dbfc9d7fc2002cbbfe52433c9f.zip
Merge pull request #53 from curtacircuitos/pcb_interface
Add PCB interface
Diffstat (limited to 'gerber/render/render.py')
-rw-r--r--gerber/render/render.py15
1 files changed, 4 insertions, 11 deletions
diff --git a/gerber/render/render.py b/gerber/render/render.py
index 737061e..6af8bf1 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
@@ -150,7 +149,7 @@ 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, color)
elif isinstance(primitive, TestRecord):
self._render_test_record(primitive, color)
else:
@@ -184,16 +183,10 @@ class GerberContext(object):
pass
-class Renderable(object):
- def __init__(self, color=None, alpha=None, invert=False):
+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
- 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')