aboutsummaryrefslogtreecommitdiff
path: root/include/gerbolyze.hpp
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2021-01-30 15:18:56 +0100
committerjaseg <git@jaseg.de>2021-01-30 15:18:56 +0100
commitf88134f9caccafd30f4598cdb583e5fcd6585c55 (patch)
tree00a1d7f341706a649291b8b1beb568239716a17f /include/gerbolyze.hpp
parenta6540b73dabc3af766643657b226f942ef05656c (diff)
downloadgerbolyze-f88134f9caccafd30f4598cdb583e5fcd6585c55.tar.gz
gerbolyze-f88134f9caccafd30f4598cdb583e5fcd6585c55.tar.bz2
gerbolyze-f88134f9caccafd30f4598cdb583e5fcd6585c55.zip
Add dilation option
Diffstat (limited to 'include/gerbolyze.hpp')
-rw-r--r--include/gerbolyze.hpp15
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) {}