summaryrefslogtreecommitdiff
path: root/src/examples/evas/evas-map-utils-eo.c
diff options
context:
space:
mode:
authorXavi Artigas <xavierartigas@yahoo.es>2019-02-20 21:32:41 +0100
committerXavi Artigas <xavierartigas@yahoo.es>2019-02-21 19:20:09 +0100
commit220f17ee8dba8545b1c6cf5c3df5ba01b079711c (patch)
tree12a0376dbecd1fa09919b72b65bfe3488bf0bd3c /src/examples/evas/evas-map-utils-eo.c
parentcc9f236a29e847c818e5cf535cbf285bb447b9f8 (diff)
Rename Efl.Gfx.Map -> Efl.Gfx.Mapping
Summary: For clarity, since there are all kinds of maps, including a navigation map widget. Also, corrected some misspellings. Test Plan: make && make check && make examples all work Reviewers: cedric, zmike, bu5hm4n Reviewed By: cedric Subscribers: Jaehyun_Cho, #reviewers, #committers Tags: #efl Maniphest Tasks: T7564 Differential Revision: https://phab.enlightenment.org/D7974
Diffstat (limited to '')
-rw-r--r--src/examples/evas/evas-map-utils-eo.c72
1 files changed, 36 insertions, 36 deletions
diff --git a/src/examples/evas/evas-map-utils-eo.c b/src/examples/evas/evas-map-utils-eo.c
index e1767cd1c3..157b3af847 100644
--- a/src/examples/evas/evas-map-utils-eo.c
+++ b/src/examples/evas/evas-map-utils-eo.c
@@ -83,68 +83,68 @@ _anim_cb(void *data)
83 evas_output_size_get(ad->canvas, &win_w, &win_h); 83 evas_output_size_get(ad->canvas, &win_w, &win_h);
84 84
85 o = evas_object_name_find(ad->canvas, "obj1"); 85 o = evas_object_name_find(ad->canvas, "obj1");
86 efl_gfx_map_reset(o); 86 efl_gfx_mapping_reset(o);
87 efl_gfx_map_rotate(o, 3 * f, NULL, 0.5, 0.5); 87 efl_gfx_mapping_rotate(o, 3 * f, NULL, 0.5, 0.5);
88 efl_gfx_map_smooth_set(o, ad->smooth); 88 efl_gfx_mapping_smooth_set(o, ad->smooth);
89 efl_gfx_map_alpha_set(o, ad->alpha); 89 efl_gfx_mapping_alpha_set(o, ad->alpha);
90 efl_gfx_map_color_set(o, -1, r, g, b, a); 90 efl_gfx_mapping_color_set(o, -1, r, g, b, a);
91 91
92 92
93 o = evas_object_name_find(ad->canvas, "obj2"); 93 o = evas_object_name_find(ad->canvas, "obj2");
94 size = efl_gfx_entity_size_get(o); 94 size = efl_gfx_entity_size_get(o);
95 efl_gfx_map_reset(o); 95 efl_gfx_mapping_reset(o);
96 efl_gfx_map_smooth_set(o, ad->smooth); 96 efl_gfx_mapping_smooth_set(o, ad->smooth);
97 efl_gfx_map_alpha_set(o, ad->alpha); 97 efl_gfx_mapping_alpha_set(o, ad->alpha);
98 efl_gfx_map_color_set(o, -1, r, g, b, a); 98 efl_gfx_mapping_color_set(o, -1, r, g, b, a);
99 efl_gfx_map_translate(o, 0, 0, 100); 99 efl_gfx_mapping_translate(o, 0, 0, 100);
100 efl_gfx_map_rotate_3d(o, f * 6, f * 6, f * 6, NULL, 1./3., 10. / size.h, 0); 100 efl_gfx_mapping_rotate_3d(o, f * 6, f * 6, f * 6, NULL, 1./3., 10. / size.h, 0);
101 if (ad->apply_lighting) 101 if (ad->apply_lighting)
102 { 102 {
103 efl_gfx_map_lightning_3d(o, ad->canvas, 0.5, 0.5, -100., 103 efl_gfx_mapping_lighting_3d(o, ad->canvas, 0.5, 0.5, -100.,
104 255, 255, 255, 0, 0, 0); 104 255, 255, 255, 0, 0, 0);
105 } 105 }
106 106
107 107
108 o = evas_object_name_find(ad->canvas, "obj3"); 108 o = evas_object_name_find(ad->canvas, "obj3");
109 size = efl_gfx_entity_size_get(o); 109 size = efl_gfx_entity_size_get(o);
110 efl_gfx_map_reset(o); 110 efl_gfx_mapping_reset(o);
111 efl_gfx_map_smooth_set(o, ad->smooth); 111 efl_gfx_mapping_smooth_set(o, ad->smooth);
112 efl_gfx_map_alpha_set(o, ad->alpha); 112 efl_gfx_mapping_alpha_set(o, ad->alpha);
113 efl_gfx_map_color_set(o, -1, r, g, b, a); 113 efl_gfx_mapping_color_set(o, -1, r, g, b, a);
114 efl_gfx_map_translate(o, 0, size.h/2, -20); 114 efl_gfx_mapping_translate(o, 0, size.h/2, -20);
115 efl_gfx_map_rotate_3d(o, 20, f * 6, 0, NULL, 0.5, 0.5, size.w / 2); 115 efl_gfx_mapping_rotate_3d(o, 20, f * 6, 0, NULL, 0.5, 0.5, size.w / 2);
116 if (ad->apply_perspective) 116 if (ad->apply_perspective)
117 efl_gfx_map_perspective_3d(o, NULL, 0.5, 0.5, 0, 256); 117 efl_gfx_mapping_perspective_3d(o, NULL, 0.5, 0.5, 0, 256);
118 if (ad->apply_lighting) 118 if (ad->apply_lighting)
119 { 119 {
120 evas_pointer_canvas_xy_get(ad->canvas, &mx, &my); 120 evas_pointer_canvas_xy_get(ad->canvas, &mx, &my);
121 efl_gfx_map_lightning_3d(o, ad->canvas, 121 efl_gfx_mapping_lighting_3d(o, ad->canvas,
122 (double) mx / win_w, (double) my / win_h, 122 (double) mx / win_w, (double) my / win_h,
123 -256, 255, 255, 255, 0, 0, 0); 123 -256, 255, 255, 255, 0, 0, 0);
124 } 124 }
125 if (ad->backface_culling) 125 if (ad->backface_culling)
126 efl_gfx_entity_visible_set(o, efl_gfx_map_clockwise_get(o)); 126 efl_gfx_entity_visible_set(o, efl_gfx_mapping_clockwise_get(o));
127 else 127 else
128 efl_gfx_entity_visible_set(o, 1); 128 efl_gfx_entity_visible_set(o, 1);
129 129
130 130
131 o = evas_object_name_find(ad->canvas, "obj4"); 131 o = evas_object_name_find(ad->canvas, "obj4");
132 rect = efl_gfx_entity_geometry_get(o); 132 rect = efl_gfx_entity_geometry_get(o);
133 efl_gfx_map_reset(o); 133 efl_gfx_mapping_reset(o);
134 efl_gfx_map_smooth_set(o, ad->smooth); 134 efl_gfx_mapping_smooth_set(o, ad->smooth);
135 efl_gfx_map_alpha_set(o, ad->alpha); 135 efl_gfx_mapping_alpha_set(o, ad->alpha);
136 efl_gfx_map_coord_absolute_set(o, 0, rect.x, rect.y + rect.h, 0); 136 efl_gfx_mapping_coord_absolute_set(o, 0, rect.x, rect.y + rect.h, 0);
137 efl_gfx_map_coord_absolute_set(o, 1, rect.x + rect.w, rect.y + rect.h, 0); 137 efl_gfx_mapping_coord_absolute_set(o, 1, rect.x + rect.w, rect.y + rect.h, 0);
138 efl_gfx_map_coord_absolute_set(o, 2, win_w - 10, win_h - 30, 0); 138 efl_gfx_mapping_coord_absolute_set(o, 2, win_w - 10, win_h - 30, 0);
139 efl_gfx_map_coord_absolute_set(o, 3, (win_w / 2) + 10, win_h - 30, 0); 139 efl_gfx_mapping_coord_absolute_set(o, 3, (win_w / 2) + 10, win_h - 30, 0);
140 efl_gfx_map_uv_set(o, 0, 0, 1); 140 efl_gfx_mapping_uv_set(o, 0, 0, 1);
141 efl_gfx_map_uv_set(o, 1, 1, 1); 141 efl_gfx_mapping_uv_set(o, 1, 1, 1);
142 efl_gfx_map_uv_set(o, 2, 1, 2. / 3.); 142 efl_gfx_mapping_uv_set(o, 2, 1, 2. / 3.);
143 efl_gfx_map_uv_set(o, 3, 0, 2. / 3.); 143 efl_gfx_mapping_uv_set(o, 3, 0, 2. / 3.);
144 efl_gfx_map_color_set(o, 0, 200, 200, 200, 150); 144 efl_gfx_mapping_color_set(o, 0, 200, 200, 200, 150);
145 efl_gfx_map_color_set(o, 1, 200, 200, 200, 150); 145 efl_gfx_mapping_color_set(o, 1, 200, 200, 200, 150);
146 efl_gfx_map_color_set(o, 2, 0, 0, 0, 0); 146 efl_gfx_mapping_color_set(o, 2, 0, 0, 0, 0);
147 efl_gfx_map_color_set(o, 3, 0, 0, 0, 0); 147 efl_gfx_mapping_color_set(o, 3, 0, 0, 0, 0);
148 148
149 149
150 ad->frame = (ad->frame + 1) % 60; 150 ad->frame = (ad->frame + 1) % 60;