diff options
author | jaseg <git@jaseg.de> | 2021-04-25 18:42:43 +0200 |
---|---|---|
committer | jaseg <git@jaseg.de> | 2021-04-25 18:42:43 +0200 |
commit | 5bb733e55948e9a4273ae0f7cee8e81e38c23206 (patch) | |
tree | 6b04b36b8df3f9da655db8b8764dfc3e95e33b55 /svg-flatten/include/geom2d.hpp | |
parent | 6eb2c967a05a698b3da81168bcbcdc8c8368b490 (diff) | |
download | gerbolyze-5bb733e55948e9a4273ae0f7cee8e81e38c23206.tar.gz gerbolyze-5bb733e55948e9a4273ae0f7cee8e81e38c23206.tar.bz2 gerbolyze-5bb733e55948e9a4273ae0f7cee8e81e38c23206.zip |
Fix pattern rendering and some xform bugs
Diffstat (limited to 'svg-flatten/include/geom2d.hpp')
-rw-r--r-- | svg-flatten/include/geom2d.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/svg-flatten/include/geom2d.hpp b/svg-flatten/include/geom2d.hpp index ac56628..80b47df 100644 --- a/svg-flatten/include/geom2d.hpp +++ b/svg-flatten/include/geom2d.hpp @@ -67,8 +67,8 @@ namespace gerbolyze { } xform2d &translate(double x, double y) { - x0 += x; - y0 += y; + x0 += x*xx + y*xy; + y0 += y*yy + x*yx; return *this; } @@ -109,7 +109,7 @@ namespace gerbolyze { d2p doc2phys(const d2p p) { return d2p { xx * p[0] + xy * p[1] + x0, - xy * p[1] + yy * p[1] + y0 + yx * p[0] + yy * p[1] + y0 }; } |