Skip to content

Passing conv_trans Transform by value and svg rendering #1204

Closed
springmeyer opened this Issue May 10, 2012 · 3 comments

2 participants

@springmeyer
Mapnik member

In the compositing branch, ba270e0 is the reason for the failing visual tests as the affine transform is not set up until after is it passed to the conv_transform ctor: https://github.com/mapnik/mapnik/blob/master/include/mapnik/svg/svg_renderer.hpp#L251-254

This fixes, but I'm not positive it is the cleanest approach:

diff --git a/include/mapnik/svg/svg_renderer.hpp b/include/mapnik/svg/svg_renderer.hpp
index 666bbac..db67e88 100644
--- a/include/mapnik/svg/svg_renderer.hpp
+++ b/include/mapnik/svg/svg_renderer.hpp
@@ -269,6 +269,8 @@ public:

             transform *= mtx;
             double scl = transform.scale();
+            curved_stroked_trans.transformer(transform);
+            curved_trans.transformer(transform);
             //curved_.approximation_method(curve_inc);
             curved_.approximation_scale(scl);
             curved_.angle_tolerance(0.0);
@artemp artemp added a commit that referenced this issue May 11, 2012
@artemp artemp fix transform (patch from #1204) b42e498
@artemp
Mapnik member
artemp commented May 11, 2012

Applied in b42e498

@springmeyer
Mapnik member

closing. we'll stick with this workaround for now.

@springmeyer springmeyer added a commit that referenced this issue May 29, 2012
@springmeyer springmeyer Revert "followup to b42e498, fix svg transforms for svg render as wel…
…l as render_id - refs #1204"

This reverts commit ac9dc47.
e8e8ba1
@springmeyer springmeyer added a commit that referenced this issue May 29, 2012
@springmeyer springmeyer Revert "fix transform (patch from #1204)"
This reverts commit b42e498.
109081b
@springmeyer
Mapnik member

workarounds were reverted as noted at #1231 (comment), and replaced with more proper fix in e71d38f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.