Commit 7b382ed
SVG line instruction
Changed files (3)
Diff
@@ -109,7 +109,7 @@ public static void get_arc_arguments (double x0, double y0, 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); //@@ -637,7 +637,7 @@ public class SvgFile : GLib.Object { 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,14 +654,14 @@ public class SvgFile : GLib.Object { 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]; double angle_start;@@ -1214,8 +1214,6 @@ public class SvgFile : GLib.Object { 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; }@@ -67,6 +67,10 @@ public class SvgPath : Object { 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;+ } } }