expedite-cxx: Fix position_set.
This commit is contained in:
parent
691498bfa6
commit
fb28488bdc
|
@ -40,7 +40,7 @@ static void _setup(void)
|
||||||
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
||||||
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
||||||
o.file_set(build_path("image.png"), "");
|
o.file_set(build_path("image.png"), "");
|
||||||
o.position_set(x, y);
|
o.evas::object::position_set(x, y);
|
||||||
}
|
}
|
||||||
o.fill_set(0, 0, 120, 160);
|
o.fill_set(0, 0, 120, 160);
|
||||||
o.evas::object::size_set(120, 160);
|
o.evas::object::size_set(120, 160);
|
||||||
|
|
|
@ -42,7 +42,7 @@ static void _setup(void)
|
||||||
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
||||||
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
||||||
o.file_set(build_path("image.png"), NULL);
|
o.file_set(build_path("image.png"), NULL);
|
||||||
o.position_set(x, y);
|
o.evas::object::position_set(x, y);
|
||||||
}
|
}
|
||||||
o.fill_set(0, 0, 120, 160);
|
o.fill_set(0, 0, 120, 160);
|
||||||
o.evas::object::size_set(120, 160);
|
o.evas::object::size_set(120, 160);
|
||||||
|
|
|
@ -43,7 +43,7 @@ static void _setup(void)
|
||||||
Evas_Coord x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
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);
|
Evas_Coord y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
||||||
o.file_set(build_path("image.png"), "");
|
o.file_set(build_path("image.png"), "");
|
||||||
o.position_set(x, y);
|
o.evas::object::position_set(x, y);
|
||||||
}
|
}
|
||||||
o.fill_set(0, 0, 120, 160);
|
o.fill_set(0, 0, 120, 160);
|
||||||
o.evas::object::size_set(120, 160);
|
o.evas::object::size_set(120, 160);
|
||||||
|
|
|
@ -43,7 +43,7 @@ static void _setup(void)
|
||||||
Evas_Coord x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
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);
|
Evas_Coord y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
||||||
o.file_set(build_path("image.png"), "");
|
o.file_set(build_path("image.png"), "");
|
||||||
o.position_set(x, y);
|
o.evas::object::position_set(x, y);
|
||||||
}
|
}
|
||||||
o.fill_set(0, 0, 120, 160);
|
o.fill_set(0, 0, 120, 160);
|
||||||
o.size_set(120, 160);
|
o.size_set(120, 160);
|
||||||
|
|
|
@ -45,7 +45,7 @@ static void _setup(void)
|
||||||
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
||||||
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
||||||
o.file_set(build_path("image.png"), "");
|
o.file_set(build_path("image.png"), "");
|
||||||
o.position_set(x, y);
|
o.evas::object::position_set(x, y);
|
||||||
}
|
}
|
||||||
o.fill_set(0, 0, 120, 160);
|
o.fill_set(0, 0, 120, 160);
|
||||||
o.evas::object::size_set(120, 160);
|
o.evas::object::size_set(120, 160);
|
||||||
|
|
|
@ -43,7 +43,7 @@ static void _setup(void)
|
||||||
Evas_Coord x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
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);
|
Evas_Coord y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
||||||
o.file_set(build_path("image.png"), "");
|
o.file_set(build_path("image.png"), "");
|
||||||
o.position_set(x, y);
|
o.evas::object::position_set(x, y);
|
||||||
}
|
}
|
||||||
o.fill_set(0, 0, 120, 160);
|
o.fill_set(0, 0, 120, 160);
|
||||||
o.evas::object::size_set(120, 160);
|
o.evas::object::size_set(120, 160);
|
||||||
|
|
|
@ -42,7 +42,7 @@ static void _setup(void)
|
||||||
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
||||||
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
||||||
o.file_set(build_path("image.png"), "");
|
o.file_set(build_path("image.png"), "");
|
||||||
o.position_set(x, y);
|
o.evas::object::position_set(x, y);
|
||||||
}
|
}
|
||||||
o.fill_set(0, 0, 120, 160);
|
o.fill_set(0, 0, 120, 160);
|
||||||
o.evas::object::size_set(120, 160);
|
o.evas::object::size_set(120, 160);
|
||||||
|
|
|
@ -45,7 +45,7 @@ static void _setup(void)
|
||||||
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
||||||
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
||||||
o.file_set(build_path("image.png"), "");
|
o.file_set(build_path("image.png"), "");
|
||||||
o.position_set(x, y);
|
o.evas::object::position_set(x, y);
|
||||||
}
|
}
|
||||||
o.fill_set(0, 0, 120, 160);
|
o.fill_set(0, 0, 120, 160);
|
||||||
o.evas::object::size_set(120, 160);
|
o.evas::object::size_set(120, 160);
|
||||||
|
|
|
@ -41,10 +41,10 @@ static void _setup(void)
|
||||||
Evas_Coord x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
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);
|
Evas_Coord y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
||||||
o.file_set(build_path("image.png"), "");
|
o.file_set(build_path("image.png"), "");
|
||||||
o.position_set(x, y);
|
o.evas::object::position_set(x, y);
|
||||||
}
|
}
|
||||||
o.fill_set(0, 0, 120, 160);
|
o.fill_set(0, 0, 120, 160);
|
||||||
o.size_set(120, 160);
|
o.evas::object::size_set(120, 160);
|
||||||
o.visibility_set(true);
|
o.visibility_set(true);
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
|
|
|
@ -42,7 +42,7 @@ static void _setup(void)
|
||||||
Evas_Coord x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
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);
|
Evas_Coord y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
||||||
o.file_set(build_path("image.png"), "");
|
o.file_set(build_path("image.png"), "");
|
||||||
o.position_set(x, y);
|
o.evas::object::position_set(x, y);
|
||||||
}
|
}
|
||||||
o.fill_set(0, 0, 120, 160);
|
o.fill_set(0, 0, 120, 160);
|
||||||
o.size_set(120, 160);
|
o.size_set(120, 160);
|
||||||
|
|
|
@ -25,10 +25,13 @@ static void _setup(void)
|
||||||
{
|
{
|
||||||
evas::canvas canvas(::eo_ref(G_evas));
|
evas::canvas canvas(::eo_ref(G_evas));
|
||||||
evas::image o(efl::eo::parent = canvas);
|
evas::image o(efl::eo::parent = canvas);
|
||||||
|
|
||||||
o.file_set(build_path("logo.png"), "");
|
o.file_set(build_path("logo.png"), "");
|
||||||
o.fill_set(0, 0, 120, 160);
|
o.fill_set(0, 0, 120, 160);
|
||||||
o.evas::object::size_set(120, 160);
|
o.evas::object::size_set(120, 160);
|
||||||
|
o.evas::object::position_set(-400, -300);
|
||||||
evas::image src = o;
|
evas::image src = o;
|
||||||
|
|
||||||
for (int i = 0; i < OBNUM / 2; i++)
|
for (int i = 0; i < OBNUM / 2; i++)
|
||||||
{
|
{
|
||||||
evas::image o(efl::eo::parent = canvas);
|
evas::image o(efl::eo::parent = canvas);
|
||||||
|
@ -50,8 +53,8 @@ static void _cleanup()
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
static void _loop(double t, int f)
|
static void _loop(double t, int f)
|
||||||
{
|
{
|
||||||
auto itr = images.begin();
|
int i = 0;
|
||||||
for (int i = 0; i < OBNUM; i++, ++itr)
|
for (evas::image& img : images)
|
||||||
{
|
{
|
||||||
Evas_Coord w = 120;
|
Evas_Coord w = 120;
|
||||||
Evas_Coord h = 160;
|
Evas_Coord h = 160;
|
||||||
|
@ -59,8 +62,9 @@ static void _loop(double t, int f)
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||||
Evas_Coord 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);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||||
(*itr).position_set(x, y);
|
img.evas::object::position_set(x, y);
|
||||||
}
|
}
|
||||||
|
++i;
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue