diff options
author | jaseg <git@jaseg.de> | 2021-01-30 15:18:56 +0100 |
---|---|---|
committer | jaseg <git@jaseg.de> | 2021-01-30 15:18:56 +0100 |
commit | f88134f9caccafd30f4598cdb583e5fcd6585c55 (patch) | |
tree | 00a1d7f341706a649291b8b1beb568239716a17f /include/gerbolyze.hpp | |
parent | a6540b73dabc3af766643657b226f942ef05656c (diff) | |
download | gerbolyze-f88134f9caccafd30f4598cdb583e5fcd6585c55.tar.gz gerbolyze-f88134f9caccafd30f4598cdb583e5fcd6585c55.tar.bz2 gerbolyze-f88134f9caccafd30f4598cdb583e5fcd6585c55.zip |
Add dilation option
Diffstat (limited to 'include/gerbolyze.hpp')
-rw-r--r-- | include/gerbolyze.hpp | 15 |
1 files changed, 15 insertions, 0 deletions
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) {} |