expedite: add test case for image masking

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>
This commit is contained in:
jiin.moon 2015-02-11 18:57:11 +01:00 committed by Cedric BAIL
parent 09456566a3
commit c4dfca2b01
16 changed files with 1556 additions and 17 deletions

View File

@ -50,7 +50,7 @@ esac
# EFL dependencies
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)
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)
EFL_ENABLE_EO_API_SUPPORT
EFL_ENABLE_BETA_API_SUPPORT

View File

@ -111,21 +111,21 @@ proxy_text_random.c \
line_blend.c \
image_blend_many_smooth_same_scaled.c \
font_effect_blur_alpha.c \
font_effect_blur_color.c
# \
# image_mask.c \
# image_mask_2.c \
# image_mask_3.c \
# image_mask_4.c \
# image_mask_5.c \
# image_mask_6.c \
# image_mask_7.c \
# image_mask_8.c \
# image_mask_9.c \
# image_mask_10.c \
# image_mask_11.c \
# image_mask_12.c \
# image_mask_13.c \
font_effect_blur_color.c \
image_mask.c \
image_mask_2.c \
image_mask_3.c \
image_mask_4.c \
image_mask_5.c \
image_mask_6.c \
image_mask_7.c \
image_mask_8.c \
image_mask_9.c \
image_mask_10.c \
image_mask_11.c \
image_mask_12.c \
image_mask_13.c
# \
# image_mask_14.c \
# image_mask_15.c

113
src/bin/image_mask.c Normal file
View File

@ -0,0 +1,113 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME image_mask
#define NAME "Image Mask"
#define ICON "blend.png"
#ifndef PROTO
# ifndef UI
# include "main.h"
/* standard var */
static int done = 0;
/* private data */
static Evas_Object *o_images[OBNUM];
/* setup */
static void _setup(void)
{
int i;
Evas_Object *o;
for (i = 0; i < OBNUM; i+= 2)
{
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
eo_do(o,
efl_file_set(build_path("image.png"), NULL),
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_visibility_set(EINA_TRUE));
o = eo_add(EVAS_IMAGE_CLASS,evas);
o_images[i + 1] = o;
eo_do(o,
efl_file_set(build_path("e-logo.png"), NULL),
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_visibility_set(EINA_TRUE));
eo_do(o_images[i], evas_obj_clip_set(o));
}
done = 0;
}
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
}
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i+= 2)
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
eo_do(o_images[i], evas_obj_position_set(x, y));
eo_do(o_images[i + 1], evas_obj_position_set(x, y));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
{
KEY_STD;
}
/* template stuff - ignore */
# endif
#endif
#ifdef UI
_ui_menu_item_add(ICON, NAME, FNAME);
#endif
#ifdef PROTO
void FNAME(void);
#endif
#ifndef PROTO
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif
#undef FNAME
#undef NAME
#undef ICON

122
src/bin/image_mask_10.c Normal file
View File

