summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2011-04-28 09:44:29 +0000
committerCarsten Haitzler <raster@rasterman.com>2011-04-28 09:44:29 +0000
commit39635aa465d3fbad4fdd075dcfd6e8ac4567a6b8 (patch)
tree86088b1e37288e9da917faf99472b0ecb73a1ef9
parent60a3053453cab9ddb72f57369457cd46322d66ef (diff)
ooh so many more mask tests... and oh so many more mask bugs.
SVN revision: 58994
-rw-r--r--data/Makefile.am6
-rw-r--r--data/e-logo-2.pngbin0 -> 21095 bytes
-rw-r--r--data/e-logo-mask.pngbin0 -> 191653 bytes
-rw-r--r--data/texture.pngbin0 -> 369920 bytes
-rw-r--r--src/bin/Makefile.am10
-rw-r--r--src/bin/image_mask_10.c119
-rw-r--r--src/bin/image_mask_11.c123
-rw-r--r--src/bin/image_mask_2.c110
-rw-r--r--src/bin/image_mask_3.c110
-rw-r--r--src/bin/image_mask_4.c113
-rw-r--r--src/bin/image_mask_5.c113
-rw-r--r--src/bin/image_mask_6.c113
-rw-r--r--src/bin/image_mask_7.c118
-rw-r--r--src/bin/image_mask_8.c113
-rw-r--r--src/bin/image_mask_9.c124
-rw-r--r--src/bin/main.h1
-rw-r--r--src/bin/tests.h10
-rw-r--r--src/bin/ui.c31
18 files changed, 1211 insertions, 3 deletions
diff --git a/data/Makefile.am b/data/Makefile.am
index c84b062..939fc95 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -52,7 +52,9 @@ blend.png \
52map.png \ 52map.png \
533d.png \ 533d.png \
54data.png \ 54data.png \
55widgets.png 55widgets.png \
56 56e-logo-2.png \
57e-logo-mask.png \
58texture.png
57 59
58EXTRA_DIST = $(files_DATA) 60EXTRA_DIST = $(files_DATA)
diff --git a/data/e-logo-2.png b/data/e-logo-2.png
new file mode 100644
index 0000000..0992bfb
--- /dev/null
+++ b/data/e-logo-2.png
Binary files differ
diff --git a/data/e-logo-mask.png b/data/e-logo-mask.png
new file mode 100644
index 0000000..b71600c
--- /dev/null
+++ b/data/e-logo-mask.png
Binary files differ
diff --git a/data/texture.png b/data/texture.png
new file mode 100644
index 0000000..630726a
--- /dev/null
+++ b/data/texture.png
Binary files differ
diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
index adcfefb..e7db3cf 100644
--- a/src/bin/Makefile.am
+++ b/src/bin/Makefile.am
@@ -114,6 +114,16 @@ proxy_image.c \
114proxy_text_fixed.c \ 114proxy_text_fixed.c \
115proxy_text_random.c \ 115proxy_text_random.c \
116image_mask.c \ 116image_mask.c \
117image_mask_2.c \
118image_mask_3.c \
119image_mask_4.c \
120image_mask_5.c \
121image_mask_6.c \
122image_mask_7.c \
123image_mask_8.c \
124image_mask_9.c \
125image_mask_10.c \
126image_mask_11.c \
117filter_object_colors.c \ 127filter_object_colors.c \
118filter_object_colors_solid.c \ 128filter_object_colors_solid.c \
119filter_object_sepia.c \ 129filter_object_sepia.c \
diff --git a/src/bin/image_mask_10.c b/src/bin/image_mask_10.c
new file mode 100644
index 0000000..ab89b9d
--- /dev/null
+++ b/src/bin/image_mask_10.c
@@ -0,0 +1,119 @@
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 */
15static int done = 0;
16/* private data */
17static Evas_Object *o_images[1];
18static Evas_Object *o_mask;
19
20/* setup */
21static void _setup(void)
22{
23 int i;
24 Evas_Object *o;
25
26 o = evas_object_image_add(evas);
27 o_mask = o;
28 evas_object_image_file_set(o, build_path("e-logo-mask.png"), NULL);
29 evas_object_image_fill_set(o, 0, 0, 720, 420);
30 evas_object_resize(o, 720, 420);
31 evas_object_move(o, (win_w - 720) / 2, (win_h - 420) / 2);
32 evas_object_show(o);
33
34 for (i = 0; i < 1; i++)
35 {
36 o = evas_object_image_add(evas);
37 o_images[i] = o;
38 evas_object_image_file_set(o, build_path("texture.png"), NULL);
39 evas_object_image_fill_set(o, 0, 0, win_w * 4, win_h * 4);
40 evas_object_resize(o, win_w * 4, win_h * 4);
41 evas_object_clip_set(o, o_mask);
42 evas_object_show(o);
43 }
44 done = 0;
45}
46
47/* cleanup */
48static void _cleanup(void)
49{
50 int i;
51 for (i = 0; i < 1; i++) evas_object_del(o_images[i]);
52 evas_object_del(o_mask);
53}
54
55/* loop - do things */
56static void _loop(double t, int f)
57{
58 int i;
59 Evas_Map *m;
60 Evas_Coord x, y, w, h;
61 for (i = 0; i < 1; i++)
62 {
63 w = win_w * 4;
64 h = win_h * 4;
65 x = (win_w / 2) - (w / 2);
66 y = (win_h / 2) - (h / 2);
67 m = evas_map_new(4);
68 evas_map_util_points_populate_from_geometry(m,
69 -win_w, -win_h,
70 win_w * 4, win_h * 4, 0);
71 evas_map_util_rotate(m, f, win_w / 2, win_h / 2);
72 evas_object_map_enable_set(o_images[i], 1);
73 evas_object_map_set(o_images[i], m);
74 evas_map_free(m);
75 }
76 FPS_STD(NAME);
77}
78
79/* prepend special key handlers if interactive (before STD) */
80static void _key(char *key)
81{
82 KEY_STD;
83}
84
85
86
87
88
89
90
91
92
93
94
95
96/* template stuff - ignore */
97# endif
98#endif
99
100#ifdef UI
101_ui_menu_item_add(ICON, NAME, FNAME);
102#endif
103
104#ifdef PROTO
105void FNAME(void);
106#endif
107
108#ifndef PROTO
109# ifndef UI
110void FNAME(void)
111{
112 ui_func_set(_key, _loop);
113 _setup();
114}
115# endif
116#endif
117#undef FNAME
118#undef NAME
119#undef ICON
diff --git a/src/bin/image_mask_11.c b/src/bin/image_mask_11.c
new file mode 100644
index 0000000..0b0a67a
--- /dev/null
+++ b/src/bin/image_mask_11.c
@@ -0,0 +1,123 @@
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 */
15static int done = 0;
16/* private data */
17static Evas_Object *o_images[OBNUM];
18static Evas_Object *o_mask;
19
20/* setup */
21static void _setup(void)
22{
23 int i;
24 Evas_Object *o;
25
26 o = evas_object_image_add(evas);
27 o_mask = o;
28 evas_object_image_file_set(o, build_path("e-logo-mask.png"), NULL);
29 evas_object_image_fill_set(o, 0, 0, 720, 420);
30 evas_object_resize(o, 720, 420);
31 evas_object_move(o, (win_w - 720) / 2, (win_h - 420) / 2);
32 evas_object_show(o);
33
34 for (i = 0; i < OBNUM; i++)
35 {
36 o = evas_object_image_add(evas);
37 o_images[i] = o;
38 evas_object_image_file_set(o, build_path("logo.png"), NULL);
39 evas_object_image_fill_set(o, 0, 0, 120, 160);
40 evas_object_resize(o, 120, 160);
41 evas_object_clip_set(o, o_mask);
42 evas_object_show(o);
43 }
44 done = 0;
45}
46
47/* cleanup */
48static void _cleanup(void)
49{
50 int i;
51 for (i = 0; i < OBNUM; i++) evas_object_del(o_images[i]);
52 evas_object_del(o_mask);
53}
54
55/* loop - do things */
56static void _loop(double t, int f)
57{
58 int i;
59 Evas_Map *m;
60 Evas_Coord x, y, w, h;
61 for (i = 0; i < OBNUM; i++)
62 {
63 w = 120;
64 h = 160;
65 x = (win_w / 2) - (w / 2);
66 x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
67 y = (win_h / 2) - (h / 2);
68 y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
69 evas_object_move(o_images[i], x, y);
70 }
71 m = evas_map_new(4);
72 evas_map_util_points_populate_from_geometry(m,
73 (win_w - 720) / 2,
74 (win_h - 420) / 2,
75 720, 420, 0);
76 evas_map_util_rotate(m, f, win_w / 2, win_h / 2);
77 evas_object_map_enable_set(o_mask, 1);
78 evas_object_map_set(o_mask, m);
79 evas_map_free(m);
80 FPS_STD(NAME);
81}
82
83/* prepend special key handlers if interactive (before STD) */
84static void _key(char *key)
85{
86 KEY_STD;
87}
88
89
90
91
92
93
94
95
96
97
98
99
100/* template stuff - ignore */
101# endif
102#endif
103
104#ifdef UI
105_ui_menu_item_add(ICON, NAME, FNAME);
106#endif
107
108#ifdef PROTO
109void FNAME(void);
110#endif
111
112#ifndef PROTO
113# ifndef UI
114void FNAME(void)
115{
116 ui_func_set(_key, _loop);
117 _setup();
118}
119# endif
120#endif
121#undef FNAME
122#undef NAME
123#undef ICON
diff --git a/src/bin/image_mask_2.c b/src/bin/image_mask_2.c
new file mode 100644
index 0000000..550bd3a
--- /dev/null
+++ b/src/bin/image_mask_2.c
@@ -0,0 +1,110 @@
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 */
15static int done = 0;
16/* private data */
17static Evas_Object *o_images[OBNUM];
18
19/* setup */
20static void _setup(void)
21{
22 int i;
23 Evas_Object *o;
24 for (i = 0; i < OBNUM; i+= 2)
25 {
26 o = evas_object_image_add(evas);
27 o_images[i] = o;
28 evas_object_image_file_set(o, build_path("e-logo.png"), NULL);
29 evas_object_image_fill_set(o, 0, 0, 120, 160);
30 evas_object_resize(o, 120, 160);
31 evas_object_show(o);
32
33 o = evas_object_image_add(evas);
34 o_images[i + 1] = o;
35 evas_object_image_file_set(o, build_path("e-logo-2.png"), NULL);
36 evas_object_image_fill_set(o, 0, 0, 120, 160);
37 evas_object_resize(o, 120, 160);
38 evas_object_show(o);
39 evas_object_clip_set(o_images[i], o);
40 }
41 done = 0;
42}
43
44/* cleanup */
45static void _cleanup(void)
46{
47 int i;
48 for (i = 0; i < OBNUM; i++) evas_object_del(o_images[i]);
49}
50
51/* loop - do things */
52static void _loop(double t, int f)
53{
54 int i;
55 Evas_Coord x, y, w, h;
56 for (i = 0; i < OBNUM; i+= 2)
57 {
58 w = 120;
59 h = 160;
60 x = (win_w / 2) - (w / 2);
61 x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
62 y = (win_h / 2) - (h / 2);
63 y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
64 evas_object_move(o_images[i], x, y);
65 evas_object_move(o_images[i + 1], x, y);
66 }
67 FPS_STD(NAME);
68}
69
70/* prepend special key handlers if interactive (before STD) */
71static void _key(char *key)
72{
73 KEY_STD;
74}
75
76
77
78
79
80
81
82
83
84
85
86
87/* template stuff - ignore */
88# endif
89#endif
90
91#ifdef UI
92_ui_menu_item_add(ICON, NAME, FNAME);
93#endif
94
95#ifdef PROTO
96void FNAME(void);
97#endif
98
99#ifndef PROTO
100# ifndef UI
101void FNAME(void)
102{
103 ui_func_set(_key, _loop);
104 _setup();
105}
106# endif
107#endif
108#undef FNAME
109#undef NAME
110#undef ICON
diff --git a/src/bin/image_mask_3.c b/src/bin/image_mask_3.c
new file mode 100644
index 0000000..39978b3
--- /dev/null
+++ b/src/bin/image_mask_3.c
@@ -0,0 +1,110 @@
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 */
15static int done = 0;
16/* private data */
17static Evas_Object *o_images[OBNUM];
18
19/* setup */
20static void _setup(void)
21{
22 int i;
23 Evas_Object *o;
24 for (i = 0; i < OBNUM; i+= 2)
25 {
26 o = evas_object_image_add(evas);
27 o_images[i] = o;
28 evas_object_image_file_set(o, build_path("e-logo-2.png"), NULL);
29 evas_object_image_fill_set(o, 0, 0, 120, 160);
30 evas_object_resize(o, 120, 160);
31 evas_object_show(o);
32
33 o = evas_object_image_add(evas);
34 o_images[i + 1] = o;
35 evas_object_image_file_set(o, build_path("logo.png"), NULL);
36 evas_object_image_fill_set(o, 0, 0, 120, 160);
37 evas_object_resize(o, 120, 160);
38 evas_object_show(o);
39 evas_object_clip_set(o_images[i], o);
40 }
41 done = 0;
42}
43
44/* cleanup */
45static void _cleanup(void)
46{
47 int i;
48 for (i = 0; i < OBNUM; i++) evas_object_del(o_images[i]);
49}
50
51/* loop - do things */
52static void _loop(double t, int f)
53{
54 int i;
55 Evas_Coord x, y, w, h;
56 for (i = 0; i < OBNUM; i+= 2)
57 {
58 w = 120;
59 h = 160;
60 x = (win_w / 2) - (w / 2);
61 x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
62 y = (win_h / 2) - (h / 2);
63 y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
64 evas_object_move(o_images[i], x, y);
65 evas_object_move(o_images[i + 1], x, y);
66 }
67 FPS_STD(NAME);
68}
69
70/* prepend special key handlers if interactive (before STD) */
71static void _key(char *key)
72{
73 KEY_STD;
74}
75
76
77
78
79
80
81
82
83
84
85
86
87/* template stuff - ignore */
88# endif
89#endif
90
91#ifdef UI
92_ui_menu_item_add(ICON, NAME, FNAME);
93#endif
94
95#ifdef PROTO
96void FNAME(void);
97#endif
98
99#ifndef PROTO
100# ifndef UI
101void FNAME(void)
102{
103 ui_func_set(_key, _loop);
104 _setup();
105}
106# endif
107#endif
108#undef FNAME
109#undef NAME
110#undef ICON
diff --git a/src/bin/image_mask_4.c b/src/bin/image_mask_4.c
new file mode 100644
index 0000000..1657437
--- /dev/null
+++ b/src/bin/image_mask_4.c
@@ -0,0 +1,113 @@
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 */
15static int done = 0;
16/* private data */
17static Evas_Object *o_images[OBNUM];
18static Evas_Object *o_mask;
19
20/* setup */
21static void _setup(void)
22{
23 int i;
24 Evas_Object *o;
25
26 o = evas_object_image_add(evas);
27 o_mask = o;
28 evas_object_image_file_set(o, build_path("e-logo-mask.png"), NULL);
29 evas_object_image_fill_set(o, 0, 0, 720, 420);
30 evas_object_resize(o, 720, 420);
31 evas_object_move(o, (win_w - 720) / 2, (win_h - 420) / 2);
32 evas_object_show(o);
33
34 for (i = 0; i < OBNUM; i++)
35 {
36 o = evas_object_image_add(evas);
37 o_images[i] = o;
38 evas_object_image_file_set(o, build_path("logo.png"), NULL);
39 evas_object_image_fill_set(o, 0, 0, 120, 160);
40 evas_object_resize(o, 120, 160);
41 evas_object_clip_set(o, o_mask);
42 evas_object_show(o);
43 }
44 done = 0;
45}
46
47/* cleanup */
48static void _cleanup(void)
49{
50 int i;
51 for (i = 0; i < OBNUM; i++) evas_object_del(o_images[i]);
52 evas_object_del(o_mask);
53}
54
55/* loop - do things */
56static void _loop(double t, int f)
57{
58 int i;
59 Evas_Coord x, y, w, h;
60 for (i = 0; i < OBNUM; i++)
61 {
62 w = 120;
63 h = 160;
64 x = (win_w / 2) - (w / 2);
65 x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
66 y = (win_h / 2) - (h / 2);
67 y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
68 evas_object_move(o_images[i], x, y);
69 }
70 FPS_STD(NAME);
71}
72
73/* prepend special key handlers if interactive (before STD) */
74static 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
99void FNAME(void);
100#endif
101
102#ifndef PROTO
103# ifndef UI
104void 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_5.c b/src/bin/image_mask_5.c
new file mode 100644
index 0000000..288a120
--- /dev/null
+++ b/src/bin/image_mask_5.c
@@ -0,0 +1,113 @@
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 */
15static int done = 0;
16/* private data */
17static Evas_Object *o_images[OBNUM];
18static Evas_Object *o_mask;
19
20/* setup */
21static void _setup(void)
22{
23 int i;
24 Evas_Object *o;
25
26 o = evas_object_image_add(evas);
27 o_mask = o;
28 evas_object_image_file_set(o, build_path("e-logo-2.png"), NULL);
29 evas_object_image_fill_set(o, 0, 0, 120, 160);
30 evas_object_resize(o, 120, 160);
31 evas_object_move(o, (win_w - 120) / 2, (win_h - 160) / 2);
32 evas_object_show(o);
33
34 for (i = 0; i < OBNUM; i++)
35 {
36 o = evas_object_image_add(evas);
37 o_images[i] = o;
38 evas_object_image_file_set(o, build_path("logo.png"), NULL);
39 evas_object_image_fill_set(o, 0, 0, 120, 160);
40 evas_object_resize(o, 120, 160);
41 evas_object_clip_set(o, o_mask);
42 evas_object_show(o);
43 }
44 done = 0;
45}
46
47/* cleanup */
48static void _cleanup(void)
49{
50 int i;
51 for (i = 0; i < OBNUM; i++) evas_object_del(o_images[i]);
52 evas_object_del(o_mask);
53}
54
55/* loop - do things */
56static void _loop(double t, int f)
57{
58 int i;
59 Evas_Coord x, y, w, h;
60 for (i = 0; i < OBNUM; i++)
61 {
62 w = 120;
63 h = 160;
64 x = (win_w / 2) - (w / 2);
65 x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
66 y = (win_h / 2) - (h / 2);
67 y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
68 evas_object_move(o_images[i], x, y);
69 }
70 FPS_STD(NAME);
71}
72
73/* prepend special key handlers if interactive (before STD) */
74static 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
99void FNAME(void);
100#endif
101
102#ifndef PROTO
103# ifndef UI
104void 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_6.c b/src/bin/image_mask_6.c
new file mode 100644
index 0000000..caac8f0
--- /dev/null
+++ b/src/bin/image_mask_6.c
@@ -0,0 +1,113 @@
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 */
15static int done = 0;
16/* private data */
17static Evas_Object *o_images[OBNUM];
18static Evas_Object *o_mask;
19
20/* setup */
21static void _setup(void)
22{
23 int i;
24 Evas_Object *o;
25
26 o = evas_object_image_add(evas);
27 o_mask = o;
28 evas_object_image_file_set(o, build_path("e-logo-mask.png"), NULL);
29 evas_object_image_fill_set(o, 0, 0, 720, 420);
30 evas_object_resize(o, 720, 420);
31 evas_object_move(o, (win_w - 720) / 2, (win_h - 420) / 2);
32 evas_object_show(o);
33
34 for (i = 0; i < OBNUM; i++)
35 {
36 o = evas_object_image_add(evas);
37 o_images[i] = o;
38 evas_object_image_file_set(o, build_path("logo.png"), NULL);
39 evas_object_image_fill_set(o, 0, 0, 120 / 2, 160 / 2);
40 evas_object_resize(o, 120 / 2, 160 / 2);
41 evas_object_clip_set(o, o_mask);
42 evas_object_show(o);
43 }
44 done = 0;
45}
46
47/* cleanup */
48static void _cleanup(void)
49{
50 int i;
51 for (i = 0; i < OBNUM; i++) evas_object_del(o_images[i]);
52 evas_object_del(o_mask);
53}
54
55/* loop - do things */
56static void _loop(double t, int f)
57{
58 int i;
59 Evas_Coord x, y, w, h;
60 for (i = 0; i < OBNUM; i++)
61 {
62 w = 120 / 2;
63 h = 160 / 2;
64 x = (win_w / 2) - (w / 2);
65 x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
66 y = (win_h / 2) - (h / 2);
67 y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
68 evas_object_move(o_images[i], x, y);
69 }
70 FPS_STD(NAME);
71}
72
73/* prepend special key handlers if interactive (before STD) */
74static 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
99void FNAME(void);
100#endif
101
102#ifndef PROTO
103# ifndef UI
104void 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_7.c b/src/bin/image_mask_7.c
new file mode 100644
index 0000000..a8ccb87
--- /dev/null
+++ b/src/bin/image_mask_7.c
@@ -0,0 +1,118 @@
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 */
15static int done = 0;
16/* private data */
17static Evas_Object *o_images[OBNUM];
18static Evas_Object *o_mask;
19
20/* setup */
21static void _setup(void)
22{
23 int i;
24 Evas_Object *o;
25
26 o = evas_object_image_add(evas);
27 o_mask = o;
28 evas_object_image_file_set(o, build_path("e-logo-2.png"), NULL);
29 evas_object_image_fill_set(o, 0, 0, 120, 160);
30 evas_object_resize(o, 120, 160);
31 evas_object_move(o, (win_w - 120) / 2, (win_h - 160) / 2);
32 evas_object_show(o);
33
34 for (i = 0; i < OBNUM; i++)
35 {
36 o = evas_object_image_add(evas);
37 o_images[i] = o;
38 evas_object_image_file_set(o, build_path("logo.png"), NULL);
39 evas_object_image_fill_set(o, 0, 0, 120, 160);
40 evas_object_resize(o, 120, 160);
41 evas_object_clip_set(o, o_mask);
42 evas_object_show(o);
43 }
44 done = 0;
45}
46
47/* cleanup */
48static void _cleanup(void)
49{
50 int i;
51 for (i = 0; i < OBNUM; i++) evas_object_del(o_images[i]);
52 evas_object_del(o_mask);
53}
54
55/* loop - do things */
56static void _loop(double t, int f)
57{
58 int i;
59 Evas_Coord x, y, w, h;
60 for (i = 0; i < OBNUM; i++)
61 {
62 w = 120;
63 h = 160;
64 x = (win_w / 2) - (w / 2);
65 x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
66 y = (win_h / 2) - (h / 2);
67 y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
68 evas_object_move(o_images[i], x, y);
69 }
70 w = 10 + (110 + (110 * sin((double)(f) / (14.3 * SLOW))));
71 h = 10 + (150 + (150 * sin((double)(f) / (21.7 * SLOW))));
72 evas_object_image_fill_set(o_mask, 0, 0, w, h);
73 evas_object_resize(o_mask, w, h);
74 evas_object_move(o_mask, (win_w - w) / 2, (win_h - h) / 2);
75 FPS_STD(NAME);
76}
77
78/* prepend special key handlers if interactive (before STD) */
79static void _key(char *key)
80{
81 KEY_STD;
82}
83
84
85
86
87
88
89
90
91
92
93
94
95/* template stuff - ignore */
96# endif
97#endif
98
99#ifdef UI
100_ui_menu_item_add(ICON, NAME, FNAME);
101#endif
102
103#ifdef PROTO
104void FNAME(void);
105#endif
106
107#ifndef PROTO
108# ifndef UI
109void FNAME(void)
110{
111 ui_func_set(_key, _loop);
112 _setup();
113}
114# endif
115#endif
116#undef FNAME
117#undef NAME
118#undef ICON
diff --git a/src/bin/image_mask_8.c b/src/bin/image_mask_8.c
new file mode 100644
index 0000000..961a44d
--- /dev/null
+++ b/src/bin/image_mask_8.c
@@ -0,0 +1,113 @@
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 */
15static int done = 0;
16/* private data */
17static Evas_Object *o_images[1];
18static Evas_Object *o_mask;
19
20/* setup */
21static void _setup(void)
22{
23 int i;
24 Evas_Object *o;
25
26 o = evas_object_image_add(evas);
27 o_mask = o;
28 evas_object_image_file_set(o, build_path("e-logo-mask.png"), NULL);
29 evas_object_image_fill_set(o, 0, 0, 720, 420);
30 evas_object_resize(o, 720, 420);
31 evas_object_move(o, (win_w - 720) / 2, (win_h - 420) / 2);
32 evas_object_show(o);
33
34 for (i = 0; i < 1; i++)
35 {
36 o = evas_object_image_add(evas);
37 o_images[i] = o;
38 evas_object_image_file_set(o, build_path("texture.png"), NULL);
39 evas_object_image_fill_set(o, 0, 0, 500, 444);
40 evas_object_resize(o, win_w * 4, win_h * 4);
41 evas_object_clip_set(o, o_mask);
42 evas_object_show(o);
43 }
44 done = 0;
45}
46
47/* cleanup */
48static void _cleanup(void)
49{
50 int i;
51 for (i = 0; i < 1; i++) evas_object_del(o_images[i]);
52 evas_object_del(o_mask);
53}
54
55/* loop - do things */
56static void _loop(double t, int f)
57{
58 int i;
59 Evas_Coord x, y, w, h;
60 for (i = 0; i < 1; i++)
61 {
62 w = win_w * 4;
63 h = win_h * 4;
64 x = (win_w / 2) - (w / 2);
65 x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (500 / 2);
66 y = (win_h / 2) - (h / 2);
67 y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (444 / 2);
68 evas_object_move(o_images[i], x, y);
69 }
70 FPS_STD(NAME);
71}
72
73/* prepend special key handlers if interactive (before STD) */
74static 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
99void FNAME(void);
100#endif
101
102#ifndef PROTO
103# ifndef UI
104void 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_9.c b/src/bin/image_mask_9.c
new file mode 100644
index 0000000..b602ef7
--- /dev/null
+++ b/src/bin/image_mask_9.c
@@ -0,0 +1,124 @@
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 */
15static int done = 0;
16/* private data */
17static Evas_Object *o_images[1];
18static Evas_Object *o_mask;
19
20/* setup */
21static void _setup(void)
22{
23 int i;
24 Evas_Object *o;
25
26 o = evas_object_image_add(evas);
27 o_mask = o;
28 evas_object_image_file_set(o, build_path("e-logo-mask.png"), NULL);
29 evas_object_image_fill_set(o, 0, 0, 720, 420);
30 evas_object_resize(o, 720, 420);
31 evas_object_move(o, (win_w - 720) / 2, (win_h - 420) / 2);
32 evas_object_show(o);
33
34 for (i = 0; i < 1; i++)
35 {
36 o = evas_object_image_add(evas);
37 o_images[i] = o;
38 evas_object_image_file_set(o, build_path("texture.png"), NULL);
39 evas_object_image_fill_set(o, 0, 0, 500, 444);
40 evas_object_resize(o, win_w * 4, win_h * 4);
41 evas_object_clip_set(o, o_mask);
42 evas_object_show(o);
43 }
44 done = 0;
45}
46
47/* cleanup */
48static void _cleanup(void)
49{
50 int i;
51 for (i = 0; i < 1; i++) evas_object_del(o_images[i]);
52 evas_object_del(o_mask);
53}
54
55/* loop - do things */
56static void _loop(double t, int f)
57{
58 int i;
59 Evas_Map *m;
60 Evas_Coord x, y, w, h;
61 for (i = 0; i < 1; i++)
62 {
63 w = win_w * 4;
64 h = win_h * 4;
65 x = (win_w / 2) - (w / 2);
66 x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (500 / 2);
67 y = (win_h / 2) - (h / 2);
68 y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (444 / 2);
69 evas_object_move(o_images[i], x, y);
70 }
71 m = evas_map_new(4);
72
73 evas_map_util_points_populate_from_geometry(m,
74 (win_w - 720) / 2,
75 (win_h - 420) / 2,
76 720, 420, 0);
77 evas_map_util_rotate(m, f, win_w / 2, win_h / 2);
78 evas_object_map_enable_set(o_mask, 1);
79 evas_object_map_set(o_mask, m);
80 evas_map_free(m);
81 FPS_STD(NAME);
82}
83
84/* prepend special key handlers if interactive (before STD) */
85static void _key(char *key)
86{
87 KEY_STD;
88}
89
90
91
92
93
94
95
96
97
98
99
100
101/* template stuff - ignore */
102# endif
103#endif
104
105#ifdef UI
106_ui_menu_item_add(ICON, NAME, FNAME);
107#endif
108
109#ifdef PROTO
110void FNAME(void);
111#endif
112
113#ifndef PROTO
114# ifndef UI
115void FNAME(void)
116{
117 ui_func_set(_key, _loop);
118 _setup();
119}
120# endif
121#endif
122#undef FNAME
123#undef NAME
124#undef ICON
diff --git a/src/bin/main.h b/src/bin/main.h
index 4a6f880..fc78a7e 100644
--- a/src/bin/main.h
+++ b/src/bin/main.h
@@ -8,6 +8,7 @@
8#include <stdio.h> 8#include <stdio.h>
9#include <stdlib.h> 9#include <stdlib.h>
10#include <string.h> 10#include <string.h>
11#include <unistd.h>
11#include <math.h> 12#include <math.h>
12#include <time.h> 13#include <time.h>
13 14
diff --git a/src/bin/tests.h b/src/bin/tests.h
index 970da94..e6c19b9 100644
--- a/src/bin/tests.h
+++ b/src/bin/tests.h
@@ -90,6 +90,16 @@
90#include "proxy_text_fixed.c" 90#include "proxy_text_fixed.c"
91#include "proxy_text_random.c" 91#include "proxy_text_random.c"
92#include "image_mask.c" 92#include "image_mask.c"
93#include "image_mask_2.c"
94#include "image_mask_3.c"
95#include "image_mask_4.c"
96#include "image_mask_5.c"
97#include "image_mask_6.c"
98#include "image_mask_7.c"
99#include "image_mask_8.c"
100#include "image_mask_9.c"
101#include "image_mask_10.c"
102#include "image_mask_11.c"
93#include "filter_object_colors.c" 103#include "filter_object_colors.c"
94#include "filter_object_colors_solid.c" 104#include "filter_object_colors_solid.c"
95#include "filter_object_invert.c" 105#include "filter_object_invert.c"
diff --git a/src/bin/ui.c b/src/bin/ui.c
index b5db731..6ab61d1 100644
--- a/src/bin/ui.c
+++ b/src/bin/ui.c
@@ -157,13 +157,42 @@ static double weights[] =
157 38.2952, // test 86 157 38.2952, // test 86
158 5.5560, 158 5.5560,
159 0.5000, 159 0.5000,
160 10.000, // Proxy tests 160 1.000,
161 10.000, 161 10.000,
162
163 5.000, // test 91
164 20.000, // MASK
165 20.000, // MASK 2
166 20.000, // MASK 3
167 20.000, // MASK 4
168
169 20.000, // test 96
170 20.000, // MASK 6
171 20.000, // MASK 7
172 20.000, // MASK 8
173 20.000, // MASK 9
174
175 20.000, // test 101 MASK 10
176 20.000, // MASK 11
177 1.000,
178 2.000,
179 1.000,
180
181 2.000, // test 106
182 1.000,
183 2.000,
184 1.000,
185 2.000,
186
187 10.000, // test 111
162 10.000, 188 10.000,
163 189
190 0.0, // Exit
191
164 0.0, // no final test - add a 0 at the end anyway to pad 192 0.0, // no final test - add a 0 at the end anyway to pad
165 0.0, 193 0.0,
166 0.0, 194 0.0,
195 0.0,
167 0.0 196 0.0
168}; 197};
169 198