From f88134f9caccafd30f4598cdb583e5fcd6585c55 Mon Sep 17 00:00:00 2001 From: jaseg Date: Sat, 30 Jan 2021 15:18:56 +0100 Subject: Add dilation option --- include/gerbolyze.hpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'include/gerbolyze.hpp') diff --git a/include/gerbolyze.hpp b/include/gerbolyze.hpp index a48c3bf..1fe13ae 100644 --- a/include/gerbolyze.hpp +++ b/include/gerbolyze.hpp @@ -71,6 +71,21 @@ namespace gerbolyze { Flattener_D *d; }; + class Dilater : public PolygonSink { + public: + Dilater(PolygonSink &sink, double dilation) : m_sink(sink), m_dilation(dilation) {} + virtual void header(d2p origin, d2p size); + virtual Dilater &operator<<(const Polygon &poly); + virtual Dilater &operator<<(const LayerNameToken &layer_name); + virtual Dilater &operator<<(GerberPolarityToken pol); + virtual void footer(); + + private: + PolygonSink &m_sink; + double m_dilation; + GerberPolarityToken m_current_polarity = GRB_POL_DARK; + }; + class StreamPolygonSink : public PolygonSink { public: StreamPolygonSink(std::ostream &out, bool only_polys=false) : m_only_polys(only_polys), m_out(out) {} -- cgit