@ -0,0 +1,122 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME image_mask_10
#define NAME "Image Mask 10"
#define ICON "blend.png"
#ifndef PROTO
# ifndef UI
# include "main.h"
/* standard var */
static int done = 0;
/* private data */
static Evas_Object *o_images[1];
static Evas_Object *o_mask;
/* setup */
static void _setup(void)
{
int i;
Evas_Object *o;
o = eo_add(EVAS_IMAGE_CLASS,evas);
o_mask = o;
eo_do(o,
efl_file_set(build_path("e-logo-mask.png"), NULL),
evas_obj_image_fill_set(0, 0, 720, 420),
evas_obj_size_set(720, 420),
evas_obj_position_set((win_w - 720) / 2, (win_h - 420) / 2),
evas_obj_visibility_set(EINA_TRUE));
for (i = 0; i < 1; i++)
{
o = eo_add(EVAS_IMAGE_CLASS,evas);
o_images[i] = o;
eo_do(o,
efl_file_set(build_path("texture.png"), NULL),
evas_obj_image_fill_set(0, 0, win_w * 4, win_h * 4),
evas_obj_size_set(win_w * 4, win_h * 4),
evas_obj_clip_set(o_mask),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < 1; i++) eo_del(o_images[i]);
eo_del(o_mask);
}
/* loop - do things */
static void _loop(double t, int f)
{
int i;
static Evas_Map *m = NULL;
Evas_Coord x, y, w, h;
if (!m) m = evas_map_new(4);
for (i = 0; i < 1; i++)
{
w = win_w * 4;
h = win_h * 4;
x = (win_w / 2) - (w / 2);
y = (win_h / 2) - (h / 2);
evas_map_util_points_populate_from_geometry(m,
-win_w, -win_h,
win_w * 4, win_h * 4, 0);
evas_map_util_rotate(m, f, win_w / 2, win_h / 2);
eo_do(o_images[i],
evas_obj_map_enable_set(1),
evas_obj_map_set(m));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
{
KEY_STD;
}
/* template stuff - ignore */
# endif
#endif
#ifdef UI
_ui_menu_item_add(ICON, NAME, FNAME);
#endif
#ifdef PROTO
void FNAME(void);
#endif
#ifndef PROTO
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif
#undef FNAME
#undef NAME
#undef ICON

126
src/bin/image_mask_11.c Normal file
View File

@ -0,0 +1,126 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME image_mask_11
#define NAME "Image Mask 11"
#define ICON "blend.png"
#ifndef PROTO
# ifndef UI
# include "main.h"
/* standard var */
static int done = 0;
/* private data */
static Evas_Object *o_images[OBNUM];
static Evas_Object *o_mask;
/* setup */
static void _setup(void)
{
int i;
Evas_Object *o;
o = eo_add(EVAS_IMAGE_CLASS,evas);
o_mask = o;
eo_do(o,
efl_file_set(build_path("e-logo-mask.png"), NULL),
evas_obj_image_fill_set(0, 0, 720, 420),
evas_obj_size_set(720, 420),
evas_obj_position_set((win_w - 720) / 2, (win_h - 420) / 2),
evas_obj_visibility_set(EINA_TRUE));
for (i = 0; i < OBNUM; i++)
{
o = eo_add(EVAS_IMAGE_CLASS,evas);
o_images[i] = o;
eo_do(o,
efl_file_set(build_path("logo.png"), NULL),
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_clip_set(o_mask),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
eo_del(o_mask);
}
/* loop - do things */
static void _loop(double t, int f)
{
int i;
static Evas_Map *m = NULL;
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i++)
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
eo_do(o_images[i], evas_obj_position_set(x, y));
}
if (!m) m = evas_map_new(4);
evas_map_util_points_populate_from_geometry(m,
(win_w - 720) / 2,
(win_h - 420) / 2,
720, 420, 0);
evas_map_util_rotate(m, f, win_w / 2, win_h / 2);
eo_do(o_mask,
evas_obj_map_enable_set(1),
evas_obj_map_set(m));
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
{
KEY_STD;
}
/* template stuff - ignore */
# endif
#endif
#ifdef UI
_ui_menu_item_add(ICON, NAME, FNAME);
#endif
#ifdef PROTO
void FNAME(void);
#endif
#ifndef PROTO
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif
#undef FNAME
#undef NAME
#undef ICON

122
src/bin/image_mask_12.c Normal file
View File

@ -0,0 +1,122 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME image_mask_12
#define NAME "Image Mask 12"
#define ICON "blend.png"
#ifndef PROTO
# ifndef UI
# include "main.h"
/* standard var */
static int done = 0;
/* private data */
static Evas_Object *o_images[OBNUM];
static Evas_Object *o_mask;
/* setup */
static void _setup(void)
{
int i;
Evas_Object *o;
o = eo_add(EVAS_IMAGE_CLASS,evas);
o_mask = o;
eo_do(o,
efl_file_set(build_path("e-logo-mask.png"), NULL),
evas_obj_image_fill_set(0, 0, 720, 420),
evas_obj_size_set(720, 420),
evas_obj_position_set((win_w - 720) / 2, (win_h - 420) / 2),
evas_obj_visibility_set(EINA_TRUE));
for (i = 0; i < OBNUM; i++)
{
o = eo_add(EVAS_IMAGE_CLASS,evas);
o_images[i] = o;
eo_do(o,
efl_file_set(build_path("logo.png"), NULL),
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
efl_image_smooth_scale_set(1),
evas_obj_clip_set(o_mask),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
eo_del(o_mask);
}
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h, w0, h0;
for (i = 0; i < OBNUM; i++)
{
w0 = 80;
h0 = 80;
w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
eo_do(o_images[i],
evas_obj_position_set(x, y),
evas_obj_size_set(w, h),
evas_obj_image_fill_set(0, 0, w, h));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
{
KEY_STD;
}
/* template stuff - ignore */
# endif
#endif
#ifdef UI
_ui_menu_item_add(ICON, NAME, FNAME);
#endif
#ifdef PROTO
void FNAME(void);
#endif
#ifndef PROTO
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif
#undef FNAME
#undef NAME
#undef ICON

122
src/bin/image_mask_13.c Normal file
View File

@ -0,0 +1,122 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME image_mask_13
#define NAME "Image Mask 13"
#define ICON "blend.png"
#ifndef PROTO
# ifndef UI
# include "main.h"
/* standard var */
static int done = 0;
/* private data */
static Evas_Object *o_images[OBNUM];
static Evas_Object *o_mask;
/* setup */
static void _setup(void)
{
int i;
Evas_Object *o;
o = eo_add(EVAS_IMAGE_CLASS,evas);
o_mask = o;
eo_do(o,
efl_file_set(build_path("e-logo-mask.png"), NULL),
evas_obj_image_fill_set(0, 0, 720, 420),
evas_obj_size_set(720, 420),
evas_obj_position_set((win_w - 720) / 2, (win_h - 420) / 2),
evas_obj_visibility_set(EINA_TRUE));
for (i = 0; i < OBNUM; i++)
{
o = eo_add(EVAS_IMAGE_CLASS,evas);
o_images[i] = o;
eo_do(o,
efl_file_set(build_path("logo.png"), NULL),
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
efl_image_smooth_scale_set(0),
evas_obj_clip_set(o_mask),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
eo_del(o_mask);
}
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h, w0, h0;
for (i = 0; i < OBNUM; i++)
{
w0 = 80;
h0 = 80;
w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
eo_do(o_images[i],
evas_obj_position_set(x, y),
evas_obj_size_set(w, h),
evas_obj_image_fill_set(0, 0, w, h));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
{
KEY_STD;
}
/* template stuff - ignore */
# endif
#endif
#ifdef UI
_ui_menu_item_add(ICON, NAME, FNAME);
#endif
#ifdef PROTO
void FNAME(void);
#endif
#ifndef PROTO
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif
#undef FNAME
#undef NAME
#undef ICON

113
src/bin/image_mask_2.c Normal file
View File

@ -0,0 +1,113 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME image_mask_2
#define NAME "Image Mask 2"
#define ICON "blend.png"
#ifndef PROTO
# ifndef UI
# include "main.h"
/* standard var */
static int done = 0;
/* private data */
static Evas_Object *o_images[OBNUM];
/* setup */
static void _setup(void)
{
int i;
Evas_Object *o;
for (i = 0; i < OBNUM; i+= 2)
{
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
eo_do(o,
efl_file_set(build_path("image.png"), NULL),
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_visibility_set(EINA_TRUE));
o = eo_add(EVAS_IMAGE_CLASS,evas);
o_images[i + 1] = o;
eo_do(o,
efl_file_set(build_path("e-logo-2.png"), NULL),
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_visibility_set(EINA_TRUE));
eo_do(o_images[i], evas_obj_clip_set(o));
}
done = 0;
}
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
}
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i+= 2)
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
eo_do(o_images[i], evas_obj_position_set(x, y));
eo_do(o_images[i + 1], evas_obj_position_set(x, y));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
{
KEY_STD;
}
/* template stuff - ignore */
# endif
#endif
#ifdef UI
_ui_menu_item_add(ICON, NAME, FNAME);
#endif
#ifdef PROTO
void FNAME(void);
#endif
#ifndef PROTO
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif
#undef FNAME
#undef NAME
#undef ICON

113
src/bin/image_mask_3.c Normal file
View File

@ -0,0 +1,113 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME image_mask_3
#define NAME "Image Mask 3"
#define ICON "blend.png"
#ifndef PROTO
# ifndef UI
# include "main.h"
/* standard var */
static int done = 0;
/* private data */
static Evas_Object *o_images[OBNUM];
/* setup */
static void _setup(void)
{
int i;
Evas_Object *o;
for (i = 0; i < OBNUM; i+= 2)
{
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
eo_do(o,
efl_file_set(build_path("e-logo-2.png"), NULL),
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_visibility_set(EINA_TRUE));
o = eo_add(EVAS_IMAGE_CLASS,evas);
o_images[i + 1] = o;
eo_do(o,
efl_file_set(build_path("logo.png"), NULL),
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_visibility_set(EINA_TRUE));
eo_do(o_images[i], evas_obj_clip_set(o));
}
done = 0;
}
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
}
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i+= 2)
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
eo_do(o_images[i], evas_obj_position_set(x, y));
eo_do(o_images[i + 1], evas_obj_position_set(x, y));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
{
KEY_STD;
}
/* template stuff - ignore */
# endif
#endif
#ifdef UI
_ui_menu_item_add(ICON, NAME, FNAME);
#endif
#ifdef PROTO
void FNAME(void);
#endif
#ifndef PROTO
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif
#undef FNAME
#undef NAME
#undef ICON

115
src/bin/image_mask_4.c Normal file
View File

@ -0,0 +1,115 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME image_mask_4
#define NAME "Image Mask 4"
#define ICON "blend.png"
#ifndef PROTO
# ifndef UI
# include "main.h"
/* standard var */
static int done = 0;
/* private data */
static Evas_Object *o_images[OBNUM];
static Evas_Object *o_mask;
/* setup */
static void _setup(void)
{
int i;
Evas_Object *o;
o = eo_add(EVAS_IMAGE_CLASS,evas);
o_mask = o;
eo_do(o,
efl_file_set(build_path("e-logo-mask.png"), NULL),
evas_obj_image_fill_set(0, 0, 720, 420),
evas_obj_size_set(720, 420),
evas_obj_position_set((win_w - 720) / 2, (win_h - 420) / 2),
evas_obj_visibility_set(EINA_TRUE));
for (i = 0; i < OBNUM; i++)
{
o = eo_add(EVAS_IMAGE_CLASS,evas);
o_images[i] = o;
eo_do(o,
efl_file_set(build_path("logo.png"), NULL),
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_clip_set(o_mask),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
eo_del(o_mask);
}
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i++)
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
eo_do(o_images[i], evas_obj_position_set(x, y));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
{
KEY_STD;
}
/* template stuff - ignore */
# endif
#endif
#ifdef UI
_ui_menu_item_add(ICON, NAME, FNAME);
#endif
#ifdef PROTO
void FNAME(void);
#endif
#ifndef PROTO
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif
#undef FNAME
#undef NAME
#undef ICON

115
src/bin/image_mask_5.c Normal file
View File

@ -0,0 +1,115 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME image_mask_5
#define NAME "Image Mask 5"
#define ICON "blend.png"
#ifndef PROTO
# ifndef UI
# include "main.h"
/* standard var */
static int done = 0;
/* private data */
static Evas_Object *o_images[OBNUM];
static Evas_Object *o_mask;
/* setup */
static void _setup(void)
{
int i;
Evas_Object *o;
o = eo_add(EVAS_IMAGE_CLASS,evas);
o_mask = o;
eo_do(o,
efl_file_set(build_path("e-logo-2.png"), NULL),
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_position_set((win_w - 120) / 2, (win_h - 160) / 2),
evas_obj_visibility_set(EINA_TRUE));
for (i = 0; i < OBNUM; i++)
{
o = eo_add(EVAS_IMAGE_CLASS,evas);
o_images[i] = o;
eo_do(o,
efl_file_set(build_path("logo.png"), NULL),
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_clip_set(o_mask),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
eo_del(o_mask);
}
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i++)
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
eo_do(o_images[i], evas_obj_position_set(x, y));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
{
KEY_STD;
}
/* template stuff - ignore */
# endif
#endif
#ifdef UI
_ui_menu_item_add(ICON, NAME, FNAME);
#endif
#ifdef PROTO
void FNAME(void);
#endif
#ifndef PROTO
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif
#undef FNAME
#undef NAME
#undef ICON

115
src/bin/image_mask_6.c Normal file
View File

@ -0,0 +1,115 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME image_mask_6
#define NAME "Image Mask 6"
#define ICON "blend.png"
#ifndef PROTO
# ifndef UI
# include "main.h"
/* standard var */
static int done = 0;
/* private data */
static Evas_Object *o_images[OBNUM];
static Evas_Object *o_mask;
/* setup */
static void _setup(void)
{
int i;
Evas_Object *o;
o = eo_add(EVAS_IMAGE_CLASS,evas);
o_mask = o;
eo_do(o,
efl_file_set(build_path("e-logo-mask.png"), NULL),
evas_obj_image_fill_set(0, 0, 720, 420),
evas_obj_size_set(720, 420),
evas_obj_position_set((win_w - 720) / 2, (win_h - 420) / 2),
evas_obj_visibility_set(EINA_TRUE));
for (i = 0; i < OBNUM; i++)
{
o = eo_add(EVAS_IMAGE_CLASS,evas);
o_images[i] = o;
eo_do(o,
efl_file_set(build_path("logo.png"), NULL),
evas_obj_image_fill_set(0, 0, 120 / 2, 160 / 2),
evas_obj_size_set(120 / 2, 160 / 2),
evas_obj_clip_set(o_mask),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
eo_del(o_mask);
}
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i++)
{
w = 120 / 2;
h = 160 / 2;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
eo_do(o_images[i], evas_obj_position_set(x, y));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
{
KEY_STD;
}
/* template stuff - ignore */
# endif
#endif
#ifdef UI
_ui_menu_item_add(ICON, NAME, FNAME);
#endif
#ifdef PROTO
void FNAME(void);
#endif
#ifndef PROTO
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif
#undef FNAME
#undef NAME
#undef ICON

121
src/bin/image_mask_7.c Normal file
View File

@ -0,0 +1,121 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME image_mask_7
#define NAME "Image Mask 7"
#define ICON "blend.png"
#ifndef PROTO
# ifndef UI
# include "main.h"
/* standard var */
static int done = 0;
/* private data */
static Evas_Object *o_images[OBNUM];
static Evas_Object *o_mask;
/* setup */
static void _setup(void)
{
int i;
Evas_Object *o;
o = eo_add(EVAS_IMAGE_CLASS,evas);
o_mask = o;
eo_do(o,
efl_file_set(build_path("e-logo-2.png"), NULL),
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_position_set((win_w - 120) / 2, (win_h - 160) / 2),
evas_obj_visibility_set(EINA_TRUE));
for (i = 0; i < OBNUM; i++)
{
o = eo_add(EVAS_IMAGE_CLASS,evas);
o_images[i] = o;
eo_do(o,
efl_file_set(build_path("logo.png"), NULL),
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_clip_set(o_mask),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
eo_del(o_mask);
}
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i++)
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
eo_do(o_images[i], evas_obj_position_set(x, y));
}
w = 10 + (110 + (110 * sin((double)(f) / (14.3 * SLOW))));
h = 10 + (150 + (150 * sin((double)(f) / (21.7 * SLOW))));
eo_do(o_mask,
evas_obj_image_fill_set(0, 0, w, h),
evas_obj_size_set(w, h),
evas_obj_position_set((win_w - w) / 2, (win_h - h) / 2));
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
{
KEY_STD;
}
/* template stuff - ignore */
# endif
#endif
#ifdef UI
_ui_menu_item_add(ICON, NAME, FNAME);
#endif
#ifdef PROTO
void FNAME(void);
#endif
#ifndef PROTO
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif
#undef FNAME
#undef NAME
#undef ICON

115
src/bin/image_mask_8.c Normal file
View File

@ -0,0 +1,115 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME image_mask_8
#define NAME "Image Mask 8"
#define ICON "blend.png"
#ifndef PROTO
# ifndef UI
# include "main.h"
/* standard var */
static int done = 0;
/* private data */
static Evas_Object *o_images[1];
static Evas_Object *o_mask;
/* setup */
static void _setup(void)
{
int i;
Evas_Object *o;
o = eo_add(EVAS_IMAGE_CLASS,evas);
o_mask = o;
eo_do(o,
efl_file_set(build_path("e-logo-mask.png"), NULL),
evas_obj_image_fill_set(0, 0, 720, 420),
evas_obj_size_set(720, 420),
evas_obj_position_set((win_w - 720) / 2, (win_h - 420) / 2),
evas_obj_visibility_set(EINA_TRUE));
for (i = 0; i < 1; i++)
{
o = eo_add(EVAS_IMAGE_CLASS,evas);
o_images[i] = o;
eo_do(o,
efl_file_set(build_path("texture.png"), NULL),
evas_obj_image_fill_set(0, 0, 500, 444),
evas_obj_size_set(win_w * 4, win_h * 4),
evas_obj_clip_set(o_mask),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < 1; i++) eo_del(o_images[i]);
eo_del(o_mask);
}
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < 1; i++)
{
w = win_w * 4;
h = win_h * 4;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (500 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (444 / 2);
eo_do(o_images[i], evas_obj_position_set(x, y));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
{
KEY_STD;
}
/* template stuff - ignore */
# endif
#endif
#ifdef UI
_ui_menu_item_add(ICON, NAME, FNAME);
#endif
#ifdef PROTO
void FNAME(void);
#endif
#ifndef PROTO
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif
#undef FNAME
#undef NAME
#undef ICON

127
src/bin/image_mask_9.c Normal file
View File

@ -0,0 +1,127 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME image_mask_9
#define NAME "Image Mask 9"
#define ICON "blend.png"
#ifndef PROTO
# ifndef UI
# include "main.h"
/* standard var */
static int done = 0;
/* private data */
static Evas_Object *o_images[1];
static Evas_Object *o_mask;
/* setup */
static void _setup(void)
{
int i;
Evas_Object *o;
o = eo_add(EVAS_IMAGE_CLASS,evas);
o_mask = o;
eo_do(o,
efl_file_set(build_path("e-logo-mask.png"), NULL),
evas_obj_image_fill_set(0, 0, 720, 420),
evas_obj_size_set(720, 420),
evas_obj_position_set((win_w - 720) / 2, (win_h - 420) / 2),
evas_obj_visibility_set(EINA_TRUE));
for (i = 0; i < 1; i++)
{
o = eo_add(EVAS_IMAGE_CLASS,evas);
o_images[i] = o;
eo_do(o,
efl_file_set(build_path("texture.png"), NULL),
evas_obj_image_fill_set(0, 0, 500, 444),
evas_obj_size_set(win_w * 4, win_h * 4),
evas_obj_clip_set(o_mask),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < 1; i++) eo_del(o_images[i]);
eo_del(o_mask);
}
/* loop - do things */
static void _loop(double t, int f)
{
int i;
static Evas_Map *m = NULL;
Evas_Coord x, y, w, h;
for (i = 0; i < 1; i++)
{
w = win_w * 4;
h = win_h * 4;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (500 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (444 / 2);
eo_do(o_images[i], evas_obj_position_set(x, y));
}
if (!m) m = evas_map_new(4);
evas_map_util_points_populate_from_geometry(m,
(win_w - 720) / 2,
(win_h - 420) / 2,
720, 420, 0);
evas_map_util_rotate(m, f, win_w / 2, win_h / 2);
eo_do(o_mask,
evas_obj_map_enable_set(1),
evas_obj_map_set(m));
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
{
KEY_STD;
}
/* template stuff - ignore */
# endif
#endif
#ifdef UI
_ui_menu_item_add(ICON, NAME, FNAME);
#endif
#ifdef PROTO
void FNAME(void);
#endif
#ifndef PROTO
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif
#undef FNAME
#undef NAME
#undef ICON

View File

@ -93,7 +93,6 @@
#include "image_blend_many_smooth_same_scaled.c"
#include "font_effect_blur_alpha.c"
#include "font_effect_blur_color.c"
#if 0 // test disabled - evas having code disabled
#include "image_mask.c"
#include "image_mask_2.c"
#include "image_mask_3.c"
@ -107,6 +106,7 @@
#include "image_mask_11.c"
#include "image_mask_12.c"
#include "image_mask_13.c"
#if 0 // test disabled - evas having code disabled
#include "image_mask_14.c"
#include "image_mask_15.c"
#include "filter_object_colors.c"