Translated some _loops and _setups to C++.

This commit is contained in:
Savio Sena 2014-09-24 00:41:41 -03:00
parent 46a88189ca
commit 21216c5dff
51 changed files with 649 additions and 864 deletions

View File

@ -25,21 +25,19 @@ static efl::eina::list<evas::image> images;
/* setup */
static void _setup(void)
{
int i, w, h, n;
evas::canvas canvas(::eo_ref(G_evas));
for (i = 0; i < MANYNUM; i++)
for (int i = 0; i < MANYNUM; i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(o);
n = rnd() % 100;
w = 3 + ((n * (60 - 3)) / 100);
h = 4 + ((n * (80 - 4)) / 100);
eo_do(o,
efl_file_set(build_path("logo.png"), NULL),
efl_image_smooth_scale_set(1),
evas_obj_size_set(w, h),
evas_obj_image_fill_set(0, 0, w, h),
evas_obj_visibility_set(EINA_TRUE));
int n = rnd() % 100;
int w = 3 + ((n * (60 - 3)) / 100);
int h = 4 + ((n * (80 - 4)) / 100);
o.file_set(build_path("logo.png"), NULL);
o.smooth_scale_set(1);
o.evas::object::size_set(w, h);
o.fill_set(0, 0, w, h);
o.visibility_set(true);
}
done = 0;
}
@ -53,16 +51,16 @@ static void _cleanup()
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < MANYNUM; i++)
auto itr = images.begin();
for (int i = 0; i < MANYNUM; i++, ++itr)
{
eo_do(o_images[i], evas_obj_size_get(&w, &h));
x = (win_w / 2) - (w / 2);
Evas_Coord w, h;
(*itr).size_get(&w, &h);
Evas_Coord x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (win_w / 2);
y = (win_h / 2) - (h / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (win_h / 2);
eo_do(o_images[i], evas_obj_position_set(x, y));
(*itr).position_set(x, y);
}
FPS_STD(NAME);
}

View File

@ -44,32 +44,24 @@ static void _cleanup()
/* 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++)
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
{
w0 = 80;
h0 = 80;
w = 40 + ((i % 3) * (w0 / 2));
h = 40 + ((i % 3) * (h0 / 2));
x = (win_w / 2) - (w / 2);
Evas_Coord w0 = 80;
Evas_Coord h0 = 80;
Evas_Coord w = 40 + ((i % 3) * (w0 / 2));
Evas_Coord h = 40 + ((i % 3) * (h0 / 2));
Evas_Coord x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
eo_do(images[i],
evas_obj_position_set(x, y),
evas_obj_size_set(w, h),
evas_obj_image_fill_set(0, 0, w, h));
(*itr).position_set(x, y);
(*itr).evas::object::size_set(w, h);
(*itr).fill_set(0, 0, w, h);
}
FPS_STD(NAME);
}
/* cleanup */
static void _cleanup(void)
{
images.clear();
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
{

View File

@ -23,16 +23,14 @@ static efl::eina::list<evas::image> images;
/* setup */
static void _setup(void)
{
int i;
evas::canvas canvas(::eo_ref(G_evas));
for (i = 0; i < OBNUM; i++)
for (int i = 0; i < OBNUM; i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(o);
eo_do(o,
efl_file_set(build_path("logo.png"), NULL),
efl_image_smooth_scale_set(0),
evas_obj_visibility_set(EINA_TRUE));
o.file_set(build_path("logo.png"), "");
o.smooth_scale_set(0);
o.visibility_set(true);
}
done = 0;
}
@ -46,22 +44,20 @@ static void _cleanup()
/* 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++)
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
{
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);
Evas_Coord w0 = 80;
Evas_Coord h0 = 80;
Evas_Coord w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
Evas_Coord h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
Evas_Coord x = (win_w / 2) - (w / 2);
Evas_Coord y = (win_h / 2) - (h / 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(images[i],
evas_obj_position_set(x, y),
evas_obj_size_set(w, h),
evas_obj_image_fill_set(0, 0, w, h));
(*itr).position_set(x, y);
(*itr).evas::object::size_set(w, h);
(*itr).fill_set(0, 0, w, h);
}
FPS_STD(NAME);
}

View File

@ -23,16 +23,14 @@ static efl::eina::list<evas::image> images;
/* setup */
static void _setup(void)
{
int i;
evas::canvas canvas(::eo_ref(G_evas));
for (i = 0; i < OBNUM; i++)
for (int i = 0; i < OBNUM; i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(o);
eo_do(o,
efl_file_set(build_path("image.png"), NULL),
efl_image_smooth_scale_set(0),
evas_obj_visibility_set(EINA_TRUE));
o.file_set(build_path("image.png"), "");
o.smooth_scale_set(0);
o.visibility_set(EINA_TRUE);
}
done = 0;
}
@ -46,22 +44,20 @@ static void _cleanup()
/* 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++)
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
{
w0 = 80;
h0 = 80;
w = 40 + ((i % 3) * (w0 / 2));
h = 40 + ((i % 3) * (h0 / 2));
x = (win_w / 2) - (w / 2);
Evas_Coord w0 = 80;
Evas_Coord h0 = 80;
Evas_Coord w = 40 + ((i % 3) * (w0 / 2));
Evas_Coord h = 40 + ((i % 3) * (h0 / 2));
Evas_Coord x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
eo_do(images[i],
evas_obj_position_set(x, y),
evas_obj_size_set(w, h),
evas_obj_image_fill_set(0, 0, w, h));
(*itr).position_set(x, y);
(*itr).evas::object::size_set(w, h);
(*itr).fill_set(0, 0, w, h);
}
FPS_STD(NAME);
}

View File

@ -44,22 +44,20 @@ static void _cleanup()
/* 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++)
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
{
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);
Evas_Coord w0 = 80;
Evas_Coord h0 = 80;
Evas_Coord w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
Evas_Coord h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
Evas_Coord x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
eo_do(images[i],
evas_obj_position_set(x, y),
evas_obj_size_set(w, h),
evas_obj_image_fill_set(0, 0, w, h));
(*itr).position_set(x, y);
(*itr).evas::object::size_set(w, h);
(*itr).fill_set(0, 0, w, h);
}
FPS_STD(NAME);
}

View File

@ -23,16 +23,15 @@ static efl::eina::list<evas::image> images;
/* setup */
static void _setup(void)
{
int i;
evas::canvas canvas(::eo_ref(G_evas));
srnd();
for (i = 0; i < OBNUM; i++)
for (int i = 0; i < OBNUM; i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(o);
if (i < (OBNUM / 2))
{
eo_do(o, efl_file_set(build_path("logo.png"), NULL));
o.file_set(build_path("logo.png"), "");
}
else
{
@ -40,14 +39,12 @@ static void _setup(void)
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
eo_do(o,
efl_file_set(build_path("image.png"), NULL),
evas_obj_position_set(x, y));
o.file_set(build_path("image.png"), "");
o.position_set(x, y);
}
eo_do(o,
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_visibility_set(EINA_TRUE));
o.fill_set(0, 0, 120, 160);
o.evas::object::size_set(120, 160);
o.visibility_set(true);
}
done = 0;
}
@ -61,19 +58,18 @@ static void _cleanup()
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i++)
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
{
if (i < (OBNUM / 2))
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
Evas_Coord w = 120;
Evas_Coord h = 160;
Evas_Coord x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
eo_do(images[i], evas_obj_position_set(x, y));
(*itr).position_set(x, y);
}
}
FPS_STD(NAME);

View File

@ -26,16 +26,15 @@ static efl::eina::list<evas::image> images;
/* setup */
static void _setup(void)
{
int i;
evas::canvas canvas(::eo_ref(G_evas));
srnd();
for (i = 0; i < OBNUM; i++)
for (int i = 0; i < OBNUM; i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(o);
if (i < (OBNUM / 2))
{
eo_do(o, efl_file_set(PACKAGE_DATA_DIR"/data/logo.png", NULL));
o.file_set(PACKAGE_DATA_DIR"/data/logo.png", "");
}
else
{
@ -43,14 +42,12 @@ static void _setup(void)
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
eo_do(o,
efl_file_set(PACKAGE_DATA_DIR"/data/image.png", NULL),
evas_obj_position_set(x, y));
o.file_set(PACKAGE_DATA_DIR"/data/image.png", "");
o.evas::object::position_set(x, y);
}
eo_do(o,
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_visibility_set(EINA_TRUE));
o.fill_set(0, 0, 120, 160);
o.size_set(120, 160);
o.visibility_set(true);
}
done = 0;
}
@ -64,19 +61,18 @@ static void _cleanup()
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i++)
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
{
if (i < (OBNUM / 2))
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
Evas_Coord w = 120;
Evas_Coord h = 160;
Evas_Coord x = (win_w / 2) - (w / 2);
Evas_Coord y = (win_h / 2) - (h / 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(images[i], evas_obj_position_set(x, y));
(*itr).position_set(x, y);
}
}
FPS_STD(NAME);

