The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

SVG line instruction

These changes was commited to the Birdfont repository Wed, 13 Jan 2016 23:16:08 +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>
Wed, 13 Jan 2016 23:16:08 +0000 (00:16 +0100)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Wed, 13 Jan 2016 23:16:08 +0000 (00:16 +0100)
commit 7b382ed6f52de61dd84216fcb64a14e2cea73bf7
tree 98dcb498f3a2050028ecbdaaf56093abb9a1d87d
parent d051bd2a86e93559a017767a1a5777eabb1f4cbf
SVG line instruction

libsvgbird/SvgArc.vala
libsvgbird/SvgFile.vala
libsvgbird/SvgPath.vala
--- a/libsvgbird/SvgArc.vala +++ b/libsvgbird/SvgArc.vala @@ -109,7 +109,7 @@ sx2 = (x0 + x) / 2.0; sy2 = (y0 + y) / 2.0; - cx = sx2 + (cosAngle * cx1 - sinAngle * cy1); // FIXME: + delete this + cx = sx2 + (cosAngle * cx1 - sinAngle * cy1); cy = sy2 + (sinAngle * cx1 + cosAngle * cy1); //
--- a/libsvgbird/SvgFile.vala +++ b/libsvgbird/SvgFile.vala @@ -637,7 +637,7 @@ get_bezier_points (data, out bezier_points, out points_size, true); - // instructions are padded + // all instructions are padded for (int i = 0; i < points_size; i++) { // FIXME: add more types @@ -654,13 +654,13 @@ points.add (bezier_points[i].y2); points.add (0); } else if (bezier_points[i].type == 'L') { - points.add_type (CUBIC); // FIXME: use cairo line - points.add (bezier_points[i].x0); - points.add (bezier_points[i].y0); - points.add (bezier_points[i].x0); - points.add (bezier_points[i].y0); + points.add_type (LINE); points.add (bezier_points[i].x0); points.add (bezier_points[i].y0); + points.add (0); + points.add (0); + points.add (0); + points.add (0); points.add (0); } else if (bezier_points[i].type == 'A') { BezierPoints b = bezier_points[i]; @@ -1213,8 +1213,6 @@ bezier_points[bi].large_arc = large_arc == 1; bezier_points[bi].sweep = arc_sweep == 1; bi++; - - // FIXME: Delete add_arc_points (bezier_points, ref bi, px, py, arc_rx, arc_ry, arc_rotation, large_arc == 1, arc_sweep == 1, cx, cy); px = cx; py = cy;
--- a/libsvgbird/SvgPath.vala +++ b/libsvgbird/SvgPath.vala @@ -67,6 +67,10 @@ points[i + 3].value, points[i + 4].value, points[i + 5].value, points[i + 6].value); break; + case LINE: + cr.line_to (points[i + 1].value, points[i + 2].value); + break; + } } }