summaryrefslogtreecommitdiff
path: root/src/examples/evas/evas-vg-batman.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/examples/evas/evas-vg-batman.c')
-rw-r--r--src/examples/evas/evas-vg-batman.c42
1 files changed, 27 insertions, 15 deletions
diff --git a/src/examples/evas/evas-vg-batman.c b/src/examples/evas/evas-vg-batman.c
index 6800daf248..650709f250 100644
--- a/src/examples/evas/evas-vg-batman.c
+++ b/src/examples/evas/evas-vg-batman.c
@@ -18,6 +18,14 @@
#define WIDTH 800
#define HEIGHT 600
+#ifndef EFL_BETA_API_SUPPORT
+#define EFL_BETA_API_SUPPORT
+#endif
+
+#ifndef EFL_EO_API_SUPPORT
+#define EFL_EO_API_SUPPORT
+#endif
+
#include <Eo.h>
#include <Efl.h>
#include <Evas.h>
@@ -57,7 +65,6 @@ static const char *batmans_path[] = {
static void
_on_delete(Ecore_Evas *ee EINA_UNUSED)
{
- ecore_animator_del(animation);
ecore_main_loop_quit();
}
@@ -125,24 +132,30 @@ main(void)
for (i = 0; i < sizeof (batmans_path) / sizeof (batmans_path[0]); i++)
{
- batmans_vg[i] = evas_vg_shape_add(NULL);
- evas_vg_node_color_set(batmans_vg[i], 0, 0, 0, 255);
- evas_vg_shape_stroke_color_set(batmans_vg[i], 128, 10,10, 128);
- evas_vg_shape_stroke_width_set(batmans_vg[i], 4.0);
- evas_vg_shape_stroke_join_set(batmans_vg[i], EFL_GFX_JOIN_MITER);
+ batmans_vg[i] = evas_vg_shape_add(vg);
+ evas_vg_node_origin_set(batmans_vg[i], 100, 150);
+
if(i % 2)
- {
- evas_vg_shape_stroke_color_set(batmans_vg[i], 10, 10,128, 128);
- evas_vg_shape_stroke_width_set(batmans_vg[i], 2.0);
- evas_vg_node_color_set(batmans_vg[i], 120, 120, 120, 255);
- evas_vg_shape_stroke_join_set(batmans_vg[i], EFL_GFX_JOIN_ROUND);
- }
- evas_vg_shape_append_svg_path(batmans_vg[i], batmans_path[i]);
+ {
+ evas_vg_node_color_set(batmans_vg[i], 120, 120, 120, 255);
+ evas_vg_shape_stroke_color_set(batmans_vg[i], 10, 10,128, 128);
+ evas_vg_shape_stroke_width_set(batmans_vg[i], 2.0);
+ evas_vg_shape_stroke_join_set(batmans_vg[i], EFL_GFX_JOIN_ROUND);
+ }
+ else
+ {
+ evas_vg_node_color_set(batmans_vg[i], 0, 0, 0, 255);
+ evas_vg_shape_stroke_color_set(batmans_vg[i], 128, 10,10, 128);
+ evas_vg_shape_stroke_width_set(batmans_vg[i], 4.0);
+ evas_vg_shape_stroke_join_set(batmans_vg[i], EFL_GFX_JOIN_MITER);
+ }
+
+ evas_vg_shape_append_svg_path(batmans_vg[i], batmans_path[i]);
}
animation = ecore_animator_timeline_add(1, _animator, NULL);
- root = evas_vg_container_add(NULL);
+ root = evas_vg_container_add(vg);
evas_object_vg_root_node_set(vg, root);
@@ -151,7 +164,6 @@ main(void)
eina_matrix3_scale(&matrix, 1.1, 1.1);
evas_vg_node_transformation_set(root, &matrix);
-
circle = evas_vg_shape_add(root);
evas_vg_shape_append_circle(circle, WIDTH / 2, HEIGHT / 2, 200);
evas_vg_node_color_set(circle, 255, 255, 255, 255);