summaryrefslogtreecommitdiff
path: root/src/bin/vg_basic_gradient.c
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2016-03-03 14:03:49 +0000
committerTom Hacohen <tom@stosb.com>2016-03-03 14:03:49 +0000
commit088df1425e5ee03f3f26ce209b2040985e8231c5 (patch)
tree8392f28ad2068908d4edeef73c23642c97f91813 /src/bin/vg_basic_gradient.c
parent1c72554acc7b7390e65b487d2a428b6faea068b8 (diff)
Adjust according to recent Eo4 changes.
Diffstat (limited to 'src/bin/vg_basic_gradient.c')
-rw-r--r--src/bin/vg_basic_gradient.c31
1 files changed, 14 insertions, 17 deletions
diff --git a/src/bin/vg_basic_gradient.c b/src/bin/vg_basic_gradient.c
index faa9e26..1a0a0e9 100644
--- a/src/bin/vg_basic_gradient.c
+++ b/src/bin/vg_basic_gradient.c
@@ -38,27 +38,24 @@ static void _setup(void)
38 38
39 vector = eo_add(EVAS_VG_CLASS, evas); 39 vector = eo_add(EVAS_VG_CLASS, evas);
40 o_shapes[i] = vector; 40 o_shapes[i] = vector;
41 eo_do(vector, 41 efl_gfx_size_set(vector, w + stroke_w * 2, h + stroke_w * 2);
42 efl_gfx_size_set(w + stroke_w * 2, h + stroke_w * 2), 42 efl_gfx_position_set(vector, 0, 0);
43 efl_gfx_position_set(0, 0), 43 efl_gfx_visible_set(vector, EINA_TRUE);
44 efl_gfx_visible_set(EINA_TRUE));
45 44
46 eo_do(vector, root = evas_obj_vg_root_node_get()); 45 root = evas_obj_vg_root_node_get(vector);
47 46
48 gradient = eo_add(EFL_VG_GRADIENT_LINEAR_CLASS, NULL); 47 gradient = eo_add(EFL_VG_GRADIENT_LINEAR_CLASS, NULL);
49 eo_do(gradient, 48 efl_gfx_gradient_stop_set(gradient, stops, 3);
50 efl_gfx_gradient_stop_set(stops, 3), 49 efl_gfx_gradient_spread_set(gradient, EFL_GFX_GRADIENT_SPREAD_REFLECT);
51 efl_gfx_gradient_spread_set(EFL_GFX_GRADIENT_SPREAD_REFLECT), 50 efl_gfx_gradient_linear_start_set(gradient, 10, 10);
52 efl_gfx_gradient_linear_start_set(10, 10), 51 efl_gfx_gradient_linear_end_set(gradient, 50, 50);
53 efl_gfx_gradient_linear_end_set(50, 50));
54 52
55 rect = eo_add(EFL_VG_SHAPE_CLASS, root); 53 rect = eo_add(EFL_VG_SHAPE_CLASS, root);
56 eo_do(rect, 54 efl_gfx_shape_append_rect(rect, 0 + stroke_w, 0 + stroke_w, w, h, 10, 10);
57 efl_gfx_shape_append_rect(0 + stroke_w, 0 + stroke_w, w, h, 10, 10), 55 efl_vg_shape_fill_set(rect, gradient);
58 efl_vg_shape_fill_set(gradient), 56 efl_gfx_shape_stroke_width_set(rect, stroke_w);
59 efl_gfx_shape_stroke_width_set(stroke_w), 57 efl_gfx_shape_stroke_color_set(rect, 128, 0, 128, 128);
60 efl_gfx_shape_stroke_color_set(128, 0, 128, 128), 58 efl_gfx_shape_stroke_join_set(rect, EFL_GFX_JOIN_ROUND);
61 efl_gfx_shape_stroke_join_set(EFL_GFX_JOIN_ROUND));
62 } 59 }
63 done = 0; 60 done = 0;
64} 61}
@@ -82,7 +79,7 @@ static void _loop(double t, int f)
82 x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); 79 x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
83 y = (win_h / 2) - (h / 2); 80 y = (win_h / 2) - (h / 2);
84 y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (w / 2); 81 y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (w / 2);
85 eo_do(o_shapes[i], efl_gfx_position_set(x, y)); 82 efl_gfx_position_set(o_shapes[i], x, y);
86 } 83 }
87 FPS_STD(NAME); 84 FPS_STD(NAME);
88} 85}