summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/Makefile.am4
-rw-r--r--src/bin/image_blend_nearest_same_scaled.c104
-rw-r--r--src/bin/image_blend_nearest_solid_same_scaled.c104
-rw-r--r--src/bin/image_blend_smooth_same_scaled.c104
-rw-r--r--src/bin/image_blend_smooth_solid_same_scaled.c104
-rw-r--r--src/bin/main.h3
-rw-r--r--src/bin/tests.h4
7 files changed, 426 insertions, 1 deletions
diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
index 956d794..bde63dc 100644
--- a/src/bin/Makefile.am
+++ b/src/bin/Makefile.am
@@ -26,6 +26,10 @@ image_blend_nearest_scaled.c \
26image_blend_nearest_solid_scaled.c \ 26image_blend_nearest_solid_scaled.c \
27image_blend_smooth_scaled.c \ 27image_blend_smooth_scaled.c \
28image_blend_smooth_solid_scaled.c \ 28image_blend_smooth_solid_scaled.c \
29image_blend_nearest_same_scaled.c \
30image_blend_nearest_solid_same_scaled.c \
31image_blend_smooth_same_scaled.c \
32image_blend_smooth_solid_same_scaled.c \
29image_blend_border.c \ 33image_blend_border.c \
30image_blend_solid_border.c \ 34image_blend_solid_border.c \
31image_blend_border_recolor.c \ 35image_blend_border_recolor.c \
diff --git a/src/bin/image_blend_nearest_same_scaled.c b/src/bin/image_blend_nearest_same_scaled.c
new file mode 100644
index 0000000..c680ed5
--- /dev/null
+++ b/src/bin/image_blend_nearest_same_scaled.c
@@ -0,0 +1,104 @@
1#undef FNAME
2#undef NAME
3#undef ICON
4
5/* metadata */
6#define FNAME image_blend_nearest_same_scaled_start
7#define NAME "Image Blend Nearest Same Scaled"
8#define ICON "flower.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++)
25 {
26 o = evas_object_image_add(evas);
27 o_images[i] = o;
28 evas_object_image_file_set(o, build_path("logo.png"), NULL);
29 evas_object_image_smooth_scale_set(o, 0);
30 evas_object_show(o);
31 }
32 done = 0;
33}
34
35/* cleanup */
36static void _cleanup(void)
37{
38 int i;
39 for (i = 0; i < OBNUM; i++) evas_object_del(o_images[i]);
40}
41
42/* loop - do things */
43static void _loop(double t, int f)
44{
45 int i;
46 Evas_Coord x, y, w, h, w0, h0;
47 for (i = 0; i < OBNUM; i++)
48 {
49 w0 = 80;
50 h0 = 80;
51 w = 40 + ((i % 3) * (w0 / 2));
52 h = 40 + ((i % 3) * (h0 / 2));
53 x = (win_w / 2) - (w / 2);
54 x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
55 y = (win_h / 2) - (h / 2);
56 y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
57 evas_object_move(o_images[i], x, y);
58 evas_object_resize(o_images[i], w, h);
59 evas_object_image_fill_set(o_images[i], 0, 0, w, h);
60 }
61 FPS_STD(NAME);
62}
63
64/* prepend special key handlers if interactive (before STD) */
65static void _key(char *key)
66{
67 KEY_STD;
68}
69
70
71
72
73
74
75
76
77
78
79
80
81/* template stuff - ignore */
82# endif
83#endif
84
85#ifdef UI
86_ui_menu_item_add(ICON, NAME, FNAME);
87#endif
88
89#ifdef PROTO
90void FNAME(void);
91#endif
92
93#ifndef PROTO
94# ifndef UI
95void FNAME(void)
96{
97 ui_func_set(_key, _loop);
98 _setup();
99}
100# endif
101#endif
102#undef FNAME
103#undef NAME
104#undef ICON
diff --git a/src/bin/image_blend_nearest_solid_same_scaled.c b/src/bin/image_blend_nearest_solid_same_scaled.c
new file mode 100644
index 0000000..060a995
--- /dev/null
+++ b/src/bin/image_blend_nearest_solid_same_scaled.c
@@ -0,0 +1,104 @@
1#undef FNAME
2#undef NAME
3#undef ICON
4
5/* metadata */
6#define FNAME image_blend_nearest_solid_same_scaled_start
7#define NAME "Image Blend Nearest Solid Same Scaled"
8#define ICON "flower.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++)
25 {
26 o = evas_object_image_add(evas);
27 o_images[i] = o;
28 evas_object_image_file_set(o, build_path("image.png"), NULL);
29 evas_object_image_smooth_scale_set(o, 0);
30 evas_object_show(o);
31 }
32 done = 0;
33}
34
35/* cleanup */
36static void _cleanup(void)
37{
38 int i;
39 for (i = 0; i < OBNUM; i++) evas_object_del(o_images[i]);
40}
41
42/* loop - do things */
43static void _loop(double t, int f)
44{
45 int i;
46 Evas_Coord x, y, w, h, w0, h0;
47 for (i = 0; i < OBNUM; i++)
48 {
49 w0 = 80;
50 h0 = 80;
51 w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
52 h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
53 x = (win_w / 2) - (w / 2);
54 x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
55 y = (win_h / 2) - (h / 2);
56 y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
57 evas_object_move(o_images[i], x, y);
58 evas_object_resize(o_images[i], w, h);
59 evas_object_image_fill_set(o_images[i], 0, 0, w, h);
60 }
61 FPS_STD(NAME);
62}
63
64/* prepend special key handlers if interactive (before STD) */
65static void _key(char *key)
66{
67 KEY_STD;
68}
69
70
71
72
73
74
75
76
77
78
79
80
81/* template stuff - ignore */
82# endif
83#endif
84
85#ifdef UI
86_ui_menu_item_add(ICON, NAME, FNAME);
87#endif
88
89#ifdef PROTO
90void FNAME(void);
91#endif
92
93#ifndef PROTO
94# ifndef UI
95void FNAME(void)
96{
97 ui_func_set(_key, _loop);
98 _setup();
99}
100# endif
101#endif
102#undef FNAME
103#undef NAME
104#undef ICON
diff --git a/src/bin/image_blend_smooth_same_scaled.c b/src/bin/image_blend_smooth_same_scaled.c
new file mode 100644
index 0000000..5d2bdd3
--- /dev/null
+++ b/src/bin/image_blend_smooth_same_scaled.c
@@ -0,0 +1,104 @@
1#undef FNAME
2#undef NAME
3#undef ICON
4
5/* metadata */
6#define FNAME image_blend_smooth_same_scaled_start
7#define NAME "Image Blend Smooth Same Scaled"
8#define ICON "flower.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++)
25 {
26 o = evas_object_image_add(evas);
27 o_images[i] = o;
28 evas_object_image_file_set(o, build_path("logo.png"), NULL);
29 evas_object_image_smooth_scale_set(o, 1);
30 evas_object_show(o);
31 }
32 done = 0;
33}
34
35/* cleanup */
36static void _cleanup(void)
37{
38 int i;
39 for (i = 0; i < OBNUM; i++) evas_object_del(o_images[i]);
40}
41
42/* loop - do things */
43static void _loop(double t, int f)
44{
45 int i;
46 Evas_Coord x, y, w, h, w0, h0;
47 for (i = 0; i < OBNUM; i++)
48 {
49 w0 = 80;
50 h0 = 80;
51 w = 40 + ((i % 3) * (w0 / 2));
52 h = 40 + ((i % 3) * (h0 / 2));
53 x = (win_w / 2) - (w / 2);
54 x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
55 y = (win_h / 2) - (h / 2);
56 y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
57 evas_object_move(o_images[i], x, y);
58 evas_object_resize(o_images[i], w, h);
59 evas_object_image_fill_set(o_images[i], 0, 0, w, h);
60 }
61 FPS_STD(NAME);
62}
63
64/* prepend special key handlers if interactive (before STD) */
65static void _key(char *key)
66{
67 KEY_STD;
68}
69
70
71
72
73
74
75
76
77
78
79
80
81/* template stuff - ignore */
82# endif
83#endif
84
85#ifdef UI
86_ui_menu_item_add(ICON, NAME, FNAME);
87#endif
88
89#ifdef PROTO
90void FNAME(void);
91#endif
92
93#ifndef PROTO
94# ifndef UI
95void FNAME(void)
96{
97 ui_func_set(_key, _loop);
98 _setup();
99}
100# endif
101#endif
102#undef FNAME
103#undef NAME
104#undef ICON
diff --git a/src/bin/image_blend_smooth_solid_same_scaled.c b/src/bin/image_blend_smooth_solid_same_scaled.c
new file mode 100644
index 0000000..8ab7ce5
--- /dev/null
+++ b/src/bin/image_blend_smooth_solid_same_scaled.c
@@ -0,0 +1,104 @@
1#undef FNAME
2#undef NAME
3#undef ICON
4
5/* metadata */
6#define FNAME image_blend_smooth_solid_same_scaled_start
7#define NAME "Image Blend Smooth Solid Same Scaled"
8#define ICON "flower.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++)
25 {
26 o = evas_object_image_add(evas);
27 o_images[i] = o;
28 evas_object_image_file_set(o, build_path("image.png"), NULL);
29 evas_object_image_smooth_scale_set(o, 1);
30 evas_object_show(o);
31 }
32 done = 0;
33}
34
35/* cleanup */
36static void _cleanup(void)
37{
38 int i;
39 for (i = 0; i < OBNUM; i++) evas_object_del(o_images[i]);
40}
41
42/* loop - do things */
43static void _loop(double t, int f)
44{
45 int i;
46 Evas_Coord x, y, w, h, w0, h0;
47 for (i = 0; i < OBNUM; i++)
48 {
49 w0 = 80;
50 h0 = 80;
51 w = 40 + ((i % 3) * (w0 / 2));
52 h = 40 + ((i % 3) * (h0 / 2));
53 x = (win_w / 2) - (w / 2);
54 x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
55 y = (win_h / 2) - (h / 2);
56 y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
57 evas_object_move(o_images[i], x, y);
58 evas_object_resize(o_images[i], w, h);
59 evas_object_image_fill_set(o_images[i], 0, 0, w, h);
60 }
61 FPS_STD(NAME);
62}
63
64/* prepend special key handlers if interactive (before STD) */
65static void _key(char *key)
66{
67 KEY_STD;
68}
69
70
71
72
73
74
75
76
77
78
79
80
81/* template stuff - ignore */
82# endif
83#endif
84
85#ifdef UI
86_ui_menu_item_add(ICON, NAME, FNAME);
87#endif
88
89#ifdef PROTO
90void FNAME(void);
91#endif
92
93#ifndef PROTO
94# ifndef UI
95void FNAME(void)
96{
97 ui_func_set(_key, _loop);
98 _setup();
99}
100# endif
101#endif
102#undef FNAME
103#undef NAME
104#undef ICON
diff --git a/src/bin/main.h b/src/bin/main.h
index 2e2eb1b..b05869a 100644
--- a/src/bin/main.h
+++ b/src/bin/main.h
@@ -68,6 +68,7 @@
68#include "about.h" 68#include "about.h"
69 69
70#define OBNUM 128 70#define OBNUM 128
71#define LOOPS 512
71 72
72extern Evas *evas; 73extern Evas *evas;
73extern int win_w, win_h; 74extern int win_w, win_h;
@@ -87,7 +88,7 @@ int engine_abort(void);
87 } 88 }
88 89
89#define FPS_STD(x) \ 90#define FPS_STD(x) \
90 if ((f >= 32) && (!done)) \ 91 if ((f >= LOOPS) && (!done)) \
91 { \ 92 { \
92 double fps; \ 93 double fps; \
93 fps = (double)f / t; \ 94 fps = (double)f / t; \
diff --git a/src/bin/tests.h b/src/bin/tests.h
index bb0999d..7d627a1 100644
--- a/src/bin/tests.h
+++ b/src/bin/tests.h
@@ -4,6 +4,10 @@
4#include "image_blend_nearest_solid_scaled.c" 4#include "image_blend_nearest_solid_scaled.c"
5#include "image_blend_smooth_scaled.c" 5#include "image_blend_smooth_scaled.c"
6#include "image_blend_smooth_solid_scaled.c" 6#include "image_blend_smooth_solid_scaled.c"
7#include "image_blend_nearest_same_scaled.c"
8#include "image_blend_nearest_solid_same_scaled.c"
9#include "image_blend_smooth_same_scaled.c"
10#include "image_blend_smooth_solid_same_scaled.c"
7#include "image_blend_border.c" 11#include "image_blend_border.c"
8#include "image_blend_solid_border.c" 12#include "image_blend_solid_border.c"
9#include "image_blend_border_recolor.c" 13#include "image_blend_border_recolor.c"