From a4e8603af130b40429d2b50e7daaa1cb321a926a Mon Sep 17 00:00:00 2001 From: artemp Date: Thu, 8 Jun 2017 11:03:47 +0200 Subject: [PATCH] svg transform - correct `rotate( [ ])` rule (ref #763) (The transform attribute defines a list of transform definitions that are applied to an element and the element's children. The items in the transform list are separated by whitespace and/or commas, and are applied from right to left.) --- include/mapnik/svg/svg_transform_grammar_x3_def.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/mapnik/svg/svg_transform_grammar_x3_def.hpp b/include/mapnik/svg/svg_transform_grammar_x3_def.hpp index 799d495b7..dcf2b274e 100644 --- a/include/mapnik/svg/svg_transform_grammar_x3_def.hpp +++ b/include/mapnik/svg/svg_transform_grammar_x3_def.hpp @@ -70,7 +70,7 @@ auto const rotate_action = [] (auto const& ctx) } else { - agg::trans_affine t = agg::trans_affine_translation(-cx,-cy); + agg::trans_affine t = agg::trans_affine_translation(-cx, -cy); t *= agg::trans_affine_rotation(deg2rad(a)); t *= agg::trans_affine_translation(cx, cy); tr = t * tr; @@ -131,7 +131,7 @@ auto const scale = x3::rule {} = no_case[lit("scale")] auto const rotate = x3::rule {} = no_case[lit("rotate")] > lit('(') - > (double_ > -(lit(',') > double_) > -(lit(',') > double_))[rotate_action] + > (double_ > -lit(',') > -double_ > -lit(',') > -double_)[rotate_action] > lit(')') ; auto const skewX = x3::rule {} = no_case[lit("skewX")]