EAPI void evas_vg_shape_append_circle(Evas_Vg_Shape *obj, double x, double y, double radius);
/**
+ * @brief Append a ellipse with given center and x-radius, y-radius
+ *
+ * @param[in] obj The object.
+ * @param[in] cx The x co-ordinate of the center of the ellipse.
+ * @param[in] cy The y co-ordinate of the center of the ellipse.
+ * @param[in] rx The horizontal radius of the ellipse
+ * @param[in] ry The vertical radius of the ellipse
+ * @param[in] radius The radius of the circle.
+ *
+ * @since 1.25
+ */
+EAPI void evas_vg_shape_append_ellipse(Evas_Vg_Shape *obj, double cx, double cy, double rx, double ry);
+
+/**
* @brief Append the given rectangle with rounded corner to the path.
*
* The xr and yr arguments specify the radii of the ellipses defining the
}
EAPI void
+evas_vg_shape_append_ellipse(Evas_Vg_Shape *obj, double cx, double cy, double rx, double ry)
+{
+#ifdef HAVE_THORVG
+ Efl_Canvas_Vg_Shape_Data *sd = NULL;
+
+ if (!obj) return;
+ sd = _get_shape_data(obj);
+ if (!sd || !sd->shape) return;
+ tvg_shape_append_circle(sd->shape, cx, cy, rx, ry);
+ _assign_current_point(sd, NULL, cx, cy - ry);
+#else
+ efl_gfx_path_append_arc(obj, cx - rx, cy - ry, 2 * rx, 2 * ry, 0, 360);
+#endif
+ efl_canvas_vg_node_change(obj);
+}
+
+EAPI void
evas_vg_shape_append_rect(Evas_Vg_Shape *obj, double x, double y, double w, double h, double rx, double ry)
{
#ifdef HAVE_THORVG
break;
case SVG_NODE_ELLIPSE:
vg = efl_add(EFL_CANVAS_VG_SHAPE_CLASS, parent);
- evas_vg_shape_append_arc(vg, node->node.ellipse.cx - node->node.ellipse.rx,
- node->node.ellipse.cy - node->node.ellipse.ry,
- 2*node->node.ellipse.rx, 2*node->node.ellipse.ry, 0, 360);
+ evas_vg_shape_append_ellipse(vg, node->node.ellipse.cx, node->node.ellipse.cy,
+ node->node.ellipse.rx, node->node.ellipse.ry);
evas_vg_shape_append_close(vg);
break;
case SVG_NODE_CIRCLE: