The Birdfont Source Code


All Repositories / birdfont.git / blobdiff – RSS feed

Rotation

Changes made to libsvgbird/SvgTransform.vala

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
--- libsvgbird/SvgTransform.vala +++ libsvgbird/SvgTransform.vala @@ -21,7 +21,8 @@ NONE, TRANSLATE, MATRIX, - SCALE + SCALE, + ROTATE } public class SvgTransform : GLib.Object { @@ -67,7 +68,14 @@ matrix = Matrix.identity (); - if (type == TransformType.SCALE) { + if (type == TransformType.ROTATE) { + if (arguments.size == 1) { + double r = arguments.get_double (0); + r *= Math.PI / 180; + matrix.rotate (r); + return matrix; + } + } else if (type == TransformType.SCALE) { if (arguments.size == 1) { double s = arguments.get_double (0); matrix.scale (s, s);