The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Rotate embedded SVG files

These changes was commited to the Birdfont repository Sat, 01 Oct 2016 09:58:01 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
author Johan Mattsson <johan.mattsson.m@gmail.com>
Sat, 01 Oct 2016 09:58:01 +0000 (11:58 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Sat, 01 Oct 2016 09:58:45 +0000 (11:58 +0200)
commit dfdd8569b2ebda6fa6425a0f30b2244cffd1ae8b
tree 0378b9cae21c85d6ff6524c20e2266705f171b72
parent fb7ce963c1cdeb29477b07a1ec970a111181a1d0
Rotate embedded SVG files

libbirdfont/BirdFontFile.vala
libbirdfont/ResizeTool.vala
--- a/libbirdfont/BirdFontFile.vala +++ b/libbirdfont/BirdFontFile.vala @@ -464,7 +464,7 @@ os.put_string (@"type=\"svg\" "); os.put_string (@"x=\"$(round (svg.x))\" "); os.put_string (@"y=\"$(round (svg.y))\" "); - os.put_string (@"transform=\"$(svg.transforms.get_xml ())\""); + os.put_string (@"transform=\"$(svg.drawing.transforms.get_xml ())\""); os.put_string (@">\n"); Tag tag = xml.get_root_tag (); @@ -1521,7 +1521,7 @@ if (type == "svg") { EmbeddedSvg svg = SvgParser.parse_embedded_svg_data (tag.get_content ()); - svg.transforms = SvgFile.parse_transform (transform); + svg.drawing.transforms = SvgFile.parse_transform (transform); svg.x = x; svg.y = y; layer.add_object (svg);
--- a/libbirdfont/ResizeTool.vala +++ b/libbirdfont/ResizeTool.vala @@ -137,10 +137,8 @@ PathObject path = (PathObject) object; Path p = path.get_path (); p.create_full_stroke (); - } else { - object.transforms.collapse_transforms (); } - } + } }); move_action.connect ((self, x, y) => { @@ -271,7 +269,6 @@ double theta = angle - svg.drawing.transforms.rotation; svg.drawing.transforms.rotate (theta, x, y); svg.drawing.transforms.collapse_transforms (); - rotation = svg.drawing.transforms.total_rotation; } else if (p is PathObject) { Path path = ((PathObject) p).get_path (); SvgTransforms transform = new SvgTransforms ();