sd = _get_shape_data(obj);
if (!sd || !sd->shape) return;
- float radius = fmin(w / 2.0f, h / 2.0f);
- float cx = x + (w / 2.0f);
- float cy = y + (h / 2.0f);
+ double radius = fmin(w / 2.0f, h / 2.0f);
+ double cx = x + (w / 2.0f);
+ double cy = y + (h / 2.0f);
- tvg_shape_append_arc(sd->shape, cx, cy, radius, start_angle, sweep_length, 0);
- _assign_current_point(sd, NULL, cx, cy);
+ tvg_shape_append_arc(sd->shape, cx, cy, radius, -start_angle, -sweep_length, 0);
+ _assign_current_point(sd, NULL, cx + radius*cos((start_angle + sweep_length) * M_PI / 180),
+ cy - radius*sin((start_angle + sweep_length) * M_PI / 180));
#endif
efl_canvas_vg_node_change(obj);
}
case 'q':
case 'Q':
{
- float ctrl_x0 = (*cur_x + 2 * pts[0]) * (1.0 / 3.0);
- float ctrl_y0 = (*cur_y + 2 * pts[1]) * (1.0 / 3.0);
- float ctrl_x1 = (pts[2] + 2 * pts[0]) * (1.0 / 3.0);
- float ctrl_y1 = (pts[3] + 2 * pts[1]) * (1.0 / 3.0);
+ double ctrl_x0 = (*cur_x + 2 * pts[0]) * (1.0 / 3.0);
+ double ctrl_y0 = (*cur_y + 2 * pts[1]) * (1.0 / 3.0);
+ double ctrl_x1 = (pts[2] + 2 * pts[0]) * (1.0 / 3.0);
+ double ctrl_y1 = (pts[3] + 2 * pts[1]) * (1.0 / 3.0);
if (!_svg_path_grow(svg_path, 3)) break;
svg_path->pts[svg_path->pts_cnt-3].x = ctrl_x0;
svg_path->pts[svg_path->pts_cnt-3].y = ctrl_y0;