diff options
author | jaseg <git@jaseg.de> | 2021-08-18 17:29:57 +0200 |
---|---|---|
committer | jaseg <git@jaseg.de> | 2021-08-18 17:29:57 +0200 |
commit | aaade1b168b3780a9c2ed1387165086ede33bc54 (patch) | |
tree | f379dc1568a6c08e4ccfa68c2572773183dfe5d1 /svg-flatten/src/out_scaler.cpp | |
parent | aad0ae0215719faaf74445d5833921cb07982012 (diff) | |
download | gerbolyze-aaade1b168b3780a9c2ed1387165086ede33bc54.tar.gz gerbolyze-aaade1b168b3780a9c2ed1387165086ede33bc54.tar.bz2 gerbolyze-aaade1b168b3780a9c2ed1387165086ede33bc54.zip |
Collect various rendering params into new RenderContext object
Diffstat (limited to 'svg-flatten/src/out_scaler.cpp')
-rw-r--r-- | svg-flatten/src/out_scaler.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/svg-flatten/src/out_scaler.cpp b/svg-flatten/src/out_scaler.cpp index 983dffe..9b7de4e 100644 --- a/svg-flatten/src/out_scaler.cpp +++ b/svg-flatten/src/out_scaler.cpp @@ -29,27 +29,27 @@ using namespace gerbolyze; using namespace std; -void Scaler::header(d2p origin, d2p size) { +void PolygonScaler::header(d2p origin, d2p size) { m_sink.header({origin[0] * m_scale, origin[1] * m_scale}, {size[0] * m_scale, size[1] * m_scale}); } -void Scaler::footer() { +void PolygonScaler::footer() { m_sink.footer(); } -Scaler &Scaler::operator<<(const LayerNameToken &layer_name) { +PolygonScaler &PolygonScaler::operator<<(const LayerNameToken &layer_name) { m_sink << layer_name; return *this; } -Scaler &Scaler::operator<<(GerberPolarityToken pol) { +PolygonScaler &PolygonScaler::operator<<(GerberPolarityToken pol) { m_sink << pol; return *this; } -Scaler &Scaler::operator<<(const Polygon &poly) { +PolygonScaler &PolygonScaler::operator<<(const Polygon &poly) { Polygon new_poly; for (auto &p : poly) { new_poly.push_back({ p[0] * m_scale, p[1] * m_scale }); |