diff options
Diffstat (limited to 'source/svg/svg-run.c')
-rw-r--r-- | source/svg/svg-run.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/svg/svg-run.c b/source/svg/svg-run.c index 19e49836..a3e6193f 100644 --- a/source/svg/svg-run.c +++ b/source/svg/svg-run.c @@ -330,7 +330,7 @@ svg_add_arc_segment(fz_context *ctx, fz_path *path, const fz_matrix *mtx, float { for (t = th0 + d; t < th1 - d/2; t += d) { - fz_transform_point_xy(&p, mtx, cosf(t), sinf(t)); + p = fz_transform_point_xy(cosf(t), sinf(t), *mtx); fz_lineto(ctx, path, p.x, p.y); } } @@ -339,7 +339,7 @@ svg_add_arc_segment(fz_context *ctx, fz_path *path, const fz_matrix *mtx, float th0 += FZ_PI * 2; for (t = th0 - d; t > th1 + d/2; t -= d) { - fz_transform_point_xy(&p, mtx, cosf(t), sinf(t)); + p = fz_transform_point_xy(cosf(t), sinf(t), *mtx); fz_lineto(ctx, path, p.x, p.y); } } @@ -390,8 +390,8 @@ svg_add_arc(fz_context *ctx, fz_path *path, else sign = -1; - fz_rotate(&rotmat, rotation_angle); - fz_rotate(&revmat, -rotation_angle); + rotmat = fz_rotate(rotation_angle); + revmat = fz_rotate(-rotation_angle); /* http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes */ /* Conversion from endpoint to center parameterization */ @@ -408,7 +408,7 @@ svg_add_arc(fz_context *ctx, fz_path *path, /* F.6.5.1 */ pt.x = (x1 - x2) / 2; pt.y = (y1 - y2) / 2; - fz_transform_vector(&pt, &revmat); + pt = fz_transform_vector(pt, revmat); x1t = pt.x; y1t = pt.y; @@ -434,7 +434,7 @@ svg_add_arc(fz_context *ctx, fz_path *path, /* F.6.5.3 */ pt.x = cxt; pt.y = cyt; - fz_transform_vector(&pt, &rotmat); + pt = fz_transform_vector(pt, rotmat); cx = pt.x + (x1 + x2) / 2; cy = pt.y + (y1 + y2) / 2; @@ -457,7 +457,7 @@ svg_add_arc(fz_context *ctx, fz_path *path, dth -= ((FZ_PI / 180) * 360); } - fz_pre_scale(fz_pre_rotate(fz_translate(&mtx, cx, cy), rotation_angle), rx, ry); + mtx = fz_pre_scale(fz_pre_rotate(fz_translate(cx, cy), rotation_angle), rx, ry); svg_add_arc_segment(ctx, path, &mtx, th1, th1 + dth, is_clockwise); fz_lineto(ctx, path, point_x, point_y); @@ -1037,7 +1037,7 @@ svg_run_use(fz_context *ctx, fz_device *dev, svg_document *doc, fz_xml *root, co if (x_att) x = svg_parse_length(x_att, local_state.viewbox_w, local_state.fontsize); if (y_att) y = svg_parse_length(y_att, local_state.viewbox_h, local_state.fontsize); - fz_pre_translate(&local_state.transform, x, y); + local_state.transform = fz_pre_translate(local_state.transform, x, y); if (xlink_href_att && xlink_href_att[0] == '#') { |