View File

@ -26,31 +26,27 @@ static efl::eina::list<evas::image> images;
/* setup */
static void _setup(void)
{
int i;
evas::canvas canvas(::eo_ref(G_evas));
srnd();
for (i = 0; i < OBNUM; i++)
for (int i = 0; i < OBNUM; i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(o);
if (i < (OBNUM / 2))
{
eo_do(o, efl_file_set(build_path("logo.png"), NULL));
o.file_set(build_path("logo.png"), "");
}
else
{
Evas_Coord x, y;
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
eo_do(o,
efl_file_set(build_path("image.png"), NULL),
evas_obj_position_set(x, y));
o.file_set(build_path("image.png"), NULL);
o.position_set(x, y);
}
eo_do(o,
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_visibility_set(EINA_TRUE));
o.fill_set(0, 0, 120, 160);
o.evas::object::size_set(120, 160);
o.visibility_set(true);
}
done = 0;
}
@ -64,19 +60,18 @@ static void _cleanup()
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i++)
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, itr++)
{
if (i < (OBNUM / 2))
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
Evas_Coord w = 120;
Evas_Coord h = 160;
Evas_Coord x = (win_w / 2) - (w / 2);
Evas_Coord y = (win_h / 2) - (h / 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(images[i], evas_obj_position_set(x, y));
(*itr).position_set(x, y);
}
}
FPS_STD(NAME);

View File

@ -28,31 +28,26 @@ static efl::eina::list<evas::image> images;
/* setup */
static void _setup(void)
{
int i;
evas::canvas canvas(::eo_ref(G_evas));
srnd();
for (i = 0; i < OBNUM; i++)
for (int i = 0; i < OBNUM; i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(o);
if (i < (OBNUM / 2))
{
eo_do(o, efl_file_set(build_path("logo.png"), NULL));
o.file_set(build_path("logo.png"), "");
}
else
{
Evas_Coord x, y;
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
eo_do(o,
efl_file_set(build_path("image.png"), NULL),
evas_obj_position_set(x, y));
Evas_Coord x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
Evas_Coord y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
o.file_set(build_path("image.png"), "");
o.position_set(x, y);
}
eo_do(o,
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_visibility_set(EINA_TRUE));
o.fill_set(0, 0, 120, 160);
o.evas::object::size_set(120, 160);
o.visibility_set(true);
}
done = 0;
}
@ -66,19 +61,18 @@ static void _cleanup()
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i++)
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
{
if (i < (OBNUM / 2))
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
Evas_Coord w = 120;
Evas_Coord h = 160;
Evas_Coord x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
eo_do(images[i], evas_obj_position_set(x, y));
(*itr).position_set(x, y);
}
}
FPS_STD(NAME);

View File

@ -25,16 +25,15 @@ static efl::eina::list<evas::image> images;
/* setup */
static void _setup(void)
{
int i;
evas::canvas canvas(::eo_ref(G_evas));
srnd();
for (i = 0; i < OBNUM; i++)
for (int i = 0; i < OBNUM; i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(o);
if (i & 0x1)
{
eo_do(o, efl_file_set(build_path("logo.png"), NULL));
o.file_set(build_path("logo.png"), "");
}
else
{
@ -42,14 +41,12 @@ static void _setup(void)
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
eo_do(o,
efl_file_set(build_path("image.png"), NULL),
evas_obj_position_set(x, y));
efl_file_set(build_path("image.png"), "");
evas_obj_position_set(x, y);
}
eo_do(o,
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_visibility_set(EINA_TRUE));
o.fill_set(0, 0, 120, 160);
o.evas::object::size_set(120, 160);
o.visibility_set(true);
}
done = 0;
}
@ -63,19 +60,18 @@ static void _cleanup()
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i++)
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
{
if (i & 0x1)
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
Evas_Coord w = 120;
Evas_Coord h = 160;
Evas_Coord x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
eo_do(images[i], evas_obj_position_set(x, y));
(*itr).position_set(x, y);
}
}
FPS_STD(NAME);

View File

@ -28,31 +28,26 @@ static efl::eina::list<evas::image> images;
/* setup */
static void _setup(void)
{
int i;
evas::canvas canvas(::eo_ref(G_evas));
srnd();
for (i = 0; i < OBNUM; i++)
for (int i = 0; i < OBNUM; i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(o);
if (i & 0x1)
{
eo_do(o, efl_file_set(build_path("logo.png"), NULL));
o.file_set(build_path("logo.png"), "");
}
else
{
Evas_Coord x, y;
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
eo_do(o,
efl_file_set(build_path("image.png"), NULL),
evas_obj_position_set(x, y));
Evas_Coord x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
Evas_Coord y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
o.file_set(build_path("image.png"), "");
o.position_set(x, y);
}
eo_do(o,
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_visibility_set(EINA_TRUE));
o.fill_set(0, 0, 120, 160);
o.size_set(120, 160);
o.visibility_set(true);
}
done = 0;
}
@ -66,19 +61,18 @@ static void _cleanup()
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i++)
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
{
if (i & 0x1)
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
Evas_Coord w = 120;
Evas_Coord h = 160;
Evas_Coord x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
eo_do(images[i], evas_obj_position_set(x, y));
(*itr).position_set(x, y);
}
}
FPS_STD(NAME);

View File

@ -28,16 +28,15 @@ static efl::eina::list<evas::image> images;
/* setup */
static void _setup(void)
{
int i;
evas::canvas canvas(::eo_ref(G_evas));
srnd();
for (i = 0; i < OBNUM; i++)
for (int i = 0; i < OBNUM; i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(o);
if (i & 0x1)
{
eo_do(o, efl_file_set(build_path("logo.png"), NULL));
o.file_set(build_path("logo.png"), "");
}
else
{
@ -45,14 +44,12 @@ static void _setup(void)
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
eo_do(o,
efl_file_set(build_path("image.png"), NULL),
evas_obj_position_set(x, y));
o.file_set(build_path("image.png"), "");
o.position_set(x, y);
}
eo_do(o,
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_visibility_set(EINA_TRUE));
o.fill_set(0, 0, 120, 160);
o.evas::object::size_set(120, 160);
o.visibility_set(true);
}
done = 0;
}
@ -66,19 +63,18 @@ static void _cleanup()
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i++)
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
{
if (i & 0x1)
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
Evas_Coord w = 120;
Evas_Coord h = 160;
Evas_Coord x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
eo_do(images[i], evas_obj_position_set(x, y));
(*itr).position_set(x, y);
}
}
FPS_STD(NAME);

View File

@ -28,31 +28,26 @@ static efl::eina::list<evas::image> images;
/* setup */
static void _setup(void)
{
int i;
evas::canvas canvas(::eo_ref(G_evas));
srnd();
for (i = 0; i < OBNUM; i++)
for (int i = 0; i < OBNUM; i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(o);
if (i & 0x1)
{
eo_do(o, efl_file_set(build_path("logo.png"), NULL));
o.file_set(build_path("logo.png"), "");
}
else
{
Evas_Coord x, y;
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
eo_do(o,
efl_file_set(build_path("image.png"), NULL),
evas_obj_position_set(x, y));
Evas_Coord x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
Evas_Coord y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
o.file_set(build_path("image.png"), "");
o.position_set(x, y);
}
eo_do(o,
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_visibility_set(EINA_TRUE));
o.fill_set(0, 0, 120, 160);
o.evas::object::size_set(120, 160);
o.visibility_set(true);
}
done = 0;
}
@ -66,19 +61,18 @@ static void _cleanup()
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i++)
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
{
if (i & 0x1)
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
Evas_Coord w = 120;
Evas_Coord h = 160;
Evas_Coord x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
eo_do(images[i], evas_obj_position_set(x, y));
(*itr).position_set(x, y);
}
}
FPS_STD(NAME);

View File

@ -25,16 +25,15 @@ static efl::eina::list<evas::image> images;
/* setup */
static void _setup(void)
{
int i;
evas::canvas canvas(::eo_ref(G_evas));
srnd();
for (i = 0; i < OBNUM; i++)
for (int i = 0; i < OBNUM; i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(o);
if (i > (OBNUM / 2))
{
eo_do(o, efl_file_set(build_path("logo.png"), NULL));
o.file_set(build_path("logo.png"), "");
}
else
{
@ -42,14 +41,12 @@ static void _setup(void)
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
eo_do(o,
efl_file_set(build_path("image.png"), NULL),
evas_obj_position_set(x, y));
o.file_set(build_path("image.png"), "");
o.position_set(x, y);
}
eo_do(o,
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_visibility_set(EINA_TRUE));
o.fill_set(0, 0, 120, 160);
o.evas::object::size_set(120, 160);
o.visibility_set(true);
}
done = 0;
}
@ -63,19 +60,18 @@ static void _cleanup()
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i++)
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
{
if (i > (OBNUM / 2))
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
Evas_Coord w = 120;
Evas_Coord h = 160;
Evas_Coord x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
eo_do(images[i], evas_obj_position_set(x, y));
(*itr).position_set(x, y);
}
}
FPS_STD(NAME);

View File

@ -28,16 +28,15 @@ static efl::eina::list<evas::image> images;
/* setup */
static void _setup(void)
{
int i;
evas::canvas canvas(::eo_ref(G_evas));
srnd();
for (i = 0; i < OBNUM; i++)
for (int i = 0; i < OBNUM; i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(o);
if (i > (OBNUM / 2))
{
eo_do(o, efl_file_set(build_path("logo.png"), NULL));
o.file_set(build_path("logo.png"), "");
}
else
{
@ -45,14 +44,12 @@ static void _setup(void)
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
eo_do(o,
efl_file_set(build_path("image.png"), NULL),
evas_obj_position_set(x, y));
o.file_set(build_path("image.png"), "");
o.position_set(x, y);
}
eo_do(o,
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_visibility_set(EINA_TRUE));
o.fill_set(0, 0, 120, 160);
o.evas::object::size_set(120, 160);
o.visibility_set(true);
}
done = 0;
}
@ -66,19 +63,18 @@ static void _cleanup()
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i++)
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++)
{
if (i > (OBNUM / 2))
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
Evas_Coord w = 120;
Evas_Coord h = 160;
Evas_Coord x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
eo_do(images[i], evas_obj_position_set(x, y));
(*itr).position_set(x, y);
}
}
FPS_STD(NAME);

View File

@ -26,31 +26,26 @@ static efl::eina::list<evas::image> images;
/* setup */
static void _setup(void)
{
int i;
evas::canvas canvas(::eo_ref(G_evas));
srnd();
for (i = 0; i < OBNUM; i++)
for (int i = 0; i < OBNUM; i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(o);
if (i > (OBNUM / 2))
{
eo_do(o, efl_file_set(build_path("logo.png"), NULL));
o.file_set(build_path("logo.png"), "");
}
else
{
Evas_Coord x, y;
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
eo_do(o,
efl_file_set(build_path("image.png"), NULL),
evas_obj_position_set(x, y));
Evas_Coord x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
Evas_Coord y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
o.file_set(build_path("image.png"), "");
o.position_set(x, y);
}
eo_do(o,
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_visibility_set(EINA_TRUE));
o.fill_set(0, 0, 120, 160);
o.size_set(120, 160);
o.visibility_set(true);
}
done = 0;
}
@ -64,19 +59,18 @@ static void _cleanup()
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i++)
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
{
if (i > (OBNUM / 2))
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
Evas_Coord w = 120;
Evas_Coord h = 160;
Evas_Coord x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
eo_do(images[i], evas_obj_position_set(x, y));
(*itr).position_set(x, y);
}
}
FPS_STD(NAME);

View File

@ -27,31 +27,26 @@ static efl::eina::list<evas::image> images;
/* setup */
static void _setup(void)
{
int i;
evas::canvas canvas(::eo_ref(G_evas));
srnd();
for (i = 0; i < OBNUM; i++)
for (int i = 0; i < OBNUM; i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(o);
if (i > (OBNUM / 2))
{
eo_do(o, efl_file_set(build_path("logo.png"), NULL));
o.file_set(build_path("logo.png"), "");
}
else
{
Evas_Coord x, y;
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
eo_do(o,
efl_file_set(build_path("image.png"), NULL),
evas_obj_position_set(x, y));
Evas_Coord x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
Evas_Coord y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
o.file_set(build_path("image.png"), "");
o.position_set(x, y);
}
eo_do(o,
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_visibility_set(EINA_TRUE));
o.fill_set(0, 0, 120, 160);
o.size_set(120, 160);
o.visibility_set(true);
}
done = 0;
}
@ -65,19 +60,18 @@ static void _cleanup()
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i++)
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
{
if (i > (OBNUM / 2))
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
Evas_Coord w = 120;
Evas_Coord h = 160;
Evas_Coord x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
eo_do(images[i], evas_obj_position_set(x, y));
(*itr).position_set(x, y);
}
}
FPS_STD(NAME);

View File

@ -24,16 +24,14 @@ static efl::eina::list<evas::image> images;
/* setup */
static void _setup(void)
{
int i;
evas::canvas canvas(::eo_ref(G_evas));
for (i = 0; i < OBNUM; i++)
for (int i = 0; i < OBNUM; i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(o);
eo_do(o,
efl_file_set(build_path("logo.png"), NULL),
efl_image_smooth_scale_set(1),
evas_obj_visibility_set(EINA_TRUE));
o.file_set(build_path("logo.png"), "");
o.smooth_scale_set(1);
o.visibility_set(true);
}
done = 0;
}
@ -47,22 +45,20 @@ static void _cleanup()
/* 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++)
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
{
w0 = 80;
h0 = 80;
w = 40 + ((i % 3) * (w0 / 2));
h = 40 + ((i % 3) * (h0 / 2));
x = (win_w / 2) - (w / 2);
Evas_Coord w0 = 80;
Evas_Coord h0 = 80;
Evas_Coord w = 40 + ((i % 3) * (w0 / 2));
Evas_Coord h = 40 + ((i % 3) * (h0 / 2));
Evas_Coord x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
eo_do(images[i],
evas_obj_position_set(x, y),
evas_obj_size_set(w, h),
evas_obj_image_fill_set(0, 0, w, h));
(*itr).position_set(x, y);
(*itr).evas::object::size_set(w, h);
(*itr).fill_set(0, 0, w, h);
}
FPS_STD(NAME);
}

View File

@ -23,16 +23,14 @@ static efl::eina::list<evas::image> images;
/* setup */
static void _setup(void)
{
int i;
evas::canvas canvas(::eo_ref(G_evas));
for (i = 0; i < OBNUM; i++)
for (int i = 0; i < OBNUM; i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(o);
eo_do(o,
efl_file_set(build_path("logo.png"), NULL),
efl_image_smooth_scale_set(1),
evas_obj_visibility_set(EINA_TRUE));
o.file_set(build_path("logo.png"), "");
o.smooth_scale_set(1);
o.visibility_set(true);
}
done = 0;
}
@ -46,22 +44,20 @@ static void _cleanup()
/* 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++)
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
{
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);
Evas_Coord w0 = 80;
Evas_Coord h0 = 80;
Evas_Coord w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
Evas_Coord h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
Evas_Coord x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
eo_do(images[i],
evas_obj_position_set(x, y),
evas_obj_size_set(w, h),
evas_obj_image_fill_set(0, 0, w, h));
(*itr).position_set(x, y);
(*itr).size_set(w, h);
(*itr).fill_set(0, 0, w, h);
}
FPS_STD(NAME);
}

View File

@ -23,16 +23,14 @@ static efl::eina::list<evas::image> images;
/* setup */
static void _setup(void)
{
int i;
evas::canvas canvas(::eo_ref(G_evas));
for (i = 0; i < OBNUM; i++)
for (int i = 0; i < OBNUM; i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(o);
eo_do(o,
efl_file_set(build_path("image.png"), NULL),
efl_image_smooth_scale_set(1),
evas_obj_visibility_set(EINA_TRUE));
o.file_set(build_path("image.png"), "");
o.smooth_scale_set(1);
o.visibility_set(true);
}
done = 0;
}
@ -46,22 +44,20 @@ static void _cleanup()
/* 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++)
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
{
w0 = 80;
h0 = 80;
w = 40 + ((i % 3) * (w0 / 2));
h = 40 + ((i % 3) * (h0 / 2));
x = (win_w / 2) - (w / 2);
Evas_Coord w0 = 80;
Evas_Coord h0 = 80;
Evas_Coord w = 40 + ((i % 3) * (w0 / 2));
Evas_Coord h = 40 + ((i % 3) * (h0 / 2));
Evas_Coord x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
eo_do(images[i],
evas_obj_position_set(x, y),
evas_obj_size_set(w, h),
evas_obj_image_fill_set(0, 0, w, h));
(*itr).position_set(x, y);
(*itr).size_set(w, h);
(*itr).fill_set(0, 0, w, h);
}
FPS_STD(NAME);
}

View File

@ -23,16 +23,14 @@ static efl::eina::list<evas::image> images;
/* setup */
static void _setup(void)
{
int i;
evas::canvas canvas(::eo_ref(G_evas));
for (i = 0; i < OBNUM; i++)
for (int i = 0; i < OBNUM; i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(o);
eo_do(o,
efl_file_set(build_path("image.png"), NULL),
efl_image_smooth_scale_set(1),
evas_obj_visibility_set(EINA_TRUE));
efl_file_set(build_path("image.png"), "");
efl_image_smooth_scale_set(1);
evas_obj_visibility_set(true);
}
done = 0;
}
@ -46,22 +44,20 @@ static void _cleanup()
/* 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++)
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
{
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);
Evas_Coord w0 = 80;
Evas_Coord h0 = 80;
Evas_Coord w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
Evas_Coord h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
Evas_Coord x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
eo_do(images[i],
evas_obj_position_set(x, y),
evas_obj_size_set(w, h),
evas_obj_image_fill_set(0, 0, w, h));
(*itr).position_set(x, y);
(*itr).size_set(w, h);
(*itr).fill_set(0, 0, w, h);
}
FPS_STD(NAME);
}

View File

@ -23,17 +23,15 @@ static efl::eina::list<evas::image> images;
/* setup */
static void _setup(void)
{
int i;
evas::canvas canvas(::eo_ref(G_evas));
for (i = 0; i < OBNUM; i++)
for (int i = 0; i < OBNUM; i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(o);
eo_do(o,
efl_file_set(build_path("bar.png"), NULL),
evas_obj_image_border_set(6, 6, 6, 6),
evas_obj_image_border_center_fill_set(EVAS_BORDER_FILL_SOLID),
evas_obj_visibility_set(EINA_TRUE));
o.file_set(build_path("bar.png"), "");
o.border_set(6, 6, 6, 6);
o.border_center_fill_set(EVAS_BORDER_FILL_SOLID);
o.visibility_set(true);
}
done = 0;
}
@ -47,22 +45,20 @@ static void _cleanup()
/* 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++)
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
{
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);
Evas_Coord w0 = 80;
Evas_Coord h0 = 80;
Evas_Coord w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
Evas_Coord h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
Evas_Coord x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
eo_do(images[i],
evas_obj_position_set(x, y),
evas_obj_size_set(w, h),
evas_obj_image_fill_set(0, 0, w, h));
(*itr).position_set(x, y);
(*itr).evas::object::size_set(w, h);
(*itr).fill_set(0, 0, w, h);
}
FPS_STD(NAME);
}

View File

@ -23,19 +23,17 @@ static efl::eina::list<evas::image> images;
/* setup */
static void _setup(void)
{
int i;
evas::canvas canvas(::eo_ref(G_evas));
for (i = 0; i < OBNUM; i++)
for (int i = 0; i < OBNUM; i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(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_image_border_set(43, 48, 48, 83),
evas_obj_image_border_center_fill_set(EVAS_BORDER_FILL_SOLID),
evas_obj_visibility_set(EINA_TRUE));
o.file_set(build_path("logo.png"), "");
o.fill_set(0, 0, 120, 160);
o.evas::object::size_set(120, 160);
o.border_set(43, 48, 48, 83);
o.border_center_fill_set(EVAS_BORDER_FILL_SOLID);
o.visibility_set(true);
}
done = 0;
}
@ -49,17 +47,16 @@ static void _cleanup()
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i++)
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
Evas_Coord w = 120;
Evas_Coord h = 160;
Evas_Coord x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
eo_do(images[i], evas_obj_position_set(x, y));
(*itr).position_set(x, y);
}
FPS_STD(NAME);
}

View File

@ -23,17 +23,15 @@ static efl::eina::list<evas::image> images;
/* setup */
static void _setup(void)
{
int i;
evas::canvas canvas(::eo_ref(G_evas));
for (i = 0; i < OBNUM; i++)
for (int i = 0; i < OBNUM; i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(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));
efl_file_set(build_path("logo.png"), "");
o.fill_set(0, 0, 120, 160);
o.evas::object::size_set(120, 160);
o.visibility_set(true);
}
done = 0;
}
@ -47,17 +45,16 @@ static void _cleanup()
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i++)
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
Evas_Coord w = 120;
Evas_Coord h = 160;
Evas_Coord x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
eo_do(images[i], evas_obj_position_set(x, y));
(*itr).position_set(x, y);
}
FPS_STD(NAME);
}

View File

@ -24,23 +24,21 @@ static efl::eina::list<evas::image> images;
/* setup */
static void _setup(void)
{
Evas_Object *o;
evas::canvas canvas(::eo_ref(G_evas));
o = eo_add(EVAS_IMAGE_CLASS, G_evas);
images[0] = o;
eo_do(o,
efl_file_set(build_path("im1.png"), NULL),
evas_obj_image_fill_set(0, 0, 720, 420),
evas_obj_size_set(720, 420),
evas_obj_visibility_set(EINA_TRUE));
evas::image o1(efl::eo::parent = canvas);
images.push_back(o1);
o1.file_set(build_path("im1.png"), "");
o1.fill_set(0, 0, 720, 420);
o1.evas::object::size_set(720, 420);
o1.visibility_set(true);
o = eo_add(EVAS_IMAGE_CLASS, G_evas);
images[1] = o;
eo_do(o,
efl_file_set(build_path("im2.png"), NULL),
evas_obj_image_fill_set(0, 0, 720, 420),
evas_obj_size_set(720, 420),
evas_obj_visibility_set(EINA_TRUE));
evas::image o2(efl::eo::parent = canvas);
images.push_back(o2);
o2.file_set(build_path("im2.png"), "");
o2.fill_set(0, 0, 720, 420);
o2.evas::object::size_set(720, 420);
o2.visibility_set(true);
done = 0;
}
@ -48,18 +46,15 @@ static void _setup(void)
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < 2; i++) eo_del(images[i]);
images.clear();
}
/* loop - do things */
static void _loop(double t, int f)
{
int a;
a = f & 0x1f;
int a = f & 0x1f;
a = ((a << 3) | (a >> 2)) & 0xff;
eo_do(images[1], evas_obj_color_set(a, a, a, a));
images.back().color_set(a, a, a, a);
FPS_STD(NAME);
}

View File

@ -24,20 +24,18 @@ static efl::eina::list<evas::image> images;
/* setup */
static void _setup(void)
{
int i;
evas::canvas canvas(::eo_ref(G_evas));
for (i = 0; i < 1; i++)
for (int i = 0; i < 1; i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(o);
eo_do(o,
evas_obj_image_content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC),
evas_obj_image_colorspace_set(EVAS_COLORSPACE_ARGB8888),
evas_obj_image_size_set(640, 480),
evas_obj_image_alpha_set(0),
evas_obj_image_fill_set(0, 0, 640, 480),
evas_obj_size_set(640, 480),
evas_obj_visibility_set(EINA_TRUE));
o.content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC);
o.colorspace_set(EVAS_COLORSPACE_ARGB8888);
o.size_set(640, 480);
o.alpha_set(0);
o.fill_set(0, 0, 640, 480);
o.evas::object::size_set(640, 480);
o.visibility_set(true);
}
done = 0;
}
@ -45,29 +43,26 @@ static void _setup(void)
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < 1; i++) eo_del(images[i]);
images.clear();
}
/* loop - do things */
static void _loop(double t, int f)
{
int i, st;
Evas_Coord x, y, w, h;
for (i = 0; i < 1; i++)
int st;
auto itr = images.begin();
for (int i = 0; i < 1; i++, ++itr)
{
unsigned int *data, *p;
w = 640;
h = 480;
x = (win_w / 2) - (w / 2);
y = (win_h / 2) - (h / 2);
eo_do(images[i],
evas_obj_position_set(x, y),
evas_obj_size_set(w, h),
evas_obj_image_fill_set(0, 0, w, h),
data = evas_obj_image_data_get(1),
st = evas_obj_image_stride_get());
Evas_Coord w = 640;
Evas_Coord h = 480;
Evas_Coord x = (win_w / 2) - (w / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
(*itr).position_set(x, y);
(*itr).evas::object::size_set(w, h);
(*itr).fill_set(0, 0, w, h);
data = (*itr).data_get(1);
st = (*itr).stride_get(); // XXX
st = st >> 2;
p = data;
for (y = 0; y < h; y++)
@ -79,9 +74,8 @@ static void _loop(double t, int f)
}
p += (st - w);
}
eo_do(images[i],
evas_obj_image_data_set(data),
evas_obj_image_data_update_add( 0, 0, w, h));
(*itr).data_set(data);
(*itr).data_update_add( 0, 0, w, h);
}
FPS_STD(NAME);
}

View File

@ -24,20 +24,18 @@ static efl::eina::list<evas::image> images;
/* setup */
static void _setup(void)
{
int i;
evas::canvas canvas(::eo_ref(G_evas));
for (i = 0; i < 1; i++)
for (int i = 0; i < 1; i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(o);
eo_do(o,
evas_obj_image_content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC),
evas_obj_image_colorspace_set(EVAS_COLORSPACE_ARGB8888),
evas_obj_image_size_set(640, 480),
evas_obj_image_alpha_set(1),
evas_obj_image_fill_set(0, 0, 640, 480),
evas_obj_size_set(640, 480),
evas_obj_visibility_set(EINA_TRUE));
o.content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC);
o.colorspace_set(EVAS_COLORSPACE_ARGB8888);
o.size_set(640, 480);
o.alpha_set(1);
o.fill_set(0, 0, 640, 480);
o.evas::object::size_set(640, 480);
o.visibility_set(true);
}
done = 0;
}
@ -45,29 +43,27 @@ static void _setup(void)
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < 1; i++) eo_del(images[i]);
images.clear();
}
/* loop - do things */
static void _loop(double t, int f)
{
int i, st;
Evas_Coord x, y, w, h;
for (i = 0; i < 1; i++)
int st;
auto itr = images.begin();
for (i = 0; i < 1; i++, ++itr)
{
unsigned int *data, *p;
int a, r, g, b;
w = 640;
h = 480;
x = (win_w / 2) - (w / 2);
y = (win_h / 2) - (h / 2);
eo_do(images[i],
evas_obj_position_set(x, y),
evas_obj_size_set(w, h),
evas_obj_image_fill_set(0, 0, w, h),
data = evas_obj_image_data_get(1),
st = evas_obj_image_stride_get());
Evas_Coord w = 640;
Evas_Coord h = 480;
Evas_Coord x = (win_w / 2) - (w / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
(*itr).evas::object::position_set(x, y);
(*itr).evas::object::size_set(w, h);
(*itr).fill_set(0, 0, w, h);
data = (*itr).data_get(1);
st = evas_obj_image_stride_get();
st = st >> 2;
p = data;
for (y = 0; y < h; y++)
@ -90,9 +86,8 @@ static void _loop(double t, int f)
}
p += (st - w);
}
eo_do(images[i],
evas_obj_image_data_set(data),
evas_obj_image_data_update_add( 0, 0, w, h));
(*itr).data_set(data);
(*itr).data_update_add( 0, 0, w, h);
}
FPS_STD(NAME);
}

View File

@ -25,26 +25,22 @@ static unsigned char *yp = NULL, *up = NULL, *vp = NULL;
/* setup */
static void _setup(void)
{
int i, y;
FILE *f;
unsigned char **data, **lp;
evas::canvas canvas(::eo_ref(G_evas));
for (i = 0; i < 1; i++)
for (int i = 0; i < 1; i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(o);
eo_do(o,
evas_obj_image_content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC),
evas_obj_image_colorspace_set(EVAS_COLORSPACE_YCBCR422P601_PL),
evas_obj_image_size_set(640, 480),
evas_obj_image_alpha_set(0),
evas_obj_image_fill_set(0, 0, 640, 480),
evas_obj_size_set(640, 480),
evas_obj_visibility_set(EINA_TRUE));
o.content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC);
o.colorspace_set(EVAS_COLORSPACE_YCBCR422P601_PL);
o.size_set(640, 480);
o.alpha_set(0);
o.fill_set(0, 0, 640, 480);
o.evas::object::size_set(640, 480);
o.visibility_set(true);
yp = malloc(640 * 480);
up = malloc(320 * 240);
vp = malloc(320 * 240);
f = fopen(build_path("tp.yuv"), "rb");
FILE *f = fopen(build_path("tp.yuv"), "rb");
if (f)
{
fread(yp, 640 * 480, 1, f);
@ -52,24 +48,24 @@ static void _setup(void)
fread(vp, 320 * 240, 1, f);
fclose(f);
}
data = evas_object_image_data_get(images[i], 1);
lp = data;
for (y = 0; y < 480; y++)
unsigned char **data = evas_object_image_data_get(images[i], 1);
unsigned char **lp = data;
for (int y = 0; y < 480; y++)
{
*lp = yp + (y * 640);
lp++;
}
for (y = 0; y < 240; y++)
for (int y = 0; y < 240; y++)
{
*lp = up + (y * 320);
lp++;
}
for (y = 0; y < 240; y++)
for (int y = 0; y < 240; y++)
{
*lp = vp + (y * 320);
lp++;
}
eo_do(images[i], evas_obj_image_data_set(data));
o.data_set(data);
}
done = 0;
}
@ -77,8 +73,7 @@ static void _setup(void)
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < 1; i++) eo_del(images[i]);
images.clear();
free(yp);
free(up);
free(vp);
@ -87,19 +82,17 @@ static void _cleanup(void)
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < 1; i++)
auto itr = images.begin();
for (int i = 0; i < 1; i++, ++itr)
{
w = 640;
h = 480;
x = (win_w / 2) - (w / 2);
y = (win_h / 2) - (h / 2);
eo_do(images[i],
evas_obj_position_set(x, y),
evas_obj_size_set(w, h),
evas_obj_image_fill_set(0, 0, w, h),
evas_obj_image_data_update_add( 0, 0, 640, 480));
Evas_Coord w = 640;
Evas_Coord h = 480;
Evas_Coord x = (win_w / 2) - (w / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
(*itr).position_set(x, y);
(*itr).evas::object::size_set(w, h);
(*itr).fill_set(0, 0, w, h);
(*itr).data_update_add( 0, 0, 640, 480);
}
FPS_STD(NAME);
}

View File

@ -25,27 +25,23 @@ static unsigned char *yp = NULL, *up = NULL, *vp = NULL;
/* setup */
static void _setup(void)
{
int i, y;
FILE *f;
unsigned char **data, **lp;
evas::canvas canvas(::eo_ref(G_evas));
for (i = 0; i < 1; i++)
for (int i = 0; i < 1; i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(o);
eo_do(o,
evas_obj_image_content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC),
evas_obj_image_colorspace_set(EVAS_COLORSPACE_YCBCR422P601_PL),
evas_obj_image_size_set(640, 480),
evas_obj_image_alpha_set(0),
evas_obj_image_fill_set(0, 0, 640, 480),
evas_obj_size_set(640, 480),
efl_image_smooth_scale_set(0),
evas_obj_visibility_set(EINA_TRUE));
o.content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC);
o.colorspace_set(EVAS_COLORSPACE_YCBCR422P601_PL);
o.size_set(640, 480);
o.alpha_set(0);
o.fill_set(0, 0, 640, 480);
o.evas::object::size_set(640, 480);
o.smooth_scale_set(0);
o.visibility_set(true);
yp = malloc(640 * 480);
up = malloc(320 * 240);
vp = malloc(320 * 240);
f = fopen(build_path("tp.yuv"), "rb");
FILE *f = fopen(build_path("tp.yuv"), "rb");
if (f)
{
fread(yp, 640 * 480, 1, f);
@ -53,24 +49,24 @@ static void _setup(void)
fread(vp, 320 * 240, 1, f);
fclose(f);
}
data = evas_object_image_data_get(images[i], 1);
lp = data;
for (y = 0; y < 480; y++)
unsigned char **data = o.data_get(1); // XXX
unsigned char **lp = data;
for (int y = 0; y < 480; y++)
{
*lp = yp + (y * 640);
lp++;
}
for (y = 0; y < 240; y++)
for (int y = 0; y < 240; y++)
{
*lp = up + (y * 320);
lp++;
}
for (y = 0; y < 240; y++)
for (int y = 0; y < 240; y++)
{
*lp = vp + (y * 320);
lp++;
}
eo_do(images[i], evas_obj_image_data_set(data));
o.data_set(data);
}
done = 0;
}
@ -78,8 +74,7 @@ static void _setup(void)
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < 1; i++) eo_del(images[i]);
images.clear();
free(yp);
free(up);
free(vp);
@ -88,25 +83,20 @@ static void _cleanup(void)
/* 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);
evas_map_smooth_set(m, 0);
for (i = 0; i < 1; i++)
auto itr = images.begin();
for (int i = 0; i < 1; i++, ++itr)
{
w = 640;
h = 480;
x = (win_w / 2) - (w / 2);
y = (win_h / 2) - (h / 2);
Evas_Coord w = 640;
Evas_Coord h = 480;
Evas_Coord x = (win_w / 2) - (w / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0);
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
eo_do(images[i],
evas_obj_map_enable_set(1),
evas_obj_map_set(m));
(*itr).map_enable_set(1);
(*itr).map_set(m);
}
FPS_STD(NAME);
}

View File

@ -77,8 +77,7 @@ static void _setup(void)
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < 1; i++) eo_del(images[i]);
for (int i = 0; i < 1; i++) eo_del(images[i]);
free(yp);
free(up);
free(vp);
@ -87,11 +86,10 @@ static void _cleanup(void)
/* 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++)
for (int i = 0; i < 1; i++)
{
w = 640;
h = 480;

View File

@ -25,26 +25,23 @@ static unsigned char *yp = NULL, *up = NULL, *vp = NULL;
/* setup */
static void _setup(void)
{
int i, y;
FILE *f;
unsigned char **data, **lp;
evas::canvas canvas(::eo_ref(G_evas));
for (i = 0; i < 1; i++)
for (int i = 0; i < 1; i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(o);
eo_do(o,
evas_obj_image_content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC),
evas_obj_image_colorspace_set(EVAS_COLORSPACE_YCBCR422P601_PL),
evas_obj_image_size_set(320, 480),
evas_obj_image_alpha_set(0),
evas_obj_image_fill_set(0, 0, 640, 480),
evas_obj_size_set(640, 480),
evas_obj_visibility_set(EINA_TRUE));
o.content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC);
o.colorspace_set(EVAS_COLORSPACE_YCBCR422P601_PL);
o.size_set(320, 480);
o.alpha_set(0);
o.fill_set(0, 0, 640, 480);
o.evas::object::size_set(640, 480);
o.evas::object::visibility_set(true);
yp = malloc(640 * 480);
up = malloc(320 * 240);
vp = malloc(320 * 240);
f = fopen(build_path("tp.yuv"), "rb");
FILE *f = fopen(build_path("tp.yuv"), "rb");
if (f)
{
fread(yp, 640 * 480, 1, f);
@ -52,28 +49,27 @@ static void _setup(void)
fread(vp, 320 * 240, 1, f);
fclose(f);
}
data = evas_object_image_data_get(images[i], 1);
data = o.data_get(1);
if (data)
{
lp = data;
for (y = 0; y < 480; y++)
for (int y = 0; y < 480; y++)
{
*lp = yp + (y * 640);
lp++;
}
for (y = 0; y < 240; y++)
for (int y = 0; y < 240; y++)
{
*lp = up + (y * 320);
lp++;
}
for (y = 0; y < 240; y++)
for (int y = 0; y < 240; y++)
{
*lp = vp + (y * 320);
lp++;
}
eo_do(images[i],
evas_obj_image_data_set(data),
evas_obj_image_data_update_add( 0, 0, 320, 480));
o.data_set(data);
o.data_update_add( 0, 0, 320, 480);
}
}
done = 0;
@ -82,8 +78,7 @@ static void _setup(void)
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < 1; i++) eo_del(images[i]);
images.clear();
free(yp);
free(up);
free(vp);
@ -92,20 +87,16 @@ static void _cleanup(void)
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < 1; i++)
auto itr = images.begin();
for (int i = 0; i < 1; i++, ++itr)
{
unsigned char **data, **lp;
w = 640;
h = 480;
x = (win_w / 2) - (w / 2);
y = (win_h / 2) - (h / 2);
eo_do(images[i],
evas_obj_position_set(x, y),
evas_obj_size_set(w, h),
evas_obj_image_fill_set(0, 0, w, h));
Evas_Coord w = 640;
Evas_Coord h = 480;
Evas_Coord x = (win_w / 2) - (w / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
(*itr).evas::object::position_set(x, y);
(*itr).evas::object::size_set(w, h);
(*itr).fill_set(0, 0, w, h);
w = 320 - 16 + f;
if (w < 1) w = 1;
@ -113,29 +104,28 @@ static void _loop(double t, int f)
w &= ~0x1;
eo_do(images[i], evas_obj_image_size_set(w, 480));
data = evas_object_image_data_get(images[i], 1);
(*itr).size_set(w, 480);
unsigned char **data = (*itr).data_get(1);
if (data)
{
lp = data;
for (y = 0; y < 480; y++)
unsigned char **lp = data;
for (int y = 0; y < 480; y++)
{
*lp = yp + (y * 640);
lp++;
}
for (y = 0; y < 240; y++)
for (int y = 0; y < 240; y++)
{
*lp = up + (y * 320);
lp++;
}
for (y = 0; y < 240; y++)
for (int y = 0; y < 240; y++)
{
*lp = vp + (y * 320);
lp++;
}
eo_do(images[i],
evas_obj_image_data_set(data),
evas_obj_image_data_update_add( 0, 0, w, 480));
o.data_set(data);
o.data_update_add(0, 0, w, 480);
}
}
FPS_STD(NAME);

View File

@ -13,7 +13,7 @@
#include "main.h"
#define EXPEDITE_CXX_TEST_IMPL
#include "image_map_3d_1_capi.h""
#include "image_map_3d_1_capi.h"
typedef struct _Point
{
@ -48,13 +48,12 @@ static Cube *
_cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d)
{
Cube *c;
int i;
w -= (w / 2);
h -= (h / 2);
d -= (d / 2);
c = calloc(1, sizeof(Cube));
for (i = 0; i < 6; i++)
c = static_cast<Cube*>(calloc(1, sizeof(Cube)));
for (int i = 0; i < 6; i++)
{
Evas_Object *o;
char buf[256];
@ -175,9 +174,8 @@ _cube_pos(Cube *c,
static void
_cube_free(Cube *c)
{
int i;
for (i = 0; i < 6; i++) eo_del(c->side[i].o);
for (int i = 0; i < 6; i++) eo_del(c->side[i].o);
free(c);
}

View File

@ -13,7 +13,7 @@
#include "main.h"
#define EXPEDITE_CXX_TEST_IMPL
#include "image_map_3d_2_capi.h""
#include "image_map_3d_2_capi.h"
typedef struct _Point
{
@ -48,13 +48,12 @@ static Cube *
_cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d)
{
Cube *c;
int i;
w -= (w / 2);
h -= (h / 2);
d -= (d / 2);
c = calloc(1, sizeof(Cube));
for (i = 0; i < 6; i++)
c = static_cast<Cube*>(calloc(1, sizeof(Cube)));
for (int i = 0; i < 6; i++)
{
Evas_Object *o;
char buf[256];
@ -173,9 +172,8 @@ _cube_pos(Cube *c,
static void
_cube_free(Cube *c)
{
int i;
for (i = 0; i < 6; i++) eo_del(c->side[i].o);
for (int i = 0; i < 6; i++) eo_del(c->side[i].o);
free(c);
}

View File

@ -13,7 +13,7 @@
#include "main.h"
#define EXPEDITE_CXX_TEST_IMPL
#include "image_map_3d_3_capi.h""
#include "image_map_3d_3_capi.h"
typedef struct _Point
{
@ -48,13 +48,12 @@ static Cube *
_cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d)
{
Cube *c;
int i;
w -= (w / 2);
h -= (h / 2);
d -= (d / 2);
c = calloc(1, sizeof(Cube));
for (i = 0; i < 6; i++)
for (int i = 0; i < 6; i++)
{
Evas_Object *o;
char buf[256];
@ -167,9 +166,8 @@ _cube_pos(Cube *c,
static void
_cube_free(Cube *c)
{
int i;
for (i = 0; i < 6; i++) eo_del(c->side[i].o);
for (int i = 0; i < 6; i++) eo_del(c->side[i].o);
free(c);
}

View File

@ -13,7 +13,7 @@
#include "main.h"
#define EXPEDITE_CXX_TEST_IMPL
#include "image_map_3d_4_capi.h""
#include "image_map_3d_4_capi.h"
typedef struct _Point
{
@ -48,13 +48,12 @@ static Cube *
_cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d)
{
Cube *c;
int i;
w -= (w / 2);
h -= (h / 2);
d -= (d / 2);
c = calloc(1, sizeof(Cube));
for (i = 0; i < 6; i++)
for (int i = 0; i < 6; i++)
{
Evas_Object *o;
char buf[256];
@ -165,9 +164,8 @@ _cube_pos(Cube *c,
static void
_cube_free(Cube *c)
{
int i;
for (i = 0; i < 6; i++) eo_del(c->side[i].o);
for (int i = 0; i < 6; i++) eo_del(c->side[i].o);
free(c);
}

View File

@ -13,7 +13,7 @@
#include "main.h"
#define EXPEDITE_CXX_TEST_IMPL
#include "image_map_3d_5_capi.h""
#include "image_map_3d_5_capi.h"
typedef struct _Point
{
@ -48,13 +48,12 @@ static Cube *
_cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d)
{
Cube *c;
int i;
w -= (w / 2);
h -= (h / 2);
d -= (d / 2);
c = calloc(1, sizeof(Cube));
for (i = 0; i < 6; i++)
for (int i = 0; i < 6; i++)
{
Evas_Object *o;
char buf[256];
@ -175,9 +174,8 @@ _cube_pos(Cube *c,
static void
_cube_free(Cube *c)
{
int i;
for (i = 0; i < 6; i++) eo_del(c->side[i].o);
for (int i = 0; i < 6; i++) eo_del(c->side[i].o);
free(c);
}

View File

@ -13,7 +13,7 @@
#include "main.h"
#define EXPEDITE_CXX_TEST_IMPL
#include "image_map_3d_6_capi.h""
#include "image_map_3d_6_capi.h"
typedef struct _Point
{
@ -48,13 +48,12 @@ static Cube *
_cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d)
{
Cube *c;
int i;
w -= (w / 2);
h -= (h / 2);
d -= (d / 2);
c = calloc(1, sizeof(Cube));
for (i = 0; i < 6; i++)
for (int i = 0; i < 6; i++)
{
Evas_Object *o;
char buf[256];
@ -172,9 +171,8 @@ _cube_pos(Cube *c,
static void
_cube_free(Cube *c)
{
int i;
for (i = 0; i < 6; i++) eo_del(c->side[i].o);
for (int i = 0; i < 6; i++) eo_del(c->side[i].o);
free(c);
}

View File

@ -13,7 +13,7 @@
#include "main.h"
#define EXPEDITE_CXX_TEST_IMPL
#include "image_map_3d_flow_capi.h""
#include "image_map_3d_flow_capi.h"
/* standard var */
static int done = 0;
@ -22,36 +22,33 @@ static int done = 0;
/* private data */
static efl::eina::list<evas::image> images;
static Evas_Object *o_reflec[CNUM];
static efl::eina::list<evas::image> reflec;
/* setup */
static void _setup(void)
{
int i;
evas::canvas canvas(::eo_ref(G_evas));
for (i = 0; i < CNUM; i++)
for (int i = 0; i < CNUM; i++)
{
char buf[256];
evas::image o(efl::eo::parent = canvas);
images.push_back(o);
snprintf(buf, sizeof(buf), "cube%i.png", (i % 6) + 1);
eo_do(o,
efl_file_set(build_path(buf), NULL),
evas_obj_image_fill_set(0, 0, 256, 256),
evas_obj_size_set(256, 256),
efl_image_smooth_scale_set(0),
evas_obj_visibility_set(EINA_TRUE));
evas::image o1(efl::eo::parent = canvas);
images.push_back(o1);
snprintf(buf, sizeof(buf), "cube%i.png", (i % 6) + 1); // XXX
o1.file_set(build_path(buf), "");
o1.fill_set(0, 0, 256, 256);
o1.evas::object::size_set(256, 256);
o1.smooth_scale_set(0);
o1.visibility_set(true);
o = eo_add(EVAS_IMAGE_CLASS, G_evas);
o_reflec[i] = o;
evas::image o2(efl::eo::parent = canvas);
reflec.push_back(o1);
snprintf(buf, sizeof(buf), "cube%i.png", (i % 6) + 1);
eo_do(o,
efl_file_set(build_path(buf), NULL),
evas_obj_image_fill_set(0, 0, 256, 256),
evas_obj_size_set(256, 256),
efl_image_smooth_scale_set(0),
evas_obj_visibility_set(EINA_TRUE));
o2.file_set(build_path(buf), "");
o2.fill_set(0, 0, 256, 256);
o2.size_set(256, 256);
o2.smooth_scale_set(0);
o2.visibility_set(true);
}
done = 0;
}
@ -59,37 +56,34 @@ static void _setup(void)
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < CNUM; i++)
{
eo_del(images[i]);
eo_del(o_reflec[i]);
}
images.clear();
reflec.clear();
}
/* loop - do things */
static void _loop(double t, int f)
{
int i;
static Evas_Map *m = NULL;
Evas_Coord x, y, xx, yy, w, h, c, z;
int center = 150;
double ang, n;
if (!m) m = evas_map_new(4);
evas_map_smooth_set(m, 0);
for (i = 0; i < CNUM; i++)
auto it_i = images.begin();
auto it_r = reflec.begin();
for (int i = 0; i < CNUM; i++)
{
x = (win_w / 2);
y = (win_h / 2);
w = 256;
h = 256;
c = (i - (CNUM / 2)) * (w / 4);
++it_i;
++it_r;
Evas_Coord x = (win_w / 2);
Evas_Coord y = (win_h / 2);
Evas_Coord w = 256;
Evas_Coord h = 256;
Evas_Coord c = (i - (CNUM / 2)) * (w / 4);
c += (f % (6 * (w / 4)));
ang = (double)c / (double)center;
double ang = (double)c / (double)center;
if (ang > 0.0) ang = ang * ang;
else ang = -ang * ang;
ang *= -90.0;
@ -98,7 +92,7 @@ static void _loop(double t, int f)
if ((c > (-center)) && (c <= (center)))
{
n = (double)c / (double)center;
double n = (double)c / (double)center;
if (c > 0)
{
n = 1.0 - n;
@ -116,7 +110,7 @@ static void _loop(double t, int f)
else if (c > (center))
c = (c - center) + (center * 2);
z = 0;
Evas_Coord z = 0;
if ((c > (-center)) && (c <= (center)))
{
z = (c * (w / 2)) / center;
@ -127,20 +121,20 @@ static void _loop(double t, int f)
x += c;
x -= (w / 2);
xx = x + w;
Evas_Coord xx = x + w;
y -= (h / 2);
yy = y + h;
Evas_Coord yy = y + h;
if (c <= 0)
{
eo_do(images[i], evas_obj_raise());
eo_do(o_reflec[i], evas_obj_raise());
(*it_i).raise();
(*it_r).raise();
}
else
{
eo_do(images[i], evas_obj_lower());
eo_do(o_reflec[i], evas_obj_lower());
(*it_i).lower();
(*it_r).lower();
}
evas_map_point_coord_set (m, 0, x, y, -z);
@ -163,9 +157,8 @@ static void _loop(double t, int f)
x + (w / 2), y + (h / 2), 0);
evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), -256, 512);
eo_do(images[i],
evas_obj_map_enable_set(1),
evas_obj_map_set(m));
(*it_i).map_enable_set(1);
(*it_i).map_set(m);
evas_map_point_coord_set (m, 0, x, yy, -z);
evas_map_point_image_uv_set(m, 0, 0, 256);
@ -187,9 +180,8 @@ static void _loop(double t, int f)
x + (w / 2), y + (h / 2), 0);
evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), -256, 512);
eo_do(o_reflec[i],
evas_obj_map_enable_set(1),
evas_obj_map_set(m));
(*it_r).map_enable_set(1);
(*it_r).map_set(m);
}
FPS_STD(NAME);

View File

@ -24,9 +24,8 @@ static efl::eina::list<evas::image> images;
/* setup */
static void _setup(void)
{
int i;
evas::canvas canvas(::eo_ref(G_evas));
for (i = 0; i < (OBNUM / 2); i++)
for (int i = 0; i < (OBNUM / 2); i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(o);
@ -43,19 +42,17 @@ static void _setup(void)
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < (OBNUM / 2); i++) eo_del(images[i]);
for (int i = 0; i < (OBNUM / 2); i++) eo_del(images[i]);
}
/* 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);
evas_map_smooth_set(m, 0);
for (i = 0; i < (OBNUM / 2); i++)
for (int i = 0; i < (OBNUM / 2); i++)
{
w = 120;
h = 160;

View File

@ -24,9 +24,8 @@ static efl::eina::list<evas::image> images;
/* setup */
static void _setup(void)
{
int i;
evas::canvas canvas(::eo_ref(G_evas));
for (i = 0; i < (OBNUM / 2); i++)
for (int i = 0; i < (OBNUM / 2); i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(o);
@ -43,19 +42,17 @@ static void _setup(void)
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < (OBNUM / 2); i++) eo_del(images[i]);
for (int i = 0; i < (OBNUM / 2); i++) eo_del(images[i]);
}
/* 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);
evas_map_smooth_set(m, 0);
for (i = 0; i < (OBNUM / 2); i++)
for (int i = 0; i < (OBNUM / 2); i++)
{
w = 120;
h = 160;

View File

@ -24,17 +24,15 @@ static efl::eina::list<evas::image> images;
/* setup */
static void _setup(void)
{
int i;
evas::canvas canvas(::eo_ref(G_evas));
for (i = 0; i < (OBNUM / 2); i++)
for (int i = 0; i < (OBNUM / 2); i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(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));
efl_file_set(build_path("logo.png"), "");
o.image_fill_set(0, 0, 120, 160);
o.evas::object::size_set(120, 160);
o.visibility_set(true);
}
done = 0;
}
@ -42,24 +40,22 @@ static void _setup(void)
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < (OBNUM / 2); i++) eo_del(images[i]);
images.clear();
}
/* 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 < (OBNUM / 2); i++)
auto itr = images.begin();
for (int i = 0; i < (OBNUM / 2); i++, ++itr)
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
Evas_Coord w = 120;
Evas_Coord h = 160;
Evas_Coord x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0);
@ -71,9 +67,8 @@ static void _loop(double t, int f)
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
eo_do(images[i],
evas_obj_map_enable_set(1),
evas_obj_map_set(m));
(*itr).map_enable_set(1);
(*itr).map_set(m);
}
FPS_STD(NAME);
}

View File

@ -24,9 +24,8 @@ static efl::eina::list<evas::image> images;
/* setup */
static void _setup(void)
{
int i;
evas::canvas canvas(::eo_ref(G_evas));
for (i = 0; i < (OBNUM / 2); i++)
for (int i = 0; i < (OBNUM / 2); i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(o);
@ -42,18 +41,16 @@ static void _setup(void)
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < (OBNUM / 2); i++) eo_del(images[i]);
for (int i = 0; i < (OBNUM / 2); i++) eo_del(images[i]);
}
/* 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 < (OBNUM / 2); i++)
for (int i = 0; i < (OBNUM / 2); i++)
{
w = 120;
h = 160;

View File

@ -24,9 +24,8 @@ static efl::eina::list<evas::image> images;
/* setup */
static void _setup(void)
{
int i;
evas::canvas canvas(::eo_ref(G_evas));
for (i = 0; i < (OBNUM / 2); i++)
for (int i = 0; i < (OBNUM / 2); i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(o);
@ -43,19 +42,17 @@ static void _setup(void)
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < (OBNUM / 2); i++) eo_del(images[i]);
images.clear();
}
/* 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);
evas_map_smooth_set(m, 0);
for (i = 0; i < (OBNUM / 2); i++)
for (int i = 0; i < (OBNUM / 2); i++)
{
w = 120;
h = 160;

View File

@ -24,9 +24,8 @@ static efl::eina::list<evas::image> images;
/* setup */
static void _setup(void)
{
int i;
evas::canvas canvas(::eo_ref(G_evas));
for (i = 0; i < (OBNUM / 2); i++)
for (int i = 0; i < (OBNUM / 2); i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(o);
@ -43,19 +42,17 @@ static void _setup(void)
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < (OBNUM / 2); i++) eo_del(images[i]);
for (int i = 0; i < (OBNUM / 2); i++) eo_del(images[i]);
}
/* 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);
evas_map_smooth_set(m, 0);
for (i = 0; i < (OBNUM / 2); i++)
for (int i = 0; i < (OBNUM / 2); i++)
{
w = 120;
h = 160;

View File

@ -24,17 +24,15 @@ static efl::eina::list<evas::image> images;
/* setup */
static void _setup(void)
{
int i;
evas::canvas canvas(::eo_ref(G_evas));
for (i = 0; i < (OBNUM / 2); i++)
for (int i = 0; i < (OBNUM / 2); i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(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));
o.file_set(build_path("logo.png"), "");
o.image_fill_set(0, 0, 120, 160);
o.evas::object::size_set(120, 160);
o.visibility_set(true);
}
done = 0;
}
@ -42,24 +40,22 @@ static void _setup(void)
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < (OBNUM / 2); i++) eo_del(images[i]);
images.clear();
}
/* 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 < (OBNUM / 2); i++)
auto itr = images.begin();
for (int i = 0; i < (OBNUM / 2); i++, ++itr)
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
Eavs_Coord w = 120;
Eavs_Coord h = 160;
Eavs_Coord x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
Eavs_Coord y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0);
@ -71,9 +67,8 @@ static void _loop(double t, int f)
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
eo_do(images[i],
evas_obj_map_enable_set(1),
evas_obj_map_set(m));
(*itr).map_enable_set(1);
(*itr).map_set(m);
}
FPS_STD(NAME);
}

View File

@ -24,9 +24,8 @@ static efl::eina::list<evas::image> images;
/* setup */
static void _setup(void)
{
int i;
evas::canvas canvas(::eo_ref(G_evas));
for (i = 0; i < (OBNUM / 2); i++)
for (int i = 0; i < (OBNUM / 2); i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(o);
@ -42,18 +41,16 @@ static void _setup(void)
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < (OBNUM / 2); i++) eo_del(images[i]);
for (int i = 0; i < (OBNUM / 2); i++) eo_del(images[i]);
}
/* 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 < (OBNUM / 2); i++)
for (int i = 0; i < (OBNUM / 2); i++)
{
w = 120;
h = 160;

View File

@ -24,18 +24,16 @@ static efl::eina::list<evas::image> images;
/* setup */
static void _setup(void)
{
int i;
evas::canvas canvas(::eo_ref(G_evas));
for (i = 0; i < (OBNUM / 2); i++)
for (int i = 0; i < (OBNUM / 2); i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(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_visibility_set(EINA_TRUE));
o.file_set(build_path("logo.png"), "");
o.fill_set(0, 0, 120, 160);
o.evas::object::size_set(120, 160);
o.smooth_scale_set(0);
o.visibility_set(true);
}
done = 0;
}
@ -43,34 +41,31 @@ static void _setup(void)
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < (OBNUM / 2); i++) eo_del(images[i]);
images.clear();
}
/* 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);
evas_map_smooth_set(m, 0);
for (i = 0; i < (OBNUM / 2); i++)
auto itr = images.begin();
for (int i = 0; i < (OBNUM / 2); i++, ++itr)
{
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);
Evas_Coord w = 120;
Evas_Coord h = 160;
Evas_Coord x = (win_w / 2) - (w / 2);
Evas_Coord x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
Evas_Coord y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0);
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
eo_do(images[i],
evas_obj_map_enable_set(1),
evas_obj_map_set(m));
(*itr).evas_obj_map_enable_set(1);
(*itr).evas_obj_map_set(m);
}
FPS_STD(NAME);
}

View File

@ -24,9 +24,8 @@ static efl::eina::list<evas::image> images;
/* setup */
static void _setup(void)
{
int i;
evas::canvas canvas(::eo_ref(G_evas));
for (i = 0; i < (OBNUM / 2); i++)
for (int i = 0; i < (OBNUM / 2); i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(o);
@ -43,19 +42,17 @@ static void _setup(void)
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < (OBNUM / 2); i++) eo_del(images[i]);
for (int i = 0; i < (OBNUM / 2); i++) eo_del(images[i]);
}
/* 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);
evas_map_smooth_set(m, 0);
for (i = 0; i < (OBNUM / 2); i++)
for (int i = 0; i < (OBNUM / 2); i++)
{
w = 120;
h = 160;

View File

@ -24,16 +24,15 @@ static efl::eina::list<evas::image> images;
/* setup */
static void _setup(void)
{
int i;
evas::canvas canvas(::eo_ref(G_evas));
for (i = 0; i < (OBNUM / 2); i++)
for (int i = 0; i < (OBNUM / 2); i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(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));
o.file_set(build_path("logo.png"), "");
o.fill_set(0, 0, 120, 160);
o.evas::object::size_set(120, 160);
o.visibility_set(true);
}
done = 0;
}
@ -41,32 +40,30 @@ static void _setup(void)
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < (OBNUM / 2); i++) eo_del(images[i]);
images.clear();
}
/* 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 < (OBNUM / 2); i++)
auto itr = images.begin();
for (int i = 0; i < (OBNUM / 2); i++, ++itr)
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
Evas_Coord w = 120;
Evas_Coord h = 160;
Evas_Coord x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0);
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
eo_do(images[i], evas_obj_map_enable_set(1),
evas_obj_map_set(m));
(*itr).map_enable_set(1);
(*itr).map_set(m);
}
FPS_STD(NAME);
}

View File

@ -24,9 +24,8 @@ static efl::eina::list<evas::image> images;
/* setup */
static void _setup(void)
{
int i;
evas::canvas canvas(::eo_ref(G_evas));
for (i = 0; i < (OBNUM / 2); i++)
for (int i = 0; i < (OBNUM / 2); i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(o);
@ -42,18 +41,16 @@ static void _setup(void)
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < (OBNUM / 2); i++) eo_del(images[i]);
for (int i = 0; i < (OBNUM / 2); i++) eo_del(images[i]);
}
/* 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 < (OBNUM / 2); i++)
for (int i = 0; i < (OBNUM / 2); i++)
{
w = 120;
h = 160;

View File

@ -24,9 +24,8 @@ static efl::eina::list<evas::image> images;
/* setup */
static void _setup(void)
{
int i;
evas::canvas canvas(::eo_ref(G_evas));
for (i = 0; i < 1; i++)
for (int i = 0; i < 1; i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(o);
@ -41,16 +40,14 @@ static void _setup(void)
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < 1; i++) eo_del(images[i]);
for (int i = 0; i < 1; i++) eo_del(images[i]);
}
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < 1; i++)
for (int i = 0; i < 1; i++)
{
w = 640;
h = 480;