Skip to content

Instantly share code, notes, and snippets.

@springmeyer
Created March 21, 2014 00:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save springmeyer/9677028 to your computer and use it in GitHub Desktop.
Save springmeyer/9677028 to your computer and use it in GitHub Desktop.
diff --git a/deps/agg/include/agg_math_stroke.h b/deps/agg/include/agg_math_stroke.h
index 4806dcd..7ba45f6 100644
--- a/deps/agg/include/agg_math_stroke.h
+++ b/deps/agg/include/agg_math_stroke.h
@@ -22,6 +22,7 @@
#include "agg_math.h"
#include "agg_vertex_sequence.h"
+#include <mapnik/debug.hpp>
namespace agg
{
@@ -476,6 +477,8 @@ namespace agg
// the same as in round joins and caps. You can safely comment
// out this entire "if".
//-------------------
+ MAPNIK_LOG_ERROR(values) << std::fixed << m_approx_scale
+ << " " << m_width_abs << " " << dbevel << " " << m_width_eps;
if(m_approx_scale * (m_width_abs - dbevel) < m_width_eps)
{
if(calc_intersection(v0.x + dx1, v0.y - dy1,
@@ -484,13 +487,17 @@ namespace agg
v2.x + dx2, v2.y - dy2,
&dx, &dy))
{
+ MAPNIK_LOG_ERROR(line_join) << "add_vertex1 " << std::fixed << dx << " " << dy;
add_vertex(vc, dx, dy);
}
else
{
+ MAPNIK_LOG_ERROR(line_join) << "add_vertex2 " << std::fixed << (v1.x + dx1) << " " << (v1.y - dy1);
add_vertex(vc, v1.x + dx1, v1.y - dy1);
}
return;
+ } else {
+ MAPNIK_LOG_ERROR(line_join) << "false";
}
}
@@ -507,6 +514,7 @@ namespace agg
break;
case round_join:
+ MAPNIK_LOG_ERROR(line_join) << v1.x << " " << v1.y << " " << dx1 << " " << -dy1 << " " << dx2 << " " << -dy2;
calc_arc(vc, v1.x, v1.y, dx1, -dy1, dx2, -dy2);
break;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment