summaryrefslogtreecommitdiff
path: root/src/bin/vg_basic_gradient.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric@ddlm.me>2019-03-22 16:13:05 -0700
committerCedric BAIL <cedric@ddlm.me>2019-03-22 16:13:05 -0700
commitcd761e50930dbc748a79ba5bbfbd111cb5f855be (patch)
tree6e8603b8ca29377e72d34fa45d1b514e8ca9b694 /src/bin/vg_basic_gradient.c
parentbea0e934add5d7b7872d25d9839a9c252d571c25 (diff)
Update use of VG API after EFL update.
Diffstat (limited to 'src/bin/vg_basic_gradient.c')
-rw-r--r--src/bin/vg_basic_gradient.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/bin/vg_basic_gradient.c b/src/bin/vg_basic_gradient.c
index f0188e4..bdea66f 100644
--- a/src/bin/vg_basic_gradient.c
+++ b/src/bin/vg_basic_gradient.c
@@ -32,7 +32,7 @@ static void _setup(void)
32 32
33 for (i = 0; i < OBNUM; i++) 33 for (i = 0; i < OBNUM; i++)
34 { 34 {
35 Efl_VG *root, *gradient, *rect; 35 Efl_VG *gradient, *rect;
36 Eo *vector; 36 Eo *vector;
37 double w = 70, h = 70, stroke_w = 3; 37 double w = 70, h = 70, stroke_w = 3;
38 38
@@ -42,20 +42,20 @@ static void _setup(void)
42 efl_gfx_entity_position_set(vector, EINA_POSITION2D(0, 0)); 42 efl_gfx_entity_position_set(vector, EINA_POSITION2D(0, 0));
43 efl_gfx_entity_visible_set(vector, EINA_TRUE); 43 efl_gfx_entity_visible_set(vector, EINA_TRUE);
44 44
45 root = evas_object_vg_root_node_get(vector); 45 gradient = efl_add(EFL_CANVAS_VG_GRADIENT_LINEAR_CLASS, vector);
46
47 gradient = efl_add(EFL_CANVAS_VG_GRADIENT_LINEAR_CLASS, NULL);
48 efl_gfx_gradient_stop_set(gradient, stops, 3); 46 efl_gfx_gradient_stop_set(gradient, stops, 3);
49 efl_gfx_gradient_spread_set(gradient, EFL_GFX_GRADIENT_SPREAD_REFLECT); 47 efl_gfx_gradient_spread_set(gradient, EFL_GFX_GRADIENT_SPREAD_REFLECT);
50 efl_gfx_gradient_linear_start_set(gradient, 10, 10); 48 efl_gfx_gradient_linear_start_set(gradient, 10, 10);
51 efl_gfx_gradient_linear_end_set(gradient, 50, 50); 49 efl_gfx_gradient_linear_end_set(gradient, 50, 50);
52 50
53 rect = efl_add(EFL_CANVAS_VG_SHAPE_CLASS, root); 51 rect = efl_add(EFL_CANVAS_VG_SHAPE_CLASS, vector);
54 efl_gfx_path_append_rect(rect, 0 + stroke_w, 0 + stroke_w, w, h, 10, 10); 52 efl_gfx_path_append_rect(rect, 0 + stroke_w, 0 + stroke_w, w, h, 10, 10);
55 efl_canvas_vg_shape_fill_set(rect, gradient); 53 efl_canvas_vg_shape_fill_set(rect, gradient);
56 efl_gfx_shape_stroke_width_set(rect, stroke_w); 54 efl_gfx_shape_stroke_width_set(rect, stroke_w);
57 efl_gfx_shape_stroke_color_set(rect, 128, 0, 128, 128); 55 efl_gfx_shape_stroke_color_set(rect, 128, 0, 128, 128);
58 efl_gfx_shape_stroke_join_set(rect, EFL_GFX_JOIN_ROUND); 56 efl_gfx_shape_stroke_join_set(rect, EFL_GFX_JOIN_ROUND);
57
58 efl_canvas_vg_object_root_node_set(vector, rect);
59 } 59 }
60 done = 0; 60 done = 0;
61} 61}