diff options
Diffstat (limited to 'gerber/render/render.py')
-rw-r--r-- | gerber/render/render.py | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/gerber/render/render.py b/gerber/render/render.py index 79f43d6..580a7ea 100644 --- a/gerber/render/render.py +++ b/gerber/render/render.py @@ -139,7 +139,7 @@ class GerberContext(object): if not primitive: return - self._pre_render_primitive(primitive) + self.pre_render_primitive(primitive) color = self.color if isinstance(primitive, Line): @@ -167,16 +167,35 @@ class GerberContext(object): elif isinstance(primitive, TestRecord): self._render_test_record(primitive, color) - self._post_render_primitive(primitive) + self.post_render_primitive(primitive) - def _pre_render_primitive(self, primitive): + def set_bounds(self, bounds, *args, **kwargs): + """Called by the renderer to set the extents of the file to render. + + Parameters + ---------- + bounds: Tuple[Tuple[float, float], Tuple[float, float]] + ( (x_min, x_max), (y_min, y_max) + """ + pass + + def paint_background(self): + pass + + def new_render_layer(self): + pass + + def flatten(self): + pass + + def pre_render_primitive(self, primitive): """ Called before rendering a primitive. Use the callback to perform some action before rendering a primitive, for example adding a comment. """ return - def _post_render_primitive(self, primitive): + def post_render_primitive(self, primitive): """ Called after rendering a primitive. Use the callback to perform some action after rendering a primitive |