int number_count = 0;
double cur_x = 0, cur_y = 0;
double cur_ctl_x = 0, cur_ctl_y = 0;
+ double start_x = 0, start_y = 0;
char pth_cmd = 0;
Eina_Bool is_quadratic = EINA_FALSE;
if (!path) break;
_process_command(&svg_path, pth_cmd, number_array,
&number_count, &cur_x, &cur_y,
- &cur_ctl_x, &cur_ctl_y, &is_quadratic);
+ &cur_ctl_x, &cur_ctl_y, &start_x, &start_y, &is_quadratic);
}
tvg_shape_append_path(sd->shape, svg_path.cmds, svg_path.cmds_cnt, svg_path.pts, svg_path.pts_cnt);
static void
_process_command(Efl_Tvg_Shape_Svg_Path *svg_path, char c, double *pts,
int *number_array, double *cur_x, double *cur_y,
- double *cur_ctl_x, double *cur_ctl_y, Eina_Bool *is_quadratic)
+ double *cur_ctl_x, double *cur_ctl_y,
+ double *start_x, double *start_y,
+ Eina_Bool *is_quadratic)
{
int i = 0;
switch (c)
svg_path->pts[svg_path->pts_cnt-1].x = pts[0];
svg_path->pts[svg_path->pts_cnt-1].y = pts[1];
svg_path->cmds[svg_path->cmds_cnt-1] = TVG_PATH_COMMAND_MOVE_TO;
- *cur_x = pts[0];
- *cur_y = pts[1];
+ *start_x = *cur_x = pts[0];
+ *start_y = *cur_y = pts[1];
break;
}
case 'l':
{
if (!_svg_path_grow(svg_path, 0)) break;
svg_path->cmds[svg_path->cmds_cnt-1] = TVG_PATH_COMMAND_CLOSE;
+ *cur_x = *start_x;
+ *cur_y = *start_y;
break;
}
default: