svg transform - correct rotate(<a> [<x> <y>])
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.)
This commit is contained in:
parent
199a281627
commit
a4e8603af1
1 changed files with 2 additions and 2 deletions
|
@ -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<class scale_tag> {} = no_case[lit("scale")]
|
|||
|
||||
auto const rotate = x3::rule<class rotate_tag> {} = 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<class skewX_tag> {} = no_case[lit("skewX")]
|
||||
|
|
Loading…
Reference in a new issue