From 1180ebdc1f18044a74f22f17b4d500ce7d6543fa Mon Sep 17 00:00:00 2001 From: jaseg Date: Sun, 25 Apr 2021 00:09:57 +0200 Subject: Remove cairo dependency We initially used Cairo for its bezier flattening algorithm. That algorithm turned out to be a bit too imprecise at the scales we're working at here (#17), so I ended up porting over some code from Antigrain Graphics. The only other thing we used Cairo for was debug output and coordinate transforms, so I just wrote the relevant vector math in a small header file, deleted all debug output code and thus eliminated the cairo dependency. This is a step towards Windows builds. --- svg-flatten/include/flatten.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'svg-flatten/include/flatten.hpp') diff --git a/svg-flatten/include/flatten.hpp b/svg-flatten/include/flatten.hpp index b620890..92cbf38 100644 --- a/svg-flatten/include/flatten.hpp +++ b/svg-flatten/include/flatten.hpp @@ -5,9 +5,9 @@ namespace gerbolyze { class curve4_div { public: curve4_div(double distance_tolerance=0.1, double angle_tolerance=0.0, double cusp_limit=0.0) - : m_distance_tolerance_square(0.25*distance_tolerance*distance_tolerance), - m_angle_tolerance(angle_tolerance), - m_cusp_limit(cusp_limit) + : m_cusp_limit(cusp_limit), + m_distance_tolerance_square(0.25*distance_tolerance*distance_tolerance), + m_angle_tolerance(angle_tolerance) { } -- cgit