ENFN->ector_renderer_draw(engine, output, context, nd->renderer, NULL, EINA_FALSE);
}
}
-#else
-static void
-_efl_canvas_vg_container_render_pre_tvg(Evas_Object_Protected_Data *obj,
- Efl_VG *node,
- Efl_Canvas_Vg_Node_Data *nd,
- Eina_Matrix3 *pTransform,
- void *canvas, void *scene, int w, int h)
-{
- Efl_Canvas_Vg_Container_Data *cd = NULL;
- Efl_VG *child = NULL;
- Eina_List *l = NULL;
-
- if (!nd || !nd->data) return;
- cd = nd->data;
-
- tvg_scene_clear(cd->scene);
-
- if (!nd->visibility)
- return;
-
- if (scene != NULL)
- tvg_scene_push(scene, cd->scene);
- else if (scene == NULL && canvas != NULL)
- tvg_canvas_push(canvas, cd->scene);
-
- EFL_CANVAS_VG_COMPUTE_MATRIX(cTransform, pTransform, nd);
-
- EINA_LIST_FOREACH(cd->children, l, child)
- {
- Efl_Canvas_Vg_Node_Data *cnd = efl_data_scope_get(child, EFL_CANVAS_VG_NODE_CLASS);
- if (cnd && cnd->render_pre_tvg)
- cnd->render_pre_tvg(obj, child, cnd, cTransform, canvas, cd->scene);
- }
-}
-#endif
static Ector_Buffer *
_prepare_comp(Evas_Object_Protected_Data *obj, //vector object
ector_buffer_pixels_set(surface, pd->comp.pixels, size.w, size.h, pd->comp.stride,
EFL_GFX_COLORSPACE_ARGB8888, EINA_TRUE);
ector_surface_reference_point_set(surface, 0, 0);
-#ifndef HAVE_THORVG
_draw_comp(obj, comp_target, surface, engine, output, context);
-#endif
return pd->comp.buffer;
}
+#else
+static void
+_efl_canvas_vg_container_render_pre_tvg(Evas_Object_Protected_Data *obj,
+ Efl_VG *node,
+ Efl_Canvas_Vg_Node_Data *nd,
+ Eina_Matrix3 *pTransform,
+ void *canvas, void *scene,
+ EINA_UNUSED int w, EINA_UNUSED int h)
+{
+ Efl_Canvas_Vg_Container_Data *cd = NULL;
+ Efl_VG *child = NULL;
+ Eina_List *l = NULL;
+
+ if (!nd || !nd->data) return;
+ cd = nd->data;
+
+ tvg_scene_clear(cd->scene);
+
+ if (!nd->visibility)
+ return;
+
+ if (scene != NULL)
+ tvg_scene_push(scene, cd->scene);
+ else if (scene == NULL && canvas != NULL)
+ tvg_canvas_push(canvas, cd->scene);
+
+ EFL_CANVAS_VG_COMPUTE_MATRIX(cTransform, pTransform, nd);
+
+ EINA_LIST_FOREACH(cd->children, l, child)
+ {
+ Efl_Canvas_Vg_Node_Data *cnd = efl_data_scope_get(child, EFL_CANVAS_VG_NODE_CLASS);
+ if (cnd && cnd->render_pre_tvg)
+ cnd->render_pre_tvg(obj, child, cnd, cTransform, canvas, cd->scene);
+ }
+}
+#endif
static void
_efl_canvas_vg_container_render_pre(Evas_Object_Protected_Data *vg_pd,
{
if (commands)
{
- while (commands[*cmd_length] != EFL_GFX_PATH_COMMAND_TYPE_END)
+ while (commands[*cmd_length] != EVAS_VG_PATH_COMMAND_END)
{
*pts_length += _get_command_length(commands[*cmd_length]);
(*cmd_length)++;
static char*
_next_command(char *path, char *cmd, double *arr, int *count)
{
- int i = 0, large, sweep;
+ int i = 0, large = 0, sweep = 0;
path = _skipcomma(path);
if (isalpha(*path))
double angle, Eina_Bool large_arc, Eina_Bool sweep,
double sx, double sy, Arc_To_Init_Variables *var)
{
- double cxp, cyp;
- double cos_phi, sin_phi;
- double dx2, dy2;
- double x1p, y1p;
- double x1p2, y1p2;
- double rx2, ry2;
- double lambda;
- double c;
- double at;
- double delta_theta;
- double nat;
+ double cxp = 0, cyp = 0;
+ double cos_phi = 0, sin_phi = 0;
+ double dx2 = 0, dy2 = 0;
+ double x1p = 0, y1p = 0;
+ double x1p2 = 0, y1p2 = 0;
+ double rx2 = 0, ry2 = 0;
+ double lambda = 0;
+ double c = 0;
+ double at = 0;
+ double delta_theta = 0;
+ double nat = 0;
angle = angle * M_PI / 180.0;
cos_phi = cos(angle);
int *number_array, double *cur_x, double *cur_y,
double *cur_ctl_x, double *cur_ctl_y, Eina_Bool *is_quadratic)
{
- int i;
+ int i = 0;
switch (c)
{
case 'm':
case 's':
case 'S':
{
- double ctrl_x, ctrl_y;
+ double ctrl_x = 0, ctrl_y = 0;
ctrl_x = *cur_x;
ctrl_y = *cur_y;
if ((svg_path->cmds_cnt > 1) && (svg_path->cmds[svg_path->cmds_cnt - 1] ==
case 't':
case 'T':
{
- double ctrl_x, ctrl_y, ctrl_x0, ctrl_y0, ctrl_x1, ctrl_y1;
+ double ctrl_x = 0, ctrl_y = 0, ctrl_x0 = 0, ctrl_y0 = 0, ctrl_x1 = 0, ctrl_y1 = 0;
ctrl_x = *cur_x;
ctrl_y = *cur_y;
if ((svg_path->cmds_cnt > 1) && (svg_path->cmds[svg_path->cmds_cnt - 1] ==
case 'A':
{
Arc_To_Init_Variables var;
- double x, y, rx, ry;
- double sx, sy, ex, ey;
- double c1x, c1y, c2x, c2y;
- double theta2;
- double cos_theta2, sin_theta2;
- int i;
+ double x = 0, y = 0, rx = 0, ry = 0;
+ double sx = 0, sy = 0, ex = 0, ey = 0;
+ double c1x = 0, c1y = 0, c2x = 0, c2y = 0;
+ double theta2 = 0;
+ double cos_theta2 = 0, sin_theta2 = 0;
+ int i = 0;
x = pts[5];
y = pts[6];
* https://www.w3.org/TR/SVG/painting.html
*/
static inline void
-_parse_dash_array(const char *str, Efl_Gfx_Dash** dash, int *length)
+_parse_dash_array(const char *str, Evas_Vg_Dash** dash, int *length)
{
// It is assumed that the length of the dasharray string is 255 or less.
double tmp[255];
if (count & 0x1)
{ // odd case.
*length = count;
- *dash = calloc(*length, sizeof(Efl_Gfx_Dash));
+ *dash = calloc(*length, sizeof(Evas_Vg_Dash));
while (index < count)
{
leni = (2 * index) % count;
else
{ // even case
*length = count/2;
- *dash = calloc(*length, sizeof(Efl_Gfx_Dash));
+ *dash = calloc(*length, sizeof(Evas_Vg_Dash));
while (index < *length)
{
(*dash)[index].length = tmp[2 * index];
if (count > 0)
{
if (child->stroke.dash) free(child->stroke.dash);
- child->stroke.dash = calloc(count, sizeof(Efl_Gfx_Dash));
+ child->stroke.dash = calloc(count, sizeof(Evas_Vg_Dash));
child->stroke.dash_count = count;
for (i = 0; i < count; i++)
{