diff options
author | jiin.moon <jiin.moon@samsung.com> | 2015-02-11 18:57:11 +0100 |
---|---|---|
committer | Cedric BAIL <cedric@osg.samsung.com> | 2015-02-11 18:57:14 +0100 |
commit | c4dfca2b016721cacd0777753b717092e15a5eba (patch) | |
tree | efab7eb94e9e79a92cdb0b9ab1c6bc128fba0f9a | |
parent | 09456566a339e8cdc6f0e8a2111e75f4c275b599 (diff) |
expedite: add test case for image maskingdevs/cedric/efl-1.13
Summary: Add some test case to the expedite
Reviewers: jpeg, cedric, Hermet
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1896
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/bin/Makefile.am | 30 | ||||
-rw-r--r-- | src/bin/image_mask.c | 113 | ||||
-rw-r--r-- | src/bin/image_mask_10.c | 122 | ||||
-rw-r--r-- | src/bin/image_mask_11.c | 126 | ||||
-rw-r--r-- | src/bin/image_mask_12.c | 122 | ||||
-rw-r--r-- | src/bin/image_mask_13.c | 122 | ||||
-rw-r--r-- | src/bin/image_mask_2.c | 113 | ||||
-rw-r--r-- | src/bin/image_mask_3.c | 113 | ||||
-rw-r--r-- | src/bin/image_mask_4.c | 115 | ||||
-rw-r--r-- | src/bin/image_mask_5.c | 115 | ||||
-rw-r--r-- | src/bin/image_mask_6.c | 115 | ||||
-rw-r--r-- | src/bin/image_mask_7.c | 121 | ||||
-rw-r--r-- | src/bin/image_mask_8.c | 115 | ||||
-rw-r--r-- | src/bin/image_mask_9.c | 127 | ||||
-rw-r--r-- | src/bin/tests.h | 2 |
16 files changed, 1556 insertions, 17 deletions
diff --git a/configure.ac b/configure.ac index 041dfc9..8e59499 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -50,7 +50,7 @@ esac | |||
50 | 50 | ||
51 | # EFL dependencies | 51 | # EFL dependencies |
52 | 52 | ||
53 | PKG_CHECK_MODULES([EFL], eina >= 1.7.99 efl >= 1.11.99 eo >= 1.7.99 evas >= 1.7.99 eet >= 1.7.99 ecore-evas >= 1.7.99 ecore >= 1.7.99) | 53 | PKG_CHECK_MODULES([EFL], eina >= 1.7.99 efl >= 1.13.0 eo >= 1.7.99 evas >= 1.7.99 eet >= 1.7.99 ecore-evas >= 1.7.99 ecore >= 1.7.99) |
54 | 54 | ||
55 | EFL_ENABLE_EO_API_SUPPORT | 55 | EFL_ENABLE_EO_API_SUPPORT |
56 | EFL_ENABLE_BETA_API_SUPPORT | 56 | EFL_ENABLE_BETA_API_SUPPORT |
diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am index 68680ab..1cc92a1 100644 --- a/src/bin/Makefile.am +++ b/src/bin/Makefile.am | |||
@@ -111,21 +111,21 @@ proxy_text_random.c \ | |||
111 | line_blend.c \ | 111 | line_blend.c \ |
112 | image_blend_many_smooth_same_scaled.c \ | 112 | image_blend_many_smooth_same_scaled.c \ |
113 | font_effect_blur_alpha.c \ | 113 | font_effect_blur_alpha.c \ |
114 | font_effect_blur_color.c | 114 | font_effect_blur_color.c \ |
115 | # \ | 115 | image_mask.c \ |
116 | # image_mask.c \ | 116 | image_mask_2.c \ |
117 | # image_mask_2.c \ | 117 | image_mask_3.c \ |
118 | # image_mask_3.c \ | 118 | image_mask_4.c \ |
119 | # image_mask_4.c \ | 119 | image_mask_5.c \ |
120 | # image_mask_5.c \ | 120 | image_mask_6.c \ |
121 | # image_mask_6.c \ | 121 | image_mask_7.c \ |
122 | # image_mask_7.c \ | 122 | image_mask_8.c \ |
123 | # image_mask_8.c \ | 123 | image_mask_9.c \ |
124 | # image_mask_9.c \ | 124 | image_mask_10.c \ |
125 | # image_mask_10.c \ | 125 | image_mask_11.c \ |
126 | # image_mask_11.c \ | 126 | image_mask_12.c \ |
127 | # image_mask_12.c \ | 127 | image_mask_13.c |
128 | # image_mask_13.c \ | 128 | # \ |
129 | # image_mask_14.c \ | 129 | # image_mask_14.c \ |
130 | # image_mask_15.c | 130 | # image_mask_15.c |
131 | 131 | ||
diff --git a/src/bin/image_mask.c b/src/bin/image_mask.c new file mode 100644 index 0000000..e3ccd38 --- /dev/null +++ b/src/bin/image_mask.c | |||
@@ -0,0 +1,113 @@ | |||
1 | #undef FNAME | ||
2 | #undef NAME | ||
3 | #undef ICON | ||
4 | |||
5 | /* metadata */ | ||
6 | #define FNAME image_mask | ||
7 | #define NAME "Image Mask" | ||
8 | #define ICON "blend.png" | ||
9 | |||
10 | #ifndef PROTO | ||
11 | # ifndef UI | ||
12 | # include "main.h" | ||
13 | |||
14 | /* standard var */ | ||
15 | static int done = 0; | ||
16 | /* private data */ | ||
17 | static Evas_Object *o_images[OBNUM]; | ||
18 | |||
19 | /* setup */ | ||
20 | static void _setup(void) | ||
21 | { | ||
22 | int i; | ||
23 | Evas_Object *o; | ||
24 | for (i = 0; i < OBNUM; i+= 2) | ||
25 | { | ||
26 | o = eo_add(EVAS_IMAGE_CLASS, evas); | ||
27 | o_images[i] = o; | ||
28 | eo_do(o, | ||
29 | efl_file_set(build_path("image.png"), NULL), | ||
30 | evas_obj_image_fill_set(0, 0, 120, 160), | ||
31 | evas_obj_size_set(120, 160), | ||
32 | evas_obj_visibility_set(EINA_TRUE)); | ||
33 | |||
34 | o = eo_add(EVAS_IMAGE_CLASS,evas); | ||
35 | o_images[i + 1] = o; | ||
36 | eo_do(o, | ||
37 | efl_file_set(build_path("e-logo.png"), NULL), | ||
38 | evas_obj_image_fill_set(0, 0, 120, 160), | ||
39 | evas_obj_size_set(120, 160), | ||
40 | evas_obj_visibility_set(EINA_TRUE)); | ||
41 | |||
42 | eo_do(o_images[i], evas_obj_clip_set(o)); | ||
43 | } | ||
44 | done = 0; | ||
45 | } | ||
46 | |||
47 | /* cleanup */ | ||
48 | static void _cleanup(void) | ||
49 | { | ||
50 | int i; | ||
51 | for (i = 0; i < OBNUM; i++) eo_del(o_images[i]); | ||
52 | } | ||
53 | |||
54 | /* loop - do things */ | ||
55 | static void _loop(double t, int f) | ||
56 | { | ||
57 | int i; | ||
58 | Evas_Coord x, y, w, h; | ||
59 | for (i = 0; i < OBNUM; i+= 2) | ||
60 | { | ||
61 | w = 120; | ||
62 | h = 160; | ||
63 | x = (win_w / 2) - (w / 2); | ||
64 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); | ||
65 | y = (win_h / 2) - (h / 2); | ||
66 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); | ||
67 | eo_do(o_images[i], evas_obj_position_set(x, y)); | ||
68 | eo_do(o_images[i + 1], evas_obj_position_set(x, y)); | ||
69 | } | ||
70 | FPS_STD(NAME); | ||
71 | } | ||
72 | |||
73 | /* prepend special key handlers if interactive (before STD) */ | ||
74 | static void _key(char *key) | ||
75 | { | ||
76 | KEY_STD; | ||
77 | } | ||
78 | |||
79 | |||
80 | |||
81 | |||
82 | |||
83 | |||
84 | |||
85 | |||
86 | |||
87 | |||
88 | |||
89 | |||
90 | /* template stuff - ignore */ | ||
91 | # endif | ||
92 | #endif | ||
93 | |||
94 | #ifdef UI | ||
95 | _ui_menu_item_add(ICON, NAME, FNAME); | ||
96 | #endif | ||
97 | |||
98 | #ifdef PROTO | ||
99 | void FNAME(void); | ||
100 | #endif | ||
101 | |||
102 | #ifndef PROTO | ||
103 | # ifndef UI | ||
104 | void FNAME(void) | ||
105 | { | ||
106 | ui_func_set(_key, _loop); | ||
107 | _setup(); | ||
108 | } | ||
109 | # endif | ||
110 | #endif | ||
111 | #undef FNAME | ||
112 | #undef NAME | ||
113 | #undef ICON | ||
diff --git a/src/bin/image_mask_10.c b/src/bin/image_mask_10.c new file mode 100644 index 0000000..d759d45 --- /dev/null +++ b/src/bin/image_mask_10.c | |||
@@ -0,0 +1,122 @@ | |||
1 | #undef FNAME | ||
2 | #undef NAME | ||
3 | #undef ICON | ||
4 | |||
5 | /* metadata */ | ||
6 | #define FNAME image_mask_10 | ||
7 | #define NAME "Image Mask 10" | ||
8 | #define ICON "blend.png" | ||
9 | |||
10 | #ifndef PROTO | ||
11 | # ifndef UI | ||
12 | # include "main.h" | ||
13 | |||
14 | /* standard var */ | ||
15 | static int done = 0; | ||
16 | /* private data */ | ||
17 | static Evas_Object *o_images[1]; | ||
18 | static Evas_Object *o_mask; | ||
19 | |||
20 | /* setup */ | ||
21 | static void _setup(void) | ||
22 | { | ||
23 | int i; | ||
24 | Evas_Object *o; | ||
25 | |||
26 | o = eo_add(EVAS_IMAGE_CLASS,evas); | ||
27 | o_mask = o; | ||
28 | eo_do(o, | ||
29 | efl_file_set(build_path("e-logo-mask.png"), NULL), | ||
30 | evas_obj_image_fill_set(0, 0, 720, 420), | ||
31 | evas_obj_size_set(720, 420), | ||
32 | evas_obj_position_set((win_w - 720) / 2, (win_h - 420) / 2), | ||
33 | evas_obj_visibility_set(EINA_TRUE)); | ||
34 | |||
35 | for (i = 0; i < 1; i++) | ||
36 | { | ||
37 | o = eo_add(EVAS_IMAGE_CLASS,evas); | ||
38 | o_images[i] = o; | ||
39 | eo_do(o, | ||
40 | efl_file_set(build_path("texture.png"), NULL), | ||
41 | evas_obj_image_fill_set(0, 0, win_w * 4, win_h * 4), | ||
42 | evas_obj_size_set(win_w * 4, win_h * 4), | ||
43 | evas_obj_clip_set(o_mask), | ||
44 | evas_obj_visibility_set(EINA_TRUE)); | ||
45 | } | ||
46 | done = 0; | ||
47 | } | ||
48 | |||
49 | /* cleanup */ | ||
50 | static void _cleanup(void) | ||
51 | { | ||
52 | int i; | ||
53 | for (i = 0; i < 1; i++) eo_del(o_images[i]); | ||
54 | eo_del(o_mask); | ||
55 | } | ||
56 | |||
57 | /* loop - do things */ | ||
58 | static void _loop(double t, int f) | ||
59 | { | ||
60 | int i; | ||
61 | static Evas_Map *m = NULL; | ||
62 | Evas_Coord x, y, w, h; | ||
63 | if (!m) m = evas_map_new(4); | ||
64 | for (i = 0; i < 1; i++) | ||
65 | { | ||
66 | w = win_w * 4; | ||
67 | h = win_h * 4; | ||
68 | x = (win_w / 2) - (w / 2); | ||
69 | y = (win_h / 2) - (h / 2); | ||
70 | evas_map_util_points_populate_from_geometry(m, | ||
71 | -win_w, -win_h, | ||
72 | win_w * 4, win_h * 4, 0); | ||
73 | evas_map_util_rotate(m, f, win_w / 2, win_h / 2); | ||
74 | |||
75 | eo_do(o_images[i], | ||
76 | evas_obj_map_enable_set(1), | ||
77 | evas_obj_map_set(m)); | ||
78 | } | ||
79 | FPS_STD(NAME); | ||
80 | } | ||
81 | |||
82 | /* prepend special key handlers if interactive (before STD) */ | ||
83 | static void _key(char *key) | ||
84 | { | ||
85 | KEY_STD; | ||
86 | } | ||
87 | |||
88 | |||
89 | |||
90 | |||
91 | |||
92 | |||
93 | |||
94 | |||
95 | |||
96 | |||
97 | |||
98 | |||
99 | /* template stuff - ignore */ | ||
100 | # endif | ||
101 | #endif | ||
102 | |||
103 | #ifdef UI | ||
104 | _ui_menu_item_add(ICON, NAME, FNAME); | ||
105 | #endif | ||
106 | |||
107 | #ifdef PROTO | ||
108 | void FNAME(void); | ||
109 | #endif | ||
110 | |||
111 | #ifndef PROTO | ||
112 | # ifndef UI | ||
113 | void FNAME(void) | ||
114 | { | ||
115 | ui_func_set(_key, _loop); | ||
116 | _setup(); | ||
117 | } | ||
118 | # endif | ||
119 | #endif | ||
120 | #undef FNAME | ||
121 | #undef NAME | ||
122 | #undef ICON | ||
diff --git a/src/bin/image_mask_11.c b/src/bin/image_mask_11.c new file mode 100644 index 0000000..df34620 --- /dev/null +++ b/src/bin/image_mask_11.c | |||
@@ -0,0 +1,126 @@ | |||
1 | #undef FNAME | ||
2 | #undef NAME | ||
3 | #undef ICON | ||
4 | |||
5 | /* metadata */ | ||
6 | #define FNAME image_mask_11 | ||
7 | #define NAME "Image Mask 11" | ||
8 | #define ICON "blend.png" | ||
9 | |||
10 | #ifndef PROTO | ||
11 | # ifndef UI | ||
12 | # include "main.h" | ||
13 | |||
14 | /* standard var */ | ||
15 | static int done = 0; | ||
16 | /* private data */ | ||
17 | static Evas_Object *o_images[OBNUM]; | ||
18 | static Evas_Object *o_mask; | ||
19 | |||
20 | /* setup */ | ||
21 | static void _setup(void) | ||
22 | { | ||
23 | int i; | ||
24 | Evas_Object *o; | ||
25 | |||
26 | o = eo_add(EVAS_IMAGE_CLASS,evas); | ||
27 | o_mask = o; | ||
28 | eo_do(o, | ||
29 | efl_file_set(build_path("e-logo-mask.png"), NULL), | ||
30 | evas_obj_image_fill_set(0, 0, 720, 420), | ||
31 | evas_obj_size_set(720, 420), | ||
32 | evas_obj_position_set((win_w - 720) / 2, (win_h - 420) / 2), | ||
33 | evas_obj_visibility_set(EINA_TRUE)); | ||
34 | |||
35 | for (i = 0; i < OBNUM; i++) | ||
36 | { | ||
37 | o = eo_add(EVAS_IMAGE_CLASS,evas); | ||
38 | o_images[i] = o; | ||
39 | eo_do(o, | ||
40 | efl_file_set(build_path("logo.png"), NULL), | ||
41 | evas_obj_image_fill_set(0, 0, 120, 160), | ||
42 | evas_obj_size_set(120, 160), | ||
43 | evas_obj_clip_set(o_mask), | ||
44 | evas_obj_visibility_set(EINA_TRUE)); | ||
45 | } | ||
46 | done = 0; | ||
47 | } | ||
48 | |||
49 | /* cleanup */ | ||
50 | static void _cleanup(void) | ||
51 | { | ||
52 | int i; | ||
53 | for (i = 0; i < OBNUM; i++) eo_del(o_images[i]); | ||
54 | eo_del(o_mask); | ||
55 | } | ||
56 | |||
57 | /* loop - do things */ | ||
58 | static void _loop(double t, int f) | ||
59 | { | ||
60 | int i; | ||
61 | static Evas_Map *m = NULL; | ||
62 | Evas_Coord x, y, w, h; | ||
63 | for (i = 0; i < OBNUM; i++) | ||
64 | { | ||
65 | w = 120; | ||
66 | h = 160; | ||
67 | x = (win_w / 2) - (w / 2); | ||
68 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); | ||
69 | y = (win_h / 2) - (h / 2); | ||
70 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); | ||
71 | eo_do(o_images[i], evas_obj_position_set(x, y)); | ||
72 | } | ||
73 | if (!m) m = evas_map_new(4); | ||
74 | evas_map_util_points_populate_from_geometry(m, | ||
75 | (win_w - 720) / 2, | ||
76 | (win_h - 420) / 2, | ||
77 | 720, 420, 0); | ||
78 | evas_map_util_rotate(m, f, win_w / 2, win_h / 2); | ||
79 | |||
80 | eo_do(o_mask, | ||
81 | evas_obj_map_enable_set(1), | ||
82 | evas_obj_map_set(m)); | ||
83 | FPS_STD(NAME); | ||
84 | } | ||
85 | |||
86 | /* prepend special key handlers if interactive (before STD) */ | ||
87 | static void _key(char *key) | ||
88 | { | ||
89 | KEY_STD; | ||
90 | } | ||
91 | |||
92 | |||
93 | |||
94 | |||
95 | |||
96 | |||
97 | |||
98 | |||
99 | |||
100 | |||
101 | |||
102 | |||
103 | /* template stuff - ignore */ | ||
104 | # endif | ||
105 | #endif | ||
106 | |||
107 | #ifdef UI | ||
108 | _ui_menu_item_add(ICON, NAME, FNAME); | ||
109 | #endif | ||
110 | |||
111 | #ifdef PROTO | ||
112 | void FNAME(void); | ||
113 | #endif | ||
114 | |||
115 | #ifndef PROTO | ||
116 | # ifndef UI | ||
117 | void FNAME(void) | ||
118 | { | ||
119 | ui_func_set(_key, _loop); | ||
120 | _setup(); | ||
121 | } | ||
122 | # endif | ||
123 | #endif | ||
124 | #undef FNAME | ||
125 | #undef NAME | ||
126 | #undef ICON | ||
diff --git a/src/bin/image_mask_12.c b/src/bin/image_mask_12.c new file mode 100644 index 0000000..b19b404 --- /dev/null +++ b/src/bin/image_mask_12.c | |||
@@ -0,0 +1,122 @@ | |||
1 | #undef FNAME | ||
2 | #undef NAME | ||
3 | #undef ICON | ||
4 | |||
5 | /* metadata */ | ||
6 | #define FNAME image_mask_12 | ||
7 | #define NAME "Image Mask 12" | ||
8 | #define ICON "blend.png" | ||
9 | |||
10 | #ifndef PROTO | ||
11 | # ifndef UI | ||
12 | # include "main.h" | ||
13 | |||
14 | /* standard var */ | ||
15 | static int done = 0; | ||
16 | /* private data */ | ||
17 | static Evas_Object *o_images[OBNUM]; | ||
18 | static Evas_Object *o_mask; | ||
19 | |||
20 | /* setup */ | ||
21 | static void _setup(void) | ||
22 | { | ||
23 | int i; | ||
24 | Evas_Object *o; | ||
25 | |||
26 | o = eo_add(EVAS_IMAGE_CLASS,evas); | ||
27 | o_mask = o; | ||
28 | eo_do(o, | ||
29 | efl_file_set(build_path("e-logo-mask.png"), NULL), | ||
30 | evas_obj_image_fill_set(0, 0, 720, 420), | ||
31 | evas_obj_size_set(720, 420), | ||
32 | evas_obj_position_set((win_w - 720) / 2, (win_h - 420) / 2), | ||
33 | evas_obj_visibility_set(EINA_TRUE)); | ||
34 | |||
35 | for (i = 0; i < OBNUM; i++) | ||
36 | { | ||
37 | o = eo_add(EVAS_IMAGE_CLASS,evas); | ||
38 | o_images[i] = o; | ||
39 | eo_do(o, | ||
40 | efl_file_set(build_path("logo.png"), NULL), | ||
41 | evas_obj_image_fill_set(0, 0, 120, 160), | ||
42 | evas_obj_size_set(120, 160), | ||
43 | efl_image_smooth_scale_set(1), | ||
44 | evas_obj_clip_set(o_mask), | ||
45 | evas_obj_visibility_set(EINA_TRUE)); | ||
46 | } | ||
47 | done = 0; | ||
48 | } | ||
49 | |||
50 | /* cleanup */ | ||
51 | static void _cleanup(void) | ||
52 | { | ||
53 | int i; | ||
54 | for (i = 0; i < OBNUM; i++) eo_del(o_images[i]); | ||
55 | eo_del(o_mask); | ||
56 | } | ||
57 | |||
58 | /* loop - do things */ | ||
59 | static void _loop(double t, int f) | ||
60 | { | ||
61 | int i; | ||
62 | Evas_Coord x, y, w, h, w0, h0; | ||
63 | for (i = 0; i < OBNUM; i++) | ||
64 | { | ||
65 | w0 = 80; | ||
66 | h0 = 80; | ||
67 | w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2); | ||
68 | h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2); | ||
69 | x = (win_w / 2) - (w / 2); | ||
70 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2); | ||
71 | y = (win_h / 2) - (h / 2); | ||
72 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2); | ||
73 | |||
74 | eo_do(o_images[i], | ||
75 | evas_obj_position_set(x, y), | ||
76 | evas_obj_size_set(w, h), | ||
77 | evas_obj_image_fill_set(0, 0, w, h)); | ||
78 | } | ||
79 | FPS_STD(NAME); | ||
80 | } | ||
81 | |||
82 | /* prepend special key handlers if interactive (before STD) */ | ||
83 | static void _key(char *key) | ||
84 | { | ||
85 | KEY_STD; | ||
86 | } | ||
87 | |||
88 | |||
89 | |||
90 | |||
91 | |||
92 | |||
93 | |||
94 | |||
95 | |||
96 | |||
97 | |||
98 | |||
99 | /* template stuff - ignore */ | ||
100 | # endif | ||
101 | #endif | ||
102 | |||
103 | #ifdef UI | ||
104 | _ui_menu_item_add(ICON, NAME, FNAME); | ||
105 | #endif | ||
106 | |||
107 | #ifdef PROTO | ||
108 | void FNAME(void); | ||
109 | #endif | ||
110 | |||
111 | #ifndef PROTO | ||
112 | # ifndef UI | ||
113 | void FNAME(void) | ||
114 | { | ||
115 | ui_func_set(_key, _loop); | ||
116 | _setup(); | ||
117 | } | ||
118 | # endif | ||
119 | #endif | ||
120 | #undef FNAME | ||
121 | #undef NAME | ||
122 | #undef ICON | ||
diff --git a/src/bin/image_mask_13.c b/src/bin/image_mask_13.c new file mode 100644 index 0000000..88240bb --- /dev/null +++ b/src/bin/image_mask_13.c | |||
@@ -0,0 +1,122 @@ | |||
1 | #undef FNAME | ||
2 | #undef NAME | ||
3 | #undef ICON | ||
4 | |||
5 | /* metadata */ | ||
6 | #define FNAME image_mask_13 | ||
7 | #define NAME "Image Mask 13" | ||
8 | #define ICON "blend.png" | ||
9 | |||
10 | #ifndef PROTO | ||
11 | # ifndef UI | ||
12 | # include "main.h" | ||
13 | |||
14 | /* standard var */ | ||
15 | static int done = 0; | ||
16 | /* private data */ | ||
17 | static Evas_Object *o_images[OBNUM]; | ||
18 | static Evas_Object *o_mask; | ||
19 | |||
20 | /* setup */ | ||
21 | static void _setup(void) | ||
22 | { | ||
23 | int i; | ||
24 | Evas_Object *o; | ||
25 | |||
26 | o = eo_add(EVAS_IMAGE_CLASS,evas); | ||
27 | o_mask = o; | ||
28 | eo_do(o, | ||
29 | efl_file_set(build_path("e-logo-mask.png"), NULL), | ||
30 | evas_obj_image_fill_set(0, 0, 720, 420), | ||
31 | evas_obj_size_set(720, 420), | ||
32 | evas_obj_position_set((win_w - 720) / 2, (win_h - 420) / 2), | ||
33 | evas_obj_visibility_set(EINA_TRUE)); | ||
34 | |||
35 | for (i = 0; i < OBNUM; i++) | ||
36 | { | ||
37 | o = eo_add(EVAS_IMAGE_CLASS,evas); | ||
38 | o_images[i] = o; | ||
39 | eo_do(o, | ||
40 | efl_file_set(build_path("logo.png"), NULL), | ||
41 | evas_obj_image_fill_set(0, 0, 120, 160), | ||
42 | evas_obj_size_set(120, 160), | ||
43 | efl_image_smooth_scale_set(0), | ||
44 | evas_obj_clip_set(o_mask), | ||
45 | evas_obj_visibility_set(EINA_TRUE)); | ||
46 | } | ||
47 | done = 0; | ||
48 | } | ||
49 | |||
50 | /* cleanup */ | ||
51 | static void _cleanup(void) | ||
52 | { | ||
53 | int i; | ||
54 | for (i = 0; i < OBNUM; i++) eo_del(o_images[i]); | ||
55 | eo_del(o_mask); | ||
56 | } | ||
57 | |||
58 | /* loop - do things */ | ||
59 | static void _loop(double t, int f) | ||
60 | { | ||
61 | int i; | ||
62 | Evas_Coord x, y, w, h, w0, h0; | ||
63 | for (i = 0; i < OBNUM; i++) | ||
64 | { | ||
65 | w0 = 80; | ||
66 | h0 = 80; | ||
67 | w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2); | ||
68 | h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2); | ||
69 | x = (win_w / 2) - (w / 2); | ||
70 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2); | ||
71 | y = (win_h / 2) - (h / 2); | ||
72 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2); | ||
73 | |||
74 | eo_do(o_images[i], | ||
75 | evas_obj_position_set(x, y), | ||
76 | evas_obj_size_set(w, h), | ||
77 | evas_obj_image_fill_set(0, 0, w, h)); | ||
78 | } | ||
79 | FPS_STD(NAME); | ||
80 | } | ||
81 | |||
82 | /* prepend special key handlers if interactive (before STD) */ | ||
83 | static void _key(char *key) | ||
84 | { | ||
85 | KEY_STD; | ||
86 | } | ||
87 | |||
88 | |||
89 | |||
90 | |||
91 | |||
92 | |||
93 | |||
94 | |||
95 | |||
96 | |||
97 | |||
98 | |||
99 | /* template stuff - ignore */ | ||
100 | # endif | ||
101 | #endif | ||
102 | |||
103 | #ifdef UI | ||
104 | _ui_menu_item_add(ICON, NAME, FNAME); | ||
105 | #endif | ||
106 | |||
107 | #ifdef PROTO | ||
108 | void FNAME(void); | ||
109 | #endif | ||
110 | |||
111 | #ifndef PROTO | ||
112 | # ifndef UI | ||
113 | void FNAME(void) | ||
114 | { | ||
115 | ui_func_set(_key, _loop); | ||
116 | _setup(); | ||
117 | } | ||
118 | # endif | ||
119 | #endif | ||
120 | #undef FNAME | ||
121 | #undef NAME | ||
122 | #undef ICON | ||
diff --git a/src/bin/image_mask_2.c b/src/bin/image_mask_2.c new file mode 100644 index 0000000..7c4b34f --- /dev/null +++ b/src/bin/image_mask_2.c | |||
@@ -0,0 +1,113 @@ | |||
1 | #undef FNAME | ||
2 | #undef NAME | ||
3 | #undef ICON | ||
4 | |||
5 | /* metadata */ | ||
6 | #define FNAME image_mask_2 | ||
7 | #define NAME "Image Mask 2" | ||
8 | #define ICON "blend.png" | ||
9 | |||
10 | #ifndef PROTO | ||
11 | # ifndef UI | ||
12 | # include "main.h" | ||
13 | |||
14 | /* standard var */ | ||
15 | static int done = 0; | ||
16 | /* private data */ | ||
17 | static Evas_Object *o_images[OBNUM]; | ||
18 | |||
19 | /* setup */ | ||
20 | static void _setup(void) | ||
21 | { | ||
22 | int i; | ||
23 | Evas_Object *o; | ||
24 | for (i = 0; i < OBNUM; i+= 2) | ||
25 | { | ||
26 | o = eo_add(EVAS_IMAGE_CLASS, evas); | ||
27 | o_images[i] = o; | ||
28 | eo_do(o, | ||
29 | efl_file_set(build_path("image.png"), NULL), | ||
30 | evas_obj_image_fill_set(0, 0, 120, 160), | ||
31 | evas_obj_size_set(120, 160), | ||
32 | evas_obj_visibility_set(EINA_TRUE)); | ||
33 | |||
34 | o = eo_add(EVAS_IMAGE_CLASS,evas); | ||
35 | o_images[i + 1] = o; | ||
36 | eo_do(o, | ||
37 | efl_file_set(build_path("e-logo-2.png"), NULL), | ||
38 | evas_obj_image_fill_set(0, 0, 120, 160), | ||
39 | evas_obj_size_set(120, 160), | ||
40 | evas_obj_visibility_set(EINA_TRUE)); | ||
41 | |||
42 | eo_do(o_images[i], evas_obj_clip_set(o)); | ||
43 | } | ||
44 | done = 0; | ||
45 | } | ||
46 | |||
47 | /* cleanup */ | ||
48 | static void _cleanup(void) | ||
49 | { | ||
50 | int i; | ||
51 | for (i = 0; i < OBNUM; i++) eo_del(o_images[i]); | ||
52 | } | ||
53 | |||
54 | /* loop - do things */ | ||
55 | static void _loop(double t, int f) | ||
56 | { | ||
57 | int i; | ||
58 | Evas_Coord x, y, w, h; | ||
59 | for (i = 0; i < OBNUM; i+= 2) | ||
60 | { | ||
61 | w = 120; | ||
62 | h = 160; | ||
63 | x = (win_w / 2) - (w / 2); | ||
64 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); | ||
65 | y = (win_h / 2) - (h / 2); | ||
66 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); | ||
67 | eo_do(o_images[i], evas_obj_position_set(x, y)); | ||
68 | eo_do(o_images[i + 1], evas_obj_position_set(x, y)); | ||
69 | } | ||
70 | FPS_STD(NAME); | ||
71 | } | ||
72 | |||
73 | /* prepend special key handlers if interactive (before STD) */ | ||
74 | static void _key(char *key) | ||
75 | { | ||
76 | KEY_STD; | ||
77 | } | ||
78 | |||
79 | |||
80 | |||
81 | |||
82 | |||
83 | |||
84 | |||
85 | |||
86 | |||
87 | |||
88 | |||
89 | |||
90 | /* template stuff - ignore */ | ||
91 | # endif | ||
92 | #endif | ||
93 | |||
94 | #ifdef UI | ||
95 | _ui_menu_item_add(ICON, NAME, FNAME); | ||
96 | #endif | ||
97 | |||
98 | #ifdef PROTO | ||
99 | void FNAME(void); | ||
100 | #endif | ||
101 | |||
102 | #ifndef PROTO | ||
103 | # ifndef UI | ||
104 | void FNAME(void) | ||
105 | { | ||
106 | ui_func_set(_key, _loop); | ||
107 | _setup(); | ||
108 | } | ||
109 | # endif | ||
110 | #endif | ||
111 | #undef FNAME | ||
112 | #undef NAME | ||
113 | #undef ICON | ||
diff --git a/src/bin/image_mask_3.c b/src/bin/image_mask_3.c new file mode 100644 index 0000000..7d3e72d --- /dev/null +++ b/src/bin/image_mask_3.c | |||
@@ -0,0 +1,113 @@ | |||
1 | #undef FNAME | ||
2 | #undef NAME | ||
3 | #undef ICON | ||
4 | |||
5 | /* metadata */ | ||
6 | #define FNAME image_mask_3 | ||
7 | #define NAME "Image Mask 3" | ||
8 | #define ICON "blend.png" | ||
9 | |||
10 | #ifndef PROTO | ||
11 | # ifndef UI | ||
12 | # include "main.h" | ||
13 | |||
14 | /* standard var */ | ||
15 | static int done = 0; | ||
16 | /* private data */ | ||
17 | static Evas_Object *o_images[OBNUM]; | ||
18 | |||
19 | /* setup */ | ||
20 | static void _setup(void) | ||
21 | { | ||
22 | int i; | ||
23 | Evas_Object *o; | ||
24 | for (i = 0; i < OBNUM; i+= 2) | ||
25 | { | ||
26 | o = eo_add(EVAS_IMAGE_CLASS, evas); | ||
27 | o_images[i] = o; | ||
28 | eo_do(o, | ||
29 | efl_file_set(build_path("e-logo-2.png"), NULL), | ||
30 | evas_obj_image_fill_set(0, 0, 120, 160), | ||
31 | evas_obj_size_set(120, 160), | ||
32 | evas_obj_visibility_set(EINA_TRUE)); | ||
33 | |||
34 | o = eo_add(EVAS_IMAGE_CLASS,evas); | ||
35 | o_images[i + 1] = o; | ||
36 | eo_do(o, | ||
37 | efl_file_set(build_path("logo.png"), NULL), | ||
38 | evas_obj_image_fill_set(0, 0, 120, 160), | ||
39 | evas_obj_size_set(120, 160), | ||
40 | evas_obj_visibility_set(EINA_TRUE)); | ||
41 | |||
42 | eo_do(o_images[i], evas_obj_clip_set(o)); | ||
43 | } | ||
44 | done = 0; | ||
45 | } | ||
46 | |||
47 | /* cleanup */ | ||
48 | static void _cleanup(void) | ||
49 | { | ||
50 | int i; | ||
51 | for (i = 0; i < OBNUM; i++) eo_del(o_images[i]); | ||
52 | } | ||
53 | |||
54 | /* loop - do things */ | ||
55 | static void _loop(double t, int f) | ||
56 | { | ||
57 | int i; | ||
58 | Evas_Coord x, y, w, h; | ||
59 | for (i = 0; i < OBNUM; i+= 2) | ||
60 | { | ||
61 | w = 120; | ||
62 | h = 160; | ||
63 | x = (win_w / 2) - (w / 2); | ||
64 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); | ||
65 | y = (win_h / 2) - (h / 2); | ||
66 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); | ||
67 | eo_do(o_images[i], evas_obj_position_set(x, y)); | ||
68 | eo_do(o_images[i + 1], evas_obj_position_set(x, y)); | ||
69 | } | ||
70 | FPS_STD(NAME); | ||
71 | } | ||
72 | |||
73 | /* prepend special key handlers if interactive (before STD) */ | ||
74 | static void _key(char *key) | ||
75 | { | ||
76 | KEY_STD; | ||
77 | } | ||
78 | |||
79 | |||
80 | |||
81 | |||
82 | |||
83 | |||
84 | |||
85 | |||
86 | |||
87 | |||
88 | |||
89 | |||
90 | /* template stuff - ignore */ | ||
91 | # endif | ||
92 | #endif | ||
93 | |||
94 | #ifdef UI | ||
95 | _ui_menu_item_add(ICON, NAME, FNAME); | ||
96 | #endif | ||
97 | |||
98 | #ifdef PROTO | ||
99 | void FNAME(void); | ||
100 | #endif | ||
101 | |||
102 | #ifndef PROTO | ||
103 | # ifndef UI | ||
104 | void FNAME(void) | ||
105 | { | ||
106 | ui_func_set(_key, _loop); | ||
107 | _setup(); | ||
108 | } | ||
109 | # endif | ||
110 | #endif | ||
111 | #undef FNAME | ||
112 | #undef NAME | ||
113 | #undef ICON | ||
diff --git a/src/bin/image_mask_4.c b/src/bin/image_mask_4.c new file mode 100644 index 0000000..e342170 --- /dev/null +++ b/src/bin/image_mask_4.c | |||
@@ -0,0 +1,115 @@ | |||
1 | #undef FNAME | ||
2 | #undef NAME | ||
3 | #undef ICON | ||
4 | |||
5 | /* metadata */ | ||
6 | #define FNAME image_mask_4 | ||
7 | #define NAME "Image Mask 4" | ||
8 | #define ICON "blend.png" | ||
9 | |||
10 | #ifndef PROTO | ||
11 | # ifndef UI | ||
12 | # include "main.h" | ||
13 | |||
14 | /* standard var */ | ||
15 | static int done = 0; | ||
16 | /* private data */ | ||
17 | static Evas_Object *o_images[OBNUM]; | ||
18 | static Evas_Object *o_mask; | ||
19 | |||
20 | /* setup */ | ||
21 | static void _setup(void) | ||
22 | { | ||
23 | int i; | ||
24 | Evas_Object *o; | ||
25 | |||
26 | o = eo_add(EVAS_IMAGE_CLASS,evas); | ||
27 | o_mask = o; | ||
28 | eo_do(o, | ||
29 | efl_file_set(build_path("e-logo-mask.png"), NULL), | ||
30 | evas_obj_image_fill_set(0, 0, 720, 420), | ||
31 | evas_obj_size_set(720, 420), | ||
32 | evas_obj_position_set((win_w - 720) / 2, (win_h - 420) / 2), | ||
33 | evas_obj_visibility_set(EINA_TRUE)); | ||
34 | |||
35 | for (i = 0; i < OBNUM; i++) | ||
36 | { | ||
37 | o = eo_add(EVAS_IMAGE_CLASS,evas); | ||
38 | o_images[i] = o; | ||
39 | eo_do(o, | ||
40 | efl_file_set(build_path("logo.png"), NULL), | ||
41 | evas_obj_image_fill_set(0, 0, 120, 160), | ||
42 | evas_obj_size_set(120, 160), | ||
43 | evas_obj_clip_set(o_mask), | ||
44 | evas_obj_visibility_set(EINA_TRUE)); | ||
45 | } | ||
46 | done = 0; | ||
47 | } | ||
48 | |||
49 | /* cleanup */ | ||
50 | static void _cleanup(void) | ||
51 | { | ||
52 | int i; | ||
53 | for (i = 0; i < OBNUM; i++) eo_del(o_images[i]); | ||
54 | eo_del(o_mask); | ||
55 | } | ||
56 | |||
57 | /* loop - do things */ | ||
58 | static void _loop(double t, int f) | ||
59 | { | ||
60 | int i; | ||
61 | Evas_Coord x, y, w, h; | ||
62 | for (i = 0; i < OBNUM; i++) | ||
63 | { | ||
64 | w = 120; | ||
65 | h = 160; | ||
66 | x = (win_w / 2) - (w / 2); | ||
67 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); | ||
68 | y = (win_h / 2) - (h / 2); | ||
69 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); | ||
70 | eo_do(o_images[i], evas_obj_position_set(x, y)); | ||
71 | } | ||
72 | FPS_STD(NAME); | ||
73 | } | ||
74 | |||
75 | /* prepend special key handlers if interactive (before STD) */ | ||
76 | static void _key(char *key) | ||
77 | { | ||
78 | KEY_STD; | ||
79 | } | ||
80 | |||
81 | |||
82 | |||
83 | |||
84 | |||
85 | |||
86 | |||
87 | |||
88 | |||
89 | |||
90 | |||
91 | |||
92 | /* template stuff - ignore */ | ||
93 | # endif | ||
94 | #endif | ||
95 | |||
96 | #ifdef UI | ||
97 | _ui_menu_item_add(ICON, NAME, FNAME); | ||
98 | #endif | ||
99 | |||
100 | #ifdef PROTO | ||
101 | void FNAME(void); | ||
102 | #endif | ||
103 | |||
104 | #ifndef PROTO | ||
105 | # ifndef UI | ||
106 | void FNAME(void) | ||
107 | { | ||
108 | ui_func_set(_key, _loop); | ||
109 | _setup(); | ||
110 | } | ||
111 | # endif | ||
112 | #endif | ||
113 | #undef FNAME | ||
114 | #undef NAME | ||
115 | #undef ICON | ||
diff --git a/src/bin/image_mask_5.c b/src/bin/image_mask_5.c new file mode 100644 index 0000000..4499252 --- /dev/null +++ b/src/bin/image_mask_5.c | |||
@@ -0,0 +1,115 @@ | |||
1 | #undef FNAME | ||
2 | #undef NAME | ||
3 | #undef ICON | ||
4 | |||
5 | /* metadata */ | ||
6 | #define FNAME image_mask_5 | ||
7 | #define NAME "Image Mask 5" | ||
8 | #define ICON "blend.png" | ||
9 | |||
10 | #ifndef PROTO | ||
11 | # ifndef UI | ||
12 | # include "main.h" | ||
13 | |||
14 | /* standard var */ | ||
15 | static int done = 0; | ||
16 | /* private data */ | ||
17 | static Evas_Object *o_images[OBNUM]; | ||
18 | static Evas_Object *o_mask; | ||
19 | |||
20 | /* setup */ | ||
21 | static void _setup(void) | ||
22 | { | ||
23 | int i; | ||
24 | Evas_Object *o; | ||
25 | |||
26 | o = eo_add(EVAS_IMAGE_CLASS,evas); | ||
27 | o_mask = o; | ||
28 | eo_do(o, | ||
29 | efl_file_set(build_path("e-logo-2.png"), NULL), | ||
30 | evas_obj_image_fill_set(0, 0, 120, 160), | ||
31 | evas_obj_size_set(120, 160), | ||
32 | evas_obj_position_set((win_w - 120) / 2, (win_h - 160) / 2), | ||
33 | evas_obj_visibility_set(EINA_TRUE)); | ||
34 | |||
35 | for (i = 0; i < OBNUM; i++) | ||
36 | { | ||
37 | o = eo_add(EVAS_IMAGE_CLASS,evas); | ||
38 | o_images[i] = o; | ||
39 | eo_do(o, | ||
40 | efl_file_set(build_path("logo.png"), NULL), | ||
41 | evas_obj_image_fill_set(0, 0, 120, 160), | ||
42 | evas_obj_size_set(120, 160), | ||
43 | evas_obj_clip_set(o_mask), | ||
44 | evas_obj_visibility_set(EINA_TRUE)); | ||
45 | } | ||
46 | done = 0; | ||
47 | } | ||
48 | |||
49 | /* cleanup */ | ||
50 | static void _cleanup(void) | ||
51 | { | ||
52 | int i; | ||
53 | for (i = 0; i < OBNUM; i++) eo_del(o_images[i]); | ||
54 | eo_del(o_mask); | ||
55 | } | ||
56 | |||
57 | /* loop - do things */ | ||
58 | static void _loop(double t, int f) | ||
59 | { | ||
60 | int i; | ||
61 | Evas_Coord x, y, w, h; | ||
62 | for (i = 0; i < OBNUM; i++) | ||
63 | { | ||
64 | w = 120; | ||
65 | h = 160; | ||
66 | x = (win_w / 2) - (w / 2); | ||
67 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); | ||
68 | y = (win_h / 2) - (h / 2); | ||
69 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); | ||
70 | eo_do(o_images[i], evas_obj_position_set(x, y)); | ||
71 | } | ||
72 | FPS_STD(NAME); | ||
73 | } | ||
74 | |||
75 | /* prepend special key handlers if interactive (before STD) */ | ||
76 | static void _key(char *key) | ||
77 | { | ||
78 | KEY_STD; | ||
79 | } | ||
80 | |||
81 | |||
82 | |||
83 | |||
84 | |||
85 | |||
86 | |||
87 | |||
88 | |||
89 | |||
90 | |||
91 | |||
92 | /* template stuff - ignore */ | ||
93 | # endif | ||
94 | #endif | ||
95 | |||
96 | #ifdef UI | ||
97 | _ui_menu_item_add(ICON, NAME, FNAME); | ||
98 | #endif | ||
99 | |||
100 | #ifdef PROTO | ||
101 | void FNAME(void); | ||
102 | #endif | ||
103 | |||
104 | #ifndef PROTO | ||
105 | # ifndef UI | ||
106 | void FNAME(void) | ||
107 | { | ||
108 | ui_func_set(_key, _loop); | ||
109 | _setup(); | ||
110 | } | ||
111 | # endif | ||
112 | #endif | ||
113 | #undef FNAME | ||
114 | #undef NAME | ||
115 | #undef ICON | ||
diff --git a/src/bin/image_mask_6.c b/src/bin/image_mask_6.c new file mode 100644 index 0000000..e2cf72f --- /dev/null +++ b/src/bin/image_mask_6.c | |||
@@ -0,0 +1,115 @@ | |||
1 | #undef FNAME | ||
2 | #undef NAME | ||
3 | #undef ICON | ||
4 | |||
5 | /* metadata */ | ||
6 | #define FNAME image_mask_6 | ||
7 | #define NAME "Image Mask 6" | ||
8 | #define ICON "blend.png" | ||
9 | |||
10 | #ifndef PROTO | ||
11 | # ifndef UI | ||
12 | # include "main.h" | ||
13 | |||
14 | /* standard var */ | ||
15 | static int done = 0; | ||
16 | /* private data */ | ||
17 | static Evas_Object *o_images[OBNUM]; | ||
18 | static Evas_Object *o_mask; | ||
19 | |||
20 | /* setup */ | ||
21 | static void _setup(void) | ||
22 | { | ||
23 | int i; | ||
24 | Evas_Object *o; | ||
25 | |||
26 | o = eo_add(EVAS_IMAGE_CLASS,evas); | ||
27 | o_mask = o; | ||
28 | eo_do(o, | ||
29 | efl_file_set(build_path("e-logo-mask.png"), NULL), | ||
30 | evas_obj_image_fill_set(0, 0, 720, 420), | ||
31 | evas_obj_size_set(720, 420), | ||
32 | evas_obj_position_set((win_w - 720) / 2, (win_h - 420) / 2), | ||
33 | evas_obj_visibility_set(EINA_TRUE)); | ||
34 | |||
35 | for (i = 0; i < OBNUM; i++) | ||
36 | { | ||
37 | o = eo_add(EVAS_IMAGE_CLASS,evas); | ||
38 | o_images[i] = o; | ||
39 | eo_do(o, | ||
40 | efl_file_set(build_path("logo.png"), NULL), | ||
41 | evas_obj_image_fill_set(0, 0, 120 / 2, 160 / 2), | ||
42 | evas_obj_size_set(120 / 2, 160 / 2), | ||
43 | evas_obj_clip_set(o_mask), | ||
44 | evas_obj_visibility_set(EINA_TRUE)); | ||
45 | } | ||
46 | done = 0; | ||
47 | } | ||
48 | |||
49 | /* cleanup */ | ||
50 | static void _cleanup(void) | ||
51 | { | ||
52 | int i; | ||
53 | for (i = 0; i < OBNUM; i++) eo_del(o_images[i]); | ||
54 | eo_del(o_mask); | ||
55 | } | ||
56 | |||
57 | /* loop - do things */ | ||
58 | static void _loop(double t, int f) | ||
59 | { | ||
60 | int i; | ||
61 | Evas_Coord x, y, w, h; | ||
62 | for (i = 0; i < OBNUM; i++) | ||
63 | { | ||
64 | w = 120 / 2; | ||
65 | h = 160 / 2; | ||
66 | x = (win_w / 2) - (w / 2); | ||
67 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); | ||
68 | y = (win_h / 2) - (h / 2); | ||
69 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); | ||
70 | eo_do(o_images[i], evas_obj_position_set(x, y)); | ||
71 | } | ||
72 | FPS_STD(NAME); | ||
73 | } | ||
74 | |||
75 | /* prepend special key handlers if interactive (before STD) */ | ||
76 | static void _key(char *key) | ||
77 | { | ||
78 | KEY_STD; | ||
79 | } | ||
80 | |||
81 | |||
82 | |||
83 | |||
84 | |||
85 | |||
86 | |||
87 | |||
88 | |||
89 | |||
90 | |||
91 | |||
92 | /* template stuff - ignore */ | ||
93 | # endif | ||
94 | #endif | ||
95 | |||
96 | #ifdef UI | ||
97 | _ui_menu_item_add(ICON, NAME, FNAME); | ||
98 | #endif | ||
99 | |||
100 | #ifdef PROTO | ||
101 | void FNAME(void); | ||
102 | #endif | ||
103 | |||
104 | #ifndef PROTO | ||
105 | # ifndef UI | ||
106 | void FNAME(void) | ||
107 | { | ||
108 | ui_func_set(_key, _loop); | ||
109 | _setup(); | ||
110 | } | ||
111 | # endif | ||
112 | #endif | ||
113 | #undef FNAME | ||
114 | #undef NAME | ||
115 | #undef ICON | ||
diff --git a/src/bin/image_mask_7.c b/src/bin/image_mask_7.c new file mode 100644 index 0000000..e75eeaa --- /dev/null +++ b/src/bin/image_mask_7.c | |||
@@ -0,0 +1,121 @@ | |||
1 | #undef FNAME | ||
2 | #undef NAME | ||
3 | #undef ICON | ||
4 | |||
5 | /* metadata */ | ||
6 | #define FNAME image_mask_7 | ||
7 | #define NAME "Image Mask 7" | ||
8 | #define ICON "blend.png" | ||
9 | |||
10 | #ifndef PROTO | ||
11 | # ifndef UI | ||
12 | # include "main.h" | ||
13 | |||
14 | /* standard var */ | ||
15 | static int done = 0; | ||
16 | /* private data */ | ||
17 | static Evas_Object *o_images[OBNUM]; | ||
18 | static Evas_Object *o_mask; | ||
19 | |||
20 | /* setup */ | ||
21 | static void _setup(void) | ||
22 | { | ||
23 | int i; | ||
24 | Evas_Object *o; | ||
25 | |||
26 | o = eo_add(EVAS_IMAGE_CLASS,evas); | ||
27 | o_mask = o; | ||
28 | eo_do(o, | ||
29 | efl_file_set(build_path("e-logo-2.png"), NULL), | ||
30 | evas_obj_image_fill_set(0, 0, 120, 160), | ||
31 | evas_obj_size_set(120, 160), | ||
32 | evas_obj_position_set((win_w - 120) / 2, (win_h - 160) / 2), | ||
33 | evas_obj_visibility_set(EINA_TRUE)); | ||
34 | |||
35 | for (i = 0; i < OBNUM; i++) | ||
36 | { | ||
37 | o = eo_add(EVAS_IMAGE_CLASS,evas); | ||
38 | o_images[i] = o; | ||
39 | eo_do(o, | ||
40 | efl_file_set(build_path("logo.png"), NULL), | ||
41 | evas_obj_image_fill_set(0, 0, 120, 160), | ||
42 | evas_obj_size_set(120, 160), | ||
43 | evas_obj_clip_set(o_mask), | ||
44 | evas_obj_visibility_set(EINA_TRUE)); | ||
45 | } | ||
46 | done = 0; | ||
47 | } | ||
48 | |||
49 | /* cleanup */ | ||
50 | static void _cleanup(void) | ||
51 | { | ||
52 | int i; | ||
53 | for (i = 0; i < OBNUM; i++) eo_del(o_images[i]); | ||
54 | eo_del(o_mask); | ||
55 | } | ||
56 | |||
57 | /* loop - do things */ | ||
58 | static void _loop(double t, int f) | ||
59 | { | ||
60 | int i; | ||
61 | Evas_Coord x, y, w, h; | ||
62 | for (i = 0; i < OBNUM; i++) | ||
63 | { | ||
64 | w = 120; | ||
65 | h = 160; | ||
66 | x = (win_w / 2) - (w / 2); | ||
67 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); | ||
68 | y = (win_h / 2) - (h / 2); | ||
69 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); | ||
70 | eo_do(o_images[i], evas_obj_position_set(x, y)); | ||
71 | } | ||
72 | w = 10 + (110 + (110 * sin((double)(f) / (14.3 * SLOW)))); | ||
73 | h = 10 + (150 + (150 * sin((double)(f) / (21.7 * SLOW)))); | ||
74 | eo_do(o_mask, | ||
75 | evas_obj_image_fill_set(0, 0, w, h), | ||
76 | evas_obj_size_set(w, h), | ||
77 | evas_obj_position_set((win_w - w) / 2, (win_h - h) / 2)); | ||
78 | FPS_STD(NAME); | ||
79 | } | ||
80 | |||
81 | /* prepend special key handlers if interactive (before STD) */ | ||
82 | static void _key(char *key) | ||
83 | { | ||
84 | KEY_STD; | ||
85 | } | ||
86 | |||
87 | |||
88 | |||
89 | |||
90 | |||
91 | |||
92 | |||
93 | |||
94 | |||
95 | |||
96 | |||
97 | |||
98 | /* template stuff - ignore */ | ||
99 | # endif | ||
100 | #endif | ||
101 | |||
102 | #ifdef UI | ||
103 | _ui_menu_item_add(ICON, NAME, FNAME); | ||
104 | #endif | ||
105 | |||
106 | #ifdef PROTO | ||
107 | void FNAME(void); | ||
108 | #endif | ||
109 | |||
110 | #ifndef PROTO | ||
111 | # ifndef UI | ||
112 | void FNAME(void) | ||
113 | { | ||
114 | ui_func_set(_key, _loop); | ||
115 | _setup(); | ||
116 | } | ||
117 | # endif | ||
118 | #endif | ||
119 | #undef FNAME | ||
120 | #undef NAME | ||
121 | #undef ICON | ||
diff --git a/src/bin/image_mask_8.c b/src/bin/image_mask_8.c new file mode 100644 index 0000000..d616496 --- /dev/null +++ b/src/bin/image_mask_8.c | |||
@@ -0,0 +1,115 @@ | |||
1 | #undef FNAME | ||
2 | #undef NAME | ||
3 | #undef ICON | ||
4 | |||
5 | /* metadata */ | ||
6 | #define FNAME image_mask_8 | ||
7 | #define NAME "Image Mask 8" | ||
8 | #define ICON "blend.png" | ||
9 | |||
10 | #ifndef PROTO | ||
11 | # ifndef UI | ||
12 | # include "main.h" | ||
13 | |||
14 | /* standard var */ | ||
15 | static int done = 0; | ||
16 | /* private data */ | ||
17 | static Evas_Object *o_images[1]; | ||
18 | static Evas_Object *o_mask; | ||
19 | |||
20 | /* setup */ | ||
21 | static void _setup(void) | ||
22 | { | ||
23 | int i; | ||
24 | Evas_Object *o; | ||
25 | |||
26 | o = eo_add(EVAS_IMAGE_CLASS,evas); | ||
27 | o_mask = o; | ||
28 | eo_do(o, | ||
29 | efl_file_set(build_path("e-logo-mask.png"), NULL), | ||
30 | evas_obj_image_fill_set(0, 0, 720, 420), | ||
31 | evas_obj_size_set(720, 420), | ||
32 | evas_obj_position_set((win_w - 720) / 2, (win_h - 420) / 2), | ||
33 | evas_obj_visibility_set(EINA_TRUE)); | ||
34 | |||
35 | for (i = 0; i < 1; i++) | ||
36 | { | ||
37 | o = eo_add(EVAS_IMAGE_CLASS,evas); | ||
38 | o_images[i] = o; | ||
39 | eo_do(o, | ||
40 | efl_file_set(build_path("texture.png"), NULL), | ||
41 | evas_obj_image_fill_set(0, 0, 500, 444), | ||
42 | evas_obj_size_set(win_w * 4, win_h * 4), | ||
43 | evas_obj_clip_set(o_mask), | ||
44 | evas_obj_visibility_set(EINA_TRUE)); | ||
45 | } | ||
46 | done = 0; | ||
47 | } | ||
48 | |||
49 | /* cleanup */ | ||
50 | static void _cleanup(void) | ||
51 | { | ||
52 | int i; | ||
53 | for (i = 0; i < 1; i++) eo_del(o_images[i]); | ||
54 | eo_del(o_mask); | ||
55 | } | ||
56 | |||
57 | /* loop - do things */ | ||
58 | static void _loop(double t, int f) | ||
59 | { | ||
60 | int i; | ||
61 | Evas_Coord x, y, w, h; | ||
62 | for (i = 0; i < 1; i++) | ||
63 | { | ||
64 | w = win_w * 4; | ||
65 | h = win_h * 4; | ||
66 | x = (win_w / 2) - (w / 2); | ||
67 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (500 / 2); | ||
68 | y = (win_h / 2) - (h / 2); | ||
69 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (444 / 2); | ||
70 | eo_do(o_images[i], evas_obj_position_set(x, y)); | ||
71 | } | ||
72 | FPS_STD(NAME); | ||
73 | } | ||
74 | |||
75 | /* prepend special key handlers if interactive (before STD) */ | ||
76 | static void _key(char *key) | ||
77 | { | ||
78 | KEY_STD; | ||
79 | } | ||
80 | |||
81 | |||
82 | |||
83 | |||
84 | |||
85 | |||
86 | |||
87 | |||
88 | |||
89 | |||
90 | |||
91 | |||
92 | /* template stuff - ignore */ | ||
93 | # endif | ||
94 | #endif | ||
95 | |||
96 | #ifdef UI | ||
97 | _ui_menu_item_add(ICON, NAME, FNAME); | ||
98 | #endif | ||
99 | |||
100 | #ifdef PROTO | ||
101 | void FNAME(void); | ||
102 | #endif | ||
103 | |||
104 | #ifndef PROTO | ||
105 | # ifndef UI | ||
106 | void FNAME(void) | ||
107 | { | ||
108 | ui_func_set(_key, _loop); | ||
109 | _setup(); | ||
110 | } | ||
111 | # endif | ||
112 | #endif | ||
113 | #undef FNAME | ||
114 | #undef NAME | ||
115 | #undef ICON | ||
diff --git a/src/bin/image_mask_9.c b/src/bin/image_mask_9.c new file mode 100644 index 0000000..e50be76 --- /dev/null +++ b/src/bin/image_mask_9.c | |||
@@ -0,0 +1,127 @@ | |||
1 | #undef FNAME | ||
2 | #undef NAME | ||
3 | #undef ICON | ||
4 | |||
5 | /* metadata */ | ||
6 | #define FNAME image_mask_9 | ||
7 | #define NAME "Image Mask 9" | ||
8 | #define ICON "blend.png" | ||
9 | |||
10 | #ifndef PROTO | ||
11 | # ifndef UI | ||
12 | # include "main.h" | ||
13 | |||
14 | /* standard var */ | ||
15 | static int done = 0; | ||
16 | /* private data */ | ||
17 | static Evas_Object *o_images[1]; | ||
18 | static Evas_Object *o_mask; | ||
19 | |||
20 | /* setup */ | ||
21 | static void _setup(void) | ||
22 | { | ||
23 | int i; | ||
24 | Evas_Object *o; | ||
25 | |||
26 | o = eo_add(EVAS_IMAGE_CLASS,evas); | ||
27 | o_mask = o; | ||
28 | eo_do(o, | ||
29 | efl_file_set(build_path("e-logo-mask.png"), NULL), | ||
30 | evas_obj_image_fill_set(0, 0, 720, 420), | ||
31 | evas_obj_size_set(720, 420), | ||
32 | evas_obj_position_set((win_w - 720) / 2, (win_h - 420) / 2), | ||
33 | evas_obj_visibility_set(EINA_TRUE)); | ||
34 | |||
35 | for (i = 0; i < 1; i++) | ||
36 | { | ||
37 | o = eo_add(EVAS_IMAGE_CLASS,evas); | ||
38 | o_images[i] = o; | ||
39 | eo_do(o, | ||
40 | efl_file_set(build_path("texture.png"), NULL), | ||
41 | evas_obj_image_fill_set(0, 0, 500, 444), | ||
42 | evas_obj_size_set(win_w * 4, win_h * 4), | ||
43 | evas_obj_clip_set(o_mask), | ||
44 | evas_obj_visibility_set(EINA_TRUE)); | ||
45 | } | ||
46 | done = 0; | ||
47 | } | ||
48 | |||
49 | /* cleanup */ | ||
50 | static void _cleanup(void) | ||
51 | { | ||
52 | int i; | ||
53 | for (i = 0; i < 1; i++) eo_del(o_images[i]); | ||
54 | eo_del(o_mask); | ||
55 | } | ||
56 | |||
57 | /* loop - do things */ | ||
58 | static void _loop(double t, int f) | ||
59 | { | ||
60 | int i; | ||
61 | static Evas_Map *m = NULL; | ||
62 | Evas_Coord x, y, w, h; | ||
63 | for (i = 0; i < 1; i++) | ||
64 | { | ||
65 | w = win_w * 4; | ||
66 | h = win_h * 4; | ||
67 | x = (win_w / 2) - (w / 2); | ||
68 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (500 / 2); | ||
69 | y = (win_h / 2) - (h / 2); | ||
70 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (444 / 2); | ||
71 | eo_do(o_images[i], evas_obj_position_set(x, y)); | ||
72 | } | ||
73 | if (!m) m = evas_map_new(4); | ||
74 | |||
75 | evas_map_util_points_populate_from_geometry(m, | ||
76 | (win_w - 720) / 2, | ||
77 | (win_h - 420) / 2, | ||
78 | 720, 420, 0); | ||
79 | evas_map_util_rotate(m, f, win_w / 2, win_h / 2); | ||
80 | |||
81 | eo_do(o_mask, | ||
82 | evas_obj_map_enable_set(1), | ||
83 | evas_obj_map_set(m)); | ||
84 | FPS_STD(NAME); | ||
85 | } | ||
86 | |||
87 | /* prepend special key handlers if interactive (before STD) */ | ||
88 | static void _key(char *key) | ||
89 | { | ||
90 | KEY_STD; | ||
91 | } | ||
92 | |||
93 | |||
94 | |||
95 | |||
96 | |||
97 | |||
98 | |||
99 | |||
100 | |||
101 | |||
102 | |||
103 | |||
104 | /* template stuff - ignore */ | ||
105 | # endif | ||
106 | #endif | ||
107 | |||
108 | #ifdef UI | ||
109 | _ui_menu_item_add(ICON, NAME, FNAME); | ||
110 | #endif | ||
111 | |||
112 | #ifdef PROTO | ||
113 | void FNAME(void); | ||
114 | #endif | ||
115 | |||
116 | #ifndef PROTO | ||
117 | # ifndef UI | ||
118 | void FNAME(void) | ||
119 | { | ||
120 | ui_func_set(_key, _loop); | ||
121 | _setup(); | ||
122 | } | ||
123 | # endif | ||
124 | #endif | ||
125 | #undef FNAME | ||
126 | #undef NAME | ||
127 | #undef ICON | ||
diff --git a/src/bin/tests.h b/src/bin/tests.h index 998b0e5..2189ee4 100644 --- a/src/bin/tests.h +++ b/src/bin/tests.h | |||
@@ -93,7 +93,6 @@ | |||
93 | #include "image_blend_many_smooth_same_scaled.c" | 93 | #include "image_blend_many_smooth_same_scaled.c" |
94 | #include "font_effect_blur_alpha.c" | 94 | #include "font_effect_blur_alpha.c" |
95 | #include "font_effect_blur_color.c" | 95 | #include "font_effect_blur_color.c" |
96 | #if 0 // test disabled - evas having code disabled | ||
97 | #include "image_mask.c" | 96 | #include "image_mask.c" |
98 | #include "image_mask_2.c" | 97 | #include "image_mask_2.c" |
99 | #include "image_mask_3.c" | 98 | #include "image_mask_3.c" |
@@ -107,6 +106,7 @@ | |||
107 | #include "image_mask_11.c" | 106 | #include "image_mask_11.c" |
108 | #include "image_mask_12.c" | 107 | #include "image_mask_12.c" |
109 | #include "image_mask_13.c" | 108 | #include "image_mask_13.c" |
109 | #if 0 // test disabled - evas having code disabled | ||
110 | #include "image_mask_14.c" | 110 | #include "image_mask_14.c" |
111 | #include "image_mask_15.c" | 111 | #include "image_mask_15.c" |
112 | #include "filter_object_colors.c" | 112 | #include "filter_object_colors.c" |