From fb28488bdc417b31a400735291f82507ab510fc8 Mon Sep 17 00:00:00 2001 From: Savio Sena Date: Mon, 29 Sep 2014 19:48:07 -0300 Subject: [PATCH] expedite-cxx: Fix position_set. --- src/bin/cxx/image_blend_occlude1.cc | 2 +- src/bin/cxx/image_blend_occlude1_many.cc | 2 +- src/bin/cxx/image_blend_occlude1_very_many.cc | 2 +- src/bin/cxx/image_blend_occlude2_few.cc | 2 +- src/bin/cxx/image_blend_occlude2_many.cc | 2 +- src/bin/cxx/image_blend_occlude2_very_many.cc | 2 +- src/bin/cxx/image_blend_occlude3.cc | 2 +- src/bin/cxx/image_blend_occlude3_few.cc | 2 +- src/bin/cxx/image_blend_occlude3_many.cc | 4 ++-- src/bin/cxx/image_blend_occlude3_very_many.cc | 2 +- src/bin/cxx/proxy_image_offscreen.cc | 10 +++++++--- 11 files changed, 18 insertions(+), 14 deletions(-) diff --git a/src/bin/cxx/image_blend_occlude1.cc b/src/bin/cxx/image_blend_occlude1.cc index c2034b8..623c713 100644 --- a/src/bin/cxx/image_blend_occlude1.cc +++ b/src/bin/cxx/image_blend_occlude1.cc @@ -40,7 +40,7 @@ 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); 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.evas::object::size_set(120, 160); diff --git a/src/bin/cxx/image_blend_occlude1_many.cc b/src/bin/cxx/image_blend_occlude1_many.cc index 1c9f102..1c939bd 100644 --- a/src/bin/cxx/image_blend_occlude1_many.cc +++ b/src/bin/cxx/image_blend_occlude1_many.cc @@ -42,7 +42,7 @@ 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); 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.evas::object::size_set(120, 160); diff --git a/src/bin/cxx/image_blend_occlude1_very_many.cc b/src/bin/cxx/image_blend_occlude1_very_many.cc index c8c5cbb..0768ab9 100644 --- a/src/bin/cxx/image_blend_occlude1_very_many.cc +++ b/src/bin/cxx/image_blend_occlude1_very_many.cc @@ -43,7 +43,7 @@ static void _setup(void) 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); + o.evas::object::position_set(x, y); } o.fill_set(0, 0, 120, 160); o.evas::object::size_set(120, 160); diff --git a/src/bin/cxx/image_blend_occlude2_few.cc b/src/bin/cxx/image_blend_occlude2_few.cc index 85716ae..84ef218 100644 --- a/src/bin/cxx/image_blend_occlude2_few.cc +++ b/src/bin/cxx/image_blend_occlude2_few.cc @@ -43,7 +43,7 @@ static void _setup(void) 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); + o.evas::object::position_set(x, y); } o.fill_set(0, 0, 120, 160); o.size_set(120, 160); diff --git a/src/bin/cxx/image_blend_occlude2_many.cc b/src/bin/cxx/image_blend_occlude2_many.cc index f28554f..6a462b6 100644 --- a/src/bin/cxx/image_blend_occlude2_many.cc +++ b/src/bin/cxx/image_blend_occlude2_many.cc @@ -45,7 +45,7 @@ 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); 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.evas::object::size_set(120, 160); diff --git a/src/bin/cxx/image_blend_occlude2_very_many.cc b/src/bin/cxx/image_blend_occlude2_very_many.cc index 0a63bcf..4ad8dee 100644 --- a/src/bin/cxx/image_blend_occlude2_very_many.cc +++ b/src/bin/cxx/image_blend_occlude2_very_many.cc @@ -43,7 +43,7 @@ static void _setup(void) 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); + o.evas::object::position_set(x, y); } o.fill_set(0, 0, 120, 160); o.evas::object::size_set(120, 160); diff --git a/src/bin/cxx/image_blend_occlude3.cc b/src/bin/cxx/image_blend_occlude3.cc index ef488b4..832758c 100644 --- a/src/bin/cxx/image_blend_occlude3.cc +++ b/src/bin/cxx/image_blend_occlude3.cc @@ -42,7 +42,7 @@ 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); 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.evas::object::size_set(120, 160); diff --git a/src/bin/cxx/image_blend_occlude3_few.cc b/src/bin/cxx/image_blend_occlude3_few.cc index 040861d..327621b 100644 --- a/src/bin/cxx/image_blend_occlude3_few.cc +++ b/src/bin/cxx/image_blend_occlude3_few.cc @@ -45,7 +45,7 @@ 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); 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.evas::object::size_set(120, 160); diff --git a/src/bin/cxx/image_blend_occlude3_many.cc b/src/bin/cxx/image_blend_occlude3_many.cc index 7b02f7a..1e61262 100644 --- a/src/bin/cxx/image_blend_occlude3_many.cc +++ b/src/bin/cxx/image_blend_occlude3_many.cc @@ -41,10 +41,10 @@ static void _setup(void) 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); + o.evas::object::position_set(x, y); } o.fill_set(0, 0, 120, 160); - o.size_set(120, 160); + o.evas::object::size_set(120, 160); o.visibility_set(true); } done = 0; diff --git a/src/bin/cxx/image_blend_occlude3_very_many.cc b/src/bin/cxx/image_blend_occlude3_very_many.cc index 6b9eb6e..55da895 100644 --- a/src/bin/cxx/image_blend_occlude3_very_many.cc +++ b/src/bin/cxx/image_blend_occlude3_very_many.cc @@ -42,7 +42,7 @@ static void _setup(void) 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); + o.evas::object::position_set(x, y); } o.fill_set(0, 0, 120, 160); o.size_set(120, 160); diff --git a/src/bin/cxx/proxy_image_offscreen.cc b/src/bin/cxx/proxy_image_offscreen.cc index ab93554..8b455a0 100644 --- a/src/bin/cxx/proxy_image_offscreen.cc +++ b/src/bin/cxx/proxy_image_offscreen.cc @@ -25,10 +25,13 @@ static void _setup(void) { evas::canvas canvas(::eo_ref(G_evas)); evas::image o(efl::eo::parent = canvas); + o.file_set(build_path("logo.png"), ""); o.fill_set(0, 0, 120, 160); o.evas::object::size_set(120, 160); + o.evas::object::position_set(-400, -300); evas::image src = o; + for (int i = 0; i < OBNUM / 2; i++) { evas::image o(efl::eo::parent = canvas); @@ -50,8 +53,8 @@ static void _cleanup() /* loop - do things */ static void _loop(double t, int f) { - auto itr = images.begin(); - for (int i = 0; i < OBNUM; i++, ++itr) + int i = 0; + for (evas::image& img : images) { Evas_Coord w = 120; 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); Evas_Coord y = (win_h / 2) - (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); }