summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSubhransu Mohanty <sub.mohanty@samsung.com>2016-08-03 17:34:50 -0700
committerCedric Bail <cedric@osg.samsung.com>2016-08-03 17:34:57 -0700
commitd458101a410a6ffc92d2e59f920a6246f833999f (patch)
tree4e05b6291d4f626773a3b9bf9f55c19445ce7594
parentc64071ae132ddc5894d5daad8a874377a176aac5 (diff)
edje: updated the start index of vector resource from 1 to 0
Reviewers: cedric, jpeg Subscribers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D4205 Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
-rw-r--r--src/bin/edje/edje_cc_handlers.c6
-rw-r--r--src/lib/edje/edje_calc.c4
-rw-r--r--src/lib/edje/edje_edit.c2
-rw-r--r--src/lib/edje/edje_load.c5
4 files changed, 11 insertions, 6 deletions
diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c
index 2f6481c656..de5b13861b 100644
--- a/src/bin/edje/edje_cc_handlers.c
+++ b/src/bin/edje/edje_cc_handlers.c
@@ -2330,7 +2330,7 @@ _handle_vector_image(void)
2330 2330
2331 name = parse_str(0); 2331 name = parse_str(0);
2332 2332
2333 ed->vg.id = 0; 2333 ed->vg.id = -1;
2334 2334
2335 for (i = 0; i < edje_file->image_dir->vectors_count; ++i) 2335 for (i = 0; i < edje_file->image_dir->vectors_count; ++i)
2336 { 2336 {
@@ -2342,7 +2342,7 @@ _handle_vector_image(void)
2342 } 2342 }
2343 } 2343 }
2344 2344
2345 if (!ed->vg.id) 2345 if (ed->vg.id < 0)
2346 error_and_abort(NULL, "Failed to find the vector resource :%s", name); 2346 error_and_abort(NULL, "Failed to find the vector resource :%s", name);
2347 2347
2348 free(name); 2348 free(name);
@@ -2410,7 +2410,7 @@ st_images_vector(void)
2410 vector = edje_file->image_dir->vectors + edje_file->image_dir->vectors_count - 1; 2410 vector = edje_file->image_dir->vectors + edje_file->image_dir->vectors_count - 1;
2411 2411
2412 vector->entry = tmp; 2412 vector->entry = tmp;
2413 vector->id = edje_file->image_dir->vectors_count; 2413 vector->id = edje_file->image_dir->vectors_count - 1;
2414} 2414}
2415 2415
2416 2416
diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c
index 66b1cee4c0..64db70911a 100644
--- a/src/lib/edje/edje_calc.c
+++ b/src/lib/edje/edje_calc.c
@@ -3269,7 +3269,7 @@ static void
3269_edje_svg_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3 EINA_UNUSED, Edje_Part_Description_Vector *chosen_desc, FLOAT_T pos) 3269_edje_svg_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3 EINA_UNUSED, Edje_Part_Description_Vector *chosen_desc, FLOAT_T pos)
3270{ 3270{
3271 int w, h; 3271 int w, h;
3272 int new_svg = 0; 3272 int new_svg = -1;
3273 Efl_VG *root_vg; 3273 Efl_VG *root_vg;
3274 Eina_Matrix3 matrix; 3274 Eina_Matrix3 matrix;
3275 Edje_Vector_Data *start, *end; 3275 Edje_Vector_Data *start, *end;
@@ -3288,7 +3288,7 @@ _edje_svg_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3 EINA_U
3288 new_svg = next_state->vg.id; 3288 new_svg = next_state->vg.id;
3289 } 3289 }
3290 } 3290 }
3291 if (new_svg) // animation with svg id change 3291 if (new_svg >= 0) // animation with svg id change
3292 { 3292 {
3293 start = _edje_ref_vector_data(ed, chosen_desc->vg.id); 3293 start = _edje_ref_vector_data(ed, chosen_desc->vg.id);
3294 end = _edje_ref_vector_data(ed, new_svg); 3294 end = _edje_ref_vector_data(ed, new_svg);
diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index 972ea88a09..f704a05626 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -3142,6 +3142,8 @@ _edje_edit_real_part_add(Evas_Object *obj, const char *name, Edje_Part_Type type
3142 { 3142 {
3143 rp->type = EDJE_PART_TYPE_VECTOR; 3143 rp->type = EDJE_PART_TYPE_VECTOR;
3144 rp->typedata.vector = calloc(1, sizeof(Edje_Real_Part_Vector)); 3144 rp->typedata.vector = calloc(1, sizeof(Edje_Real_Part_Vector));
3145 if (rp->typedata.vector)
3146 rp->typedata.vector->cur.svg_id = -1;
3145 rp->object = evas_object_vg_add(ed->base->evas); 3147 rp->object = evas_object_vg_add(ed->base->evas);
3146 } 3148 }
3147 else if (ep->type == EDJE_PART_TYPE_IMAGE || ep->type == EDJE_PART_TYPE_PROXY) 3149 else if (ep->type == EDJE_PART_TYPE_IMAGE || ep->type == EDJE_PART_TYPE_PROXY)
diff --git a/src/lib/edje/edje_load.c b/src/lib/edje/edje_load.c
index 0d43704d8e..10602e4d16 100644
--- a/src/lib/edje/edje_load.c
+++ b/src/lib/edje/edje_load.c
@@ -734,7 +734,10 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
734 case EDJE_PART_TYPE_VECTOR: 734 case EDJE_PART_TYPE_VECTOR:
735 rp->type = EDJE_PART_TYPE_VECTOR; 735 rp->type = EDJE_PART_TYPE_VECTOR;
736 rp->typedata.vector = calloc(1, sizeof(Edje_Real_Part_Vector)); 736 rp->typedata.vector = calloc(1, sizeof(Edje_Real_Part_Vector));
737 if (!rp->typedata.vector) memerr = EINA_TRUE; 737 if (!rp->typedata.vector)
738 memerr = EINA_TRUE;
739 else
740 rp->typedata.vector->cur.svg_id = -1;
738 break; 741 break;
739 742
740 case EDJE_PART_TYPE_GROUP: 743 case EDJE_PART_TYPE_GROUP: