tizen/vector : Fixed the circle button drawing issue. 23/43123/1
authorSubhransu Mohanty <sub.mohanty@samsung.com>
Mon, 29 Jun 2015 01:16:13 +0000 (10:16 +0900)
committerSubhransu Mohanty <sub.mohanty@samsung.com>
Wed, 8 Jul 2015 01:19:24 +0000 (10:19 +0900)
Change-Id: Ia60f12829594b912e4494c6ccf55d29dcdcf9664

src/lib/tizen_vector.c

index f43af96f419ef9d96843c57da3be526ea8ef1bee..5ca86f0453fe93d51d64383f4946404799f04f71 100644 (file)
@@ -1207,8 +1207,10 @@ button_effect_resize_cb(void *data, Evas *e EINA_UNUSED,
    Evas_Coord x, y, w, h;
    evas_object_geometry_get(vd->vg[1], &x, &y, &w, &h);
    evas_vg_shape_shape_reset(vd->shape[1]);
-   evas_vg_shape_shape_append_rect(vd->shape[1], 0, 0, w, h, ELM_VG_SCALE_SIZE(vd->obj, 35),
-                                   100);
+   if (w == h)
+     evas_vg_shape_shape_append_circle(vd->shape[1], w/2, h/2, w/2);
+   else
+     evas_vg_shape_shape_append_rect(vd->shape[1], 0, 0, w, h, h/2, h/2);
 }
 
 static void
@@ -1224,8 +1226,10 @@ button_base_resize_cb(void *data, Evas *e EINA_UNUSED,
    Evas_Coord w, h;
    evas_object_geometry_get(vd->vg[0], NULL, NULL, &w, &h);
    evas_vg_shape_shape_reset(vd->shape[0]);
-   evas_vg_shape_shape_append_rect(vd->shape[0], 0, 0, w, h, ELM_VG_SCALE_SIZE(vd->obj, 35),
-                                   100);
+   if (w == h)
+     evas_vg_shape_shape_append_circle(vd->shape[0], w/2, h/2, w/2);
+   else
+     evas_vg_shape_shape_append_rect(vd->shape[0], 0, 0, w, h, h/2, h/2);
 }
 
 static void