summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2009-11-02 04:18:32 +0000
committerCarsten Haitzler <raster@rasterman.com>2009-11-02 04:18:32 +0000
commitf0718038bdbe648364bd9a7bf414a69fde8afce0 (patch)
treedc97f7c6a6e94e126b064421e570c076bb74844d
parentd23ff9c8495f870a420fd3cef5aadd2ba5c16f95 (diff)
tests for the map color values now
SVN revision: 43406
-rw-r--r--src/bin/Makefile.am8
-rw-r--r--src/bin/image_map_color_alpha_nearest_rotate.c127
-rw-r--r--src/bin/image_map_color_alpha_nearest_solid_rotate.c127
-rw-r--r--src/bin/image_map_color_alpha_rotate.c125
-rw-r--r--src/bin/image_map_color_alpha_solid_rotate.c125
-rw-r--r--src/bin/image_map_color_nearest_rotate.c127
-rw-r--r--src/bin/image_map_color_nearest_solid_rotate.c127
-rw-r--r--src/bin/image_map_color_rotate.c125
-rw-r--r--src/bin/image_map_color_solid_rotate.c125
-rw-r--r--src/bin/tests.h8
10 files changed, 1024 insertions, 0 deletions
diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
index b8c6824..569b2fa 100644
--- a/src/bin/Makefile.am
+++ b/src/bin/Makefile.am
@@ -49,6 +49,14 @@ image_map_rotate.c \
49image_map_solid_rotate.c \ 49image_map_solid_rotate.c \
50image_map_nearest_rotate.c \ 50image_map_nearest_rotate.c \
51image_map_nearest_solid_rotate.c \ 51image_map_nearest_solid_rotate.c \
52image_map_color_rotate.c \
53image_map_color_solid_rotate.c \
54image_map_color_nearest_rotate.c \
55image_map_color_nearest_solid_rotate.c \
56image_map_color_alpha_rotate.c \
57image_map_color_alpha_solid_rotate.c \
58image_map_color_alpha_nearest_rotate.c \
59image_map_color_alpha_nearest_solid_rotate.c \
52image_quality_scale.c \ 60image_quality_scale.c \
53image_data_argb.c \ 61image_data_argb.c \
54image_data_argb_alpha.c \ 62image_data_argb_alpha.c \
diff --git a/src/bin/image_map_color_alpha_nearest_rotate.c b/src/bin/image_map_color_alpha_nearest_rotate.c
new file mode 100644
index 0000000..ef77d84
--- /dev/null
+++ b/src/bin/image_map_color_alpha_nearest_rotate.c
@@ -0,0 +1,127 @@
1#undef FNAME
2#undef NAME
3#undef ICON
4
5/* metadata */
6#define FNAME image_map_color_alpha_nearest_rotate_start
7#define NAME "Image Map Color Alpha Nearest Rotate"
8#define ICON "mushroom.png"
9
10#ifndef PROTO
11# ifndef UI
12# include "main.h"
13
14/* standard var */
15static int done = 0;
16
17/* private data */
18static Evas_Object *o_images[OBNUM];
19
20/* setup */
21static void _setup(void)
22{
23 int i;
24 Evas_Object *o;
25 for (i = 0; i < (OBNUM / 2); i++)
26 {
27 o = evas_object_image_add(evas);
28 o_images[i] = o;
29 evas_object_image_file_set(o, build_path("logo.png"), NULL);
30 evas_object_image_fill_set(o, 0, 0, 120, 160);
31 evas_object_resize(o, 120, 160);
32 evas_object_image_smooth_scale_set(o, 0);
33 evas_object_show(o);
34 }
35 done = 0;
36}
37
38/* cleanup */
39static void _cleanup(void)
40{
41 int i;
42 for (i = 0; i < (OBNUM / 2); i++) evas_object_del(o_images[i]);
43}
44
45/* loop - do things */
46static void _loop(double t, int f)
47{
48 int i;
49 Evas_Map *m;
50 Evas_Coord x, y, w, h;
51 m = evas_map_new(4);
52 evas_map_smooth_set(m, 0);
53 for (i = 0; i < (OBNUM / 2); i++)
54 {
55 w = 120;
56 h = 160;
57 x = (win_w / 2) - (w / 2);
58 x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
59 y = (win_h / 2) - (h / 2);
60 y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
61
62 evas_map_point_coord_set (m, 0, x, y, 0);
63 evas_map_point_image_uv_set(m, 0, 0, 0);
64 evas_map_point_color_set (m, 0, 255, 255, 255, 255);
65
66 evas_map_point_coord_set (m, 1, x + w, y, 0);
67 evas_map_point_image_uv_set(m, 1, w, 0);
68 evas_map_point_color_set (m, 1, 255, 0, 0, 255);
69
70 evas_map_point_coord_set (m, 2, x + w, y + h, 0);
71 evas_map_point_image_uv_set(m, 2, w, h);
72 evas_map_point_color_set (m, 2, 0, 0, 255, 255);
73
74 evas_map_point_coord_set (m, 3, x, y + h, 0);
75 evas_map_point_image_uv_set(m, 3, 0, h);
76 evas_map_point_color_set (m, 3, 0, 0, 0, 0);
77
78 evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
79
80 evas_object_map_enable_set(o_images[i], 1);
81 evas_object_map_set(o_images[i], m);
82 }
83 evas_map_free(m);
84 FPS_STD(NAME);
85}
86
87/* prepend special key handlers if interactive (before STD) */
88static 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
113void FNAME(void);
114#endif
115
116#ifndef PROTO
117# ifndef UI
118void 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/image_map_color_alpha_nearest_solid_rotate.c b/src/bin/image_map_color_alpha_nearest_solid_rotate.c
new file mode 100644
index 0000000..bd81b22
--- /dev/null
+++ b/src/bin/image_map_color_alpha_nearest_solid_rotate.c
@@ -0,0 +1,127 @@
1#undef FNAME
2#undef NAME
3#undef ICON
4
5/* metadata */
6#define FNAME image_map_color_alpha_nearest_solid_rotate_start
7#define NAME "Image Map Color Alpha Nearest Solid Rotate"
8#define ICON "mushroom.png"
9
10#ifndef PROTO
11# ifndef UI
12# include "main.h"
13
14/* standard var */
15static int done = 0;
16
17/* private data */
18static Evas_Object *o_images[OBNUM];
19
20/* setup */
21static void _setup(void)
22{
23 int i;
24 Evas_Object *o;
25 for (i = 0; i < (OBNUM / 2); i++)
26 {
27 o = evas_object_image_add(evas);
28 o_images[i] = o;
29 evas_object_image_file_set(o, build_path("image.png"), NULL);
30 evas_object_image_fill_set(o, 0, 0, 120, 160);
31 evas_object_resize(o, 120, 160);
32 evas_object_image_smooth_scale_set(o, 0);
33 evas_object_show(o);
34 }
35 done = 0;
36}
37
38/* cleanup */
39static void _cleanup(void)
40{
41 int i;
42 for (i = 0; i < (OBNUM / 2); i++) evas_object_del(o_images[i]);
43}
44
45/* loop - do things */
46static void _loop(double t, int f)
47{
48 int i;
49 Evas_Map *m;
50 Evas_Coord x, y, w, h;
51 m = evas_map_new(4);
52 evas_map_smooth_set(m, 0);
53 for (i = 0; i < (OBNUM / 2); i++)
54 {
55 w = 120;
56 h = 160;
57 x = (win_w / 2) - (w / 2);
58 x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
59 y = (win_h / 2) - (h / 2);
60 y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
61
62 evas_map_point_coord_set (m, 0, x, y, 0);
63 evas_map_point_image_uv_set(m, 0, 0, 0);
64 evas_map_point_color_set (m, 0, 255, 255, 255, 255);
65
66 evas_map_point_coord_set (m, 1, x + w, y, 0);
67 evas_map_point_image_uv_set(m, 1, w, 0);
68 evas_map_point_color_set (m, 1, 255, 0, 0, 255);
69
70 evas_map_point_coord_set (m, 2, x + w, y + h, 0);
71 evas_map_point_image_uv_set(m, 2, w, h);
72 evas_map_point_color_set (m, 2, 0, 0, 255, 255);
73
74 evas_map_point_coord_set (m, 3, x, y + h, 0);
75 evas_map_point_image_uv_set(m, 3, 0, h);
76 evas_map_point_color_set (m, 3, 0, 0, 0, 0);
77
78 evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
79
80 evas_object_map_enable_set(o_images[i], 1);
81 evas_object_map_set(o_images[i], m);
82 }
83 evas_map_free(m);
84 FPS_STD(NAME);
85}
86
87/* prepend special key handlers if interactive (before STD) */
88static 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
113void FNAME(void);
114#endif
115
116#ifndef PROTO
117# ifndef UI
118void 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/image_map_color_alpha_rotate.c b/src/bin/image_map_color_alpha_rotate.c
new file mode 100644
index 0000000..7c27431
--- /dev/null
+++ b/src/bin/image_map_color_alpha_rotate.c
@@ -0,0 +1,125 @@
1#undef FNAME
2#undef NAME
3#undef ICON
4
5/* metadata */
6#define FNAME image_map_color_alpha_rotate_start
7#define NAME "Image Map Color Alpha Rotate"
8#define ICON "mushroom.png"
9
10#ifndef PROTO
11# ifndef UI
12# include "main.h"
13
14/* standard var */
15static int done = 0;
16
17/* private data */
18static Evas_Object *o_images[OBNUM];
19
20/* setup */
21static void _setup(void)
22{
23 int i;
24 Evas_Object *o;
25 for (i = 0; i < (OBNUM / 2); i++)
26 {
27 o = evas_object_image_add(evas);
28 o_images[i] = o;
29 evas_object_image_file_set(o, build_path("logo.png"), NULL);
30 evas_object_image_fill_set(o, 0, 0, 120, 160);
31 evas_object_resize(o, 120, 160);
32 evas_object_show(o);
33 }
34 done = 0;
35}
36
37/* cleanup */
38static void _cleanup(void)
39{
40 int i;
41 for (i = 0; i < (OBNUM / 2); i++) evas_object_del(o_images[i]);
42}
43
44/* loop - do things */
45static void _loop(double t, int f)
46{
47 int i;
48 Evas_Map *m;
49 Evas_Coord x, y, w, h;
50 m = evas_map_new(4);
51 for (i = 0; i < (OBNUM / 2); i++)
52 {
53 w = 120;
54 h = 160;
55 x = (win_w / 2) - (w / 2);
56 x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
57 y = (win_h / 2) - (h / 2);
58 y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
59
60 evas_map_point_coord_set (m, 0, x, y, 0);
61 evas_map_point_image_uv_set(m, 0, 0, 0);
62 evas_map_point_color_set (m, 0, 255, 255, 255, 255);
63
64 evas_map_point_coord_set (m, 1, x + w, y, 0);
65 evas_map_point_image_uv_set(m, 1, w, 0);
66 evas_map_point_color_set (m, 1, 255, 0, 0, 255);
67
68 evas_map_point_coord_set (m, 2, x + w, y + h, 0);
69 evas_map_point_image_uv_set(m, 2, w, h);
70 evas_map_point_color_set (m, 2, 0, 0, 255, 255);
71
72 evas_map_point_coord_set (m, 3, x, y + h, 0);
73 evas_map_point_image_uv_set(m, 3, 0, h);
74 evas_map_point_color_set (m, 3, 0, 0, 0, 0);
75
76 evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
77
78 evas_object_map_enable_set(o_images[i], 1);
79 evas_object_map_set(o_images[i], m);
80 }
81 evas_map_free(m);
82 FPS_STD(NAME);
83}
84
85/* prepend special key handlers if interactive (before STD) */
86static void _key(char *key)
87{
88 KEY_STD;
89}
90
91
92
93
94
95
96
97
98
99
100
101
102/* template stuff - ignore */
103# endif
104#endif
105
106#ifdef UI
107_ui_menu_item_add(ICON, NAME, FNAME);
108#endif
109
110#ifdef PROTO
111void FNAME(void);
112#endif
113
114#ifndef PROTO
115# ifndef UI
116void FNAME(void)
117{
118 ui_func_set(_key, _loop);
119 _setup();
120}
121# endif
122#endif
123#undef FNAME
124#undef NAME
125#undef ICON
diff --git a/src/bin/image_map_color_alpha_solid_rotate.c b/src/bin/image_map_color_alpha_solid_rotate.c
new file mode 100644
index 0000000..b428542
--- /dev/null
+++ b/src/bin/image_map_color_alpha_solid_rotate.c
@@ -0,0 +1,125 @@
1#undef FNAME
2#undef NAME
3#undef ICON
4
5/* metadata */
6#define FNAME image_map_color_alpha_solid_rotate_start
7#define NAME "Image Map Color Alpha Solid Rotate"
8#define ICON "mushroom.png"
9
10#ifndef PROTO
11# ifndef UI
12# include "main.h"
13
14/* standard var */
15static int done = 0;
16
17/* private data */
18static Evas_Object *o_images[OBNUM];
19
20/* setup */
21static void _setup(void)
22{
23 int i;
24 Evas_Object *o;
25 for (i = 0; i < (OBNUM / 2); i++)
26 {
27 o = evas_object_image_add(evas);
28 o_images[i] = o;
29 evas_object_image_file_set(o, build_path("image.png"), NULL);
30 evas_object_image_fill_set(o, 0, 0, 120, 160);
31 evas_object_resize(o, 120, 160);
32 evas_object_show(o);
33 }
34 done = 0;
35}
36
37/* cleanup */
38static void _cleanup(void)
39{
40 int i;
41 for (i = 0; i < (OBNUM / 2); i++) evas_object_del(o_images[i]);
42}
43
44/* loop - do things */
45static void _loop(double t, int f)
46{
47 int i;
48 Evas_Map *m;
49 Evas_Coord x, y, w, h;
50 m = evas_map_new(4);
51 for (i = 0; i < (OBNUM / 2); i++)
52 {
53 w = 120;
54 h = 160;
55 x = (win_w / 2) - (w / 2);
56 x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
57 y = (win_h / 2) - (h / 2);
58 y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
59
60 evas_map_point_coord_set (m, 0, x, y, 0);
61 evas_map_point_image_uv_set(m, 0, 0, 0);
62 evas_map_point_color_set (m, 0, 255, 255, 255, 255);
63
64 evas_map_point_coord_set (m, 1, x + w, y, 0);
65 evas_map_point_image_uv_set(m, 1, w, 0);
66 evas_map_point_color_set (m, 1, 255, 0, 0, 255);
67
68 evas_map_point_coord_set (m, 2, x + w, y + h, 0);
69 evas_map_point_image_uv_set(m, 2, w, h);
70 evas_map_point_color_set (m, 2, 0, 0, 255, 255);
71
72 evas_map_point_coord_set (m, 3, x, y + h, 0);
73 evas_map_point_image_uv_set(m, 3, 0, h);
74 evas_map_point_color_set (m, 3, 0, 0, 0, 0);
75
76 evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
77
78 evas_object_map_enable_set(o_images[i], 1);
79 evas_object_map_set(o_images[i], m);
80 }
81 evas_map_free(m);
82 FPS_STD(NAME);
83}
84
85/* prepend special key handlers if interactive (before STD) */
86static void _key(char *key)
87{
88 KEY_STD;
89}
90
91
92
93
94
95
96
97
98
99
100
101
102/* template stuff - ignore */
103# endif
104#endif
105
106#ifdef UI
107_ui_menu_item_add(ICON, NAME, FNAME);
108#endif
109
110#ifdef PROTO
111void FNAME(void);
112#endif
113
114#ifndef PROTO
115# ifndef UI
116void FNAME(void)
117{
118 ui_func_set(_key, _loop);
119 _setup();
120}
121# endif
122#endif
123#undef FNAME
124#undef NAME
125#undef ICON
diff --git a/src/bin/image_map_color_nearest_rotate.c b/src/bin/image_map_color_nearest_rotate.c
new file mode 100644
index 0000000..671ef3a
--- /dev/null
+++ b/src/bin/image_map_color_nearest_rotate.c
@@ -0,0 +1,127 @@
1#undef FNAME
2#undef NAME
3#undef ICON
4
5/* metadata */
6#define FNAME image_map_color_nearest_rotate_start
7#define NAME "Image Map Color Nearest Rotate"
8#define ICON "mushroom.png"
9
10#ifndef PROTO
11# ifndef UI
12# include "main.h"
13
14/* standard var */
15static int done = 0;
16
17/* private data */
18static Evas_Object *o_images[OBNUM];
19
20/* setup */
21static void _setup(void)
22{
23 int i;
24 Evas_Object *o;
25 for (i = 0; i < (OBNUM / 2); i++)
26 {
27 o = evas_object_image_add(evas);
28 o_images[i] = o;
29 evas_object_image_file_set(o, build_path("logo.png"), NULL);
30 evas_object_image_fill_set(o, 0, 0, 120, 160);
31 evas_object_resize(o, 120, 160);
32 evas_object_image_smooth_scale_set(o, 0);
33 evas_object_show(o);
34 }
35 done = 0;
36}
37
38/* cleanup */
39static void _cleanup(void)
40{
41 int i;
42 for (i = 0; i < (OBNUM / 2); i++) evas_object_del(o_images[i]);
43}
44
45/* loop - do things */
46static void _loop(double t, int f)
47{
48 int i;
49 Evas_Map *m;
50 Evas_Coord x, y, w, h;
51 m = evas_map_new(4);
52 evas_map_smooth_set(m, 0);
53 for (i = 0; i < (OBNUM / 2); i++)
54 {
55 w = 120;
56 h = 160;
57 x = (win_w / 2) - (w / 2);
58 x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
59 y = (win_h / 2) - (h / 2);
60 y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
61
62 evas_map_point_coord_set (m, 0, x, y, 0);
63 evas_map_point_image_uv_set(m, 0, 0, 0);
64 evas_map_point_color_set (m, 0, 255, 255, 255, 255);
65
66 evas_map_point_coord_set (m, 1, x + w, y, 0);
67 evas_map_point_image_uv_set(m, 1, w, 0);
68 evas_map_point_color_set (m, 1, 255, 0, 0, 255);
69
70 evas_map_point_coord_set (m, 2, x + w, y + h, 0);
71 evas_map_point_image_uv_set(m, 2, w, h);
72 evas_map_point_color_set (m, 2, 0, 0, 255, 255);
73
74 evas_map_point_coord_set (m, 3, x, y + h, 0);
75 evas_map_point_image_uv_set(m, 3, 0, h);
76 evas_map_point_color_set (m, 3, 0, 255, 0, 255);
77
78 evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
79
80 evas_object_map_enable_set(o_images[i], 1);
81 evas_object_map_set(o_images[i], m);
82 }
83 evas_map_free(m);
84 FPS_STD(NAME);
85}
86
87/* prepend special key handlers if interactive (before STD) */
88static 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
113void FNAME(void);
114#endif
115
116#ifndef PROTO
117# ifndef UI
118void 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/image_map_color_nearest_solid_rotate.c b/src/bin/image_map_color_nearest_solid_rotate.c
new file mode 100644
index 0000000..ac45d5a
--- /dev/null
+++ b/src/bin/image_map_color_nearest_solid_rotate.c
@@ -0,0 +1,127 @@
1#undef FNAME
2#undef NAME
3#undef ICON
4
5/* metadata */
6#define FNAME image_map_color_nearest_solid_rotate_start
7#define NAME "Image Map Color Nearest Solid Rotate"
8#define ICON "mushroom.png"
9
10#ifndef PROTO
11# ifndef UI
12# include "main.h"
13
14/* standard var */
15static int done = 0;
16
17/* private data */
18static Evas_Object *o_images[OBNUM];
19
20/* setup */
21static void _setup(void)
22{
23 int i;
24 Evas_Object *o;
25 for (i = 0; i < (OBNUM / 2); i++)
26 {
27 o = evas_object_image_add(evas);
28 o_images[i] = o;
29 evas_object_image_file_set(o, build_path("image.png"), NULL);
30 evas_object_image_fill_set(o, 0, 0, 120, 160);
31 evas_object_resize(o, 120, 160);
32 evas_object_image_smooth_scale_set(o, 0);
33 evas_object_show(o);
34 }
35 done = 0;
36}
37
38/* cleanup */
39static void _cleanup(void)
40{
41 int i;
42 for (i = 0; i < (OBNUM / 2); i++) evas_object_del(o_images[i]);
43}
44
45/* loop - do things */
46static void _loop(double t, int f)
47{
48 int i;
49 Evas_Map *m;
50 Evas_Coord x, y, w, h;
51 m = evas_map_new(4);
52 evas_map_smooth_set(m, 0);
53 for (i = 0; i < (OBNUM / 2); i++)
54 {
55 w = 120;
56 h = 160;
57 x = (win_w / 2) - (w / 2);
58 x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
59 y = (win_h / 2) - (h / 2);
60 y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
61
62 evas_map_point_coord_set (m, 0, x, y, 0);
63 evas_map_point_image_uv_set(m, 0, 0, 0);
64 evas_map_point_color_set (m, 0, 255, 255, 255, 255);
65
66 evas_map_point_coord_set (m, 1, x + w, y, 0);
67 evas_map_point_image_uv_set(m, 1, w, 0);
68 evas_map_point_color_set (m, 1, 255, 0, 0, 255);
69
70 evas_map_point_coord_set (m, 2, x + w, y + h, 0);
71 evas_map_point_image_uv_set(m, 2, w, h);
72 evas_map_point_color_set (m, 2, 0, 0, 255, 255);
73
74 evas_map_point_coord_set (m, 3, x, y + h, 0);
75 evas_map_point_image_uv_set(m, 3, 0, h);
76 evas_map_point_color_set (m, 3, 0, 255, 0, 255);
77
78 evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
79
80 evas_object_map_enable_set(o_images[i], 1);
81 evas_object_map_set(o_images[i], m);
82 }
83 evas_map_free(m);
84 FPS_STD(NAME);
85}
86
87/* prepend special key handlers if interactive (before STD) */
88static 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
113void FNAME(void);
114#endif
115
116#ifndef PROTO
117# ifndef UI
118void 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/image_map_color_rotate.c b/src/bin/image_map_color_rotate.c
new file mode 100644
index 0000000..51b46a6
--- /dev/null
+++ b/src/bin/image_map_color_rotate.c
@@ -0,0 +1,125 @@
1#undef FNAME
2#undef NAME
3#undef ICON
4
5/* metadata */
6#define FNAME image_map_color_rotate_start
7#define NAME "Image Map Color Rotate"
8#define ICON "mushroom.png"
9
10#ifndef PROTO
11# ifndef UI
12# include "main.h"
13
14/* standard var */
15static int done = 0;
16
17/* private data */
18static Evas_Object *o_images[OBNUM];
19
20/* setup */
21static void _setup(void)
22{
23 int i;
24 Evas_Object *o;
25 for (i = 0; i < (OBNUM / 2); i++)
26 {
27 o = evas_object_image_add(evas);
28 o_images[i] = o;
29 evas_object_image_file_set(o, build_path("logo.png"), NULL);
30 evas_object_image_fill_set(o, 0, 0, 120, 160);
31 evas_object_resize(o, 120, 160);
32 evas_object_show(o);
33 }
34 done = 0;
35}
36
37/* cleanup */
38static void _cleanup(void)
39{
40 int i;
41 for (i = 0; i < (OBNUM / 2); i++) evas_object_del(o_images[i]);
42}
43
44/* loop - do things */
45static void _loop(double t, int f)
46{
47 int i;
48 Evas_Map *m;
49 Evas_Coord x, y, w, h;
50 m = evas_map_new(4);
51 for (i = 0; i < (OBNUM / 2); i++)
52 {
53 w = 120;
54 h = 160;
55 x = (win_w / 2) - (w / 2);
56 x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
57 y = (win_h / 2) - (h / 2);
58 y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
59
60 evas_map_point_coord_set (m, 0, x, y, 0);
61 evas_map_point_image_uv_set(m, 0, 0, 0);
62 evas_map_point_color_set (m, 0, 255, 255, 255, 255);
63
64 evas_map_point_coord_set (m, 1, x + w, y, 0);
65 evas_map_point_image_uv_set(m, 1, w, 0);
66 evas_map_point_color_set (m, 1, 255, 0, 0, 255);
67
68 evas_map_point_coord_set (m, 2, x + w, y + h, 0);
69 evas_map_point_image_uv_set(m, 2, w, h);
70 evas_map_point_color_set (m, 2, 0, 0, 255, 255);
71
72 evas_map_point_coord_set (m, 3, x, y + h, 0);
73 evas_map_point_image_uv_set(m, 3, 0, h);
74 evas_map_point_color_set (m, 3, 0, 255, 0, 255);
75
76 evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
77
78 evas_object_map_enable_set(o_images[i], 1);
79 evas_object_map_set(o_images[i], m);
80 }
81 evas_map_free(m);
82 FPS_STD(NAME);
83}
84
85/* prepend special key handlers if interactive (before STD) */
86static void _key(char *key)
87{
88 KEY_STD;
89}
90
91
92
93
94
95
96
97
98
99
100
101
102/* template stuff - ignore */
103# endif
104#endif
105
106#ifdef UI
107_ui_menu_item_add(ICON, NAME, FNAME);
108#endif
109
110#ifdef PROTO
111void FNAME(void);
112#endif
113
114#ifndef PROTO
115# ifndef UI
116void FNAME(void)
117{
118 ui_func_set(_key, _loop);
119 _setup();
120}
121# endif
122#endif
123#undef FNAME
124#undef NAME
125#undef ICON
diff --git a/src/bin/image_map_color_solid_rotate.c b/src/bin/image_map_color_solid_rotate.c
new file mode 100644
index 0000000..75cc9f2
--- /dev/null
+++ b/src/bin/image_map_color_solid_rotate.c
@@ -0,0 +1,125 @@
1#undef FNAME
2#undef NAME
3#undef ICON
4
5/* metadata */
6#define FNAME image_map_color_solid_rotate_start
7#define NAME "Image Map Color Solid Rotate"
8#define ICON "mushroom.png"
9
10#ifndef PROTO
11# ifndef UI
12# include "main.h"
13
14/* standard var */
15static int done = 0;
16
17/* private data */
18static Evas_Object *o_images[OBNUM];
19
20/* setup */
21static void _setup(void)
22{
23 int i;
24 Evas_Object *o;
25 for (i = 0; i < (OBNUM / 2); i++)
26 {
27 o = evas_object_image_add(evas);
28 o_images[i] = o;
29 evas_object_image_file_set(o, build_path("image.png"), NULL);
30 evas_object_image_fill_set(o, 0, 0, 120, 160);
31 evas_object_resize(o, 120, 160);
32 evas_object_show(o);
33 }
34 done = 0;
35}
36
37/* cleanup */
38static void _cleanup(void)
39{
40 int i;
41 for (i = 0; i < (OBNUM / 2); i++) evas_object_del(o_images[i]);
42}
43
44/* loop - do things */
45static void _loop(double t, int f)
46{
47 int i;
48 Evas_Map *m;
49 Evas_Coord x, y, w, h;
50 m = evas_map_new(4);
51 for (i = 0; i < (OBNUM / 2); i++)
52 {
53 w = 120;
54 h = 160;
55 x = (win_w / 2) - (w / 2);
56 x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
57 y = (win_h / 2) - (h / 2);
58 y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
59
60 evas_map_point_coord_set (m, 0, x, y, 0);
61 evas_map_point_image_uv_set(m, 0, 0, 0);
62 evas_map_point_color_set (m, 0, 255, 255, 255, 255);
63
64 evas_map_point_coord_set (m, 1, x + w, y, 0);
65 evas_map_point_image_uv_set(m, 1, w, 0);
66 evas_map_point_color_set (m, 1, 255, 0, 0, 255);
67
68 evas_map_point_coord_set (m, 2, x + w, y + h, 0);
69 evas_map_point_image_uv_set(m, 2, w, h);
70 evas_map_point_color_set (m, 2, 0, 0, 255, 255);
71
72 evas_map_point_coord_set (m, 3, x, y + h, 0);
73 evas_map_point_image_uv_set(m, 3, 0, h);
74 evas_map_point_color_set (m, 3, 0, 255, 0, 255);
75
76 evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
77
78 evas_object_map_enable_set(o_images[i], 1);
79 evas_object_map_set(o_images[i], m);
80 }
81 evas_map_free(m);
82 FPS_STD(NAME);
83}
84
85/* prepend special key handlers if interactive (before STD) */
86static void _key(char *key)
87{
88 KEY_STD;
89}
90
91
92
93
94
95
96
97
98
99
100
101
102/* template stuff - ignore */
103# endif
104#endif
105
106#ifdef UI
107_ui_menu_item_add(ICON, NAME, FNAME);
108#endif
109
110#ifdef PROTO
111void FNAME(void);
112#endif
113
114#ifndef PROTO
115# ifndef UI
116void FNAME(void)
117{
118 ui_func_set(_key, _loop);
119 _setup();
120}
121# endif
122#endif
123#undef FNAME
124#undef NAME
125#undef ICON
diff --git a/src/bin/tests.h b/src/bin/tests.h
index 72f3e18..1479d7d 100644
--- a/src/bin/tests.h
+++ b/src/bin/tests.h
@@ -25,6 +25,14 @@
25#include "image_map_solid_rotate.c" 25#include "image_map_solid_rotate.c"
26#include "image_map_nearest_rotate.c" 26#include "image_map_nearest_rotate.c"
27#include "image_map_nearest_solid_rotate.c" 27#include "image_map_nearest_solid_rotate.c"
28#include "image_map_color_rotate.c"
29#include "image_map_color_solid_rotate.c"
30#include "image_map_color_nearest_rotate.c"
31#include "image_map_color_nearest_solid_rotate.c"
32#include "image_map_color_alpha_rotate.c"
33#include "image_map_color_alpha_solid_rotate.c"
34#include "image_map_color_alpha_nearest_rotate.c"
35#include "image_map_color_alpha_nearest_solid_rotate.c"
28#include "image_quality_scale.c" 36#include "image_quality_scale.c"
29#include "image_data_argb.c" 37#include "image_data_argb.c"
30#include "image_data_argb_alpha.c" 38#include "image_data_argb_alpha.c"