summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSavio Sena <savio@expertisesolutions.com.br>2014-10-02 17:44:34 -0300
committerSavio Sena <savio@expertisesolutions.com.br>2014-10-02 17:44:34 -0300
commit93c095a3fb69183954136223cd58456c84cf3302 (patch)
treeaf4673c7e58762640ed64dff649676ed8499db84
parentf097281c9d906d27d5ece48a7b3b968aead62201 (diff)
expedite-cxx: Fix some bugs.
-rw-r--r--src/bin/cxx/image_crossfade.cc2
-rw-r--r--src/bin/cxx/line_blend.cc6
-rw-r--r--src/bin/cxx/rect_blend.cc8
-rw-r--r--src/bin/cxx/rect_blend_pow2.cc6
4 files changed, 12 insertions, 10 deletions
diff --git a/src/bin/cxx/image_crossfade.cc b/src/bin/cxx/image_crossfade.cc
index a268880..9b847f8 100644
--- a/src/bin/cxx/image_crossfade.cc
+++ b/src/bin/cxx/image_crossfade.cc
@@ -56,7 +56,7 @@ static void _loop(double t, int f)
56{ 56{
57 int a = f & 0x1f; 57 int a = f & 0x1f;
58 a = ((a << 3) | (a >> 2)) & 0xff; 58 a = ((a << 3) | (a >> 2)) & 0xff;
59 images.back().color_set(a, a, a, a); 59 (*images.back()).color_set(a, a, a, a);
60 FPS_STD(NAME); 60 FPS_STD(NAME);
61} 61}
62 62
diff --git a/src/bin/cxx/line_blend.cc b/src/bin/cxx/line_blend.cc
index 5a71c0f..2c2b655 100644
--- a/src/bin/cxx/line_blend.cc
+++ b/src/bin/cxx/line_blend.cc
@@ -84,12 +84,12 @@ static void _loop(double t, int f)
84 Evas_Coord ox1, oy1, ox2, oy2; 84 Evas_Coord ox1, oy1, ox2, oy2;
85 Evas_Object *o; 85 Evas_Object *o;
86 int i = 0; 86 int i = 0;
87 for (evas::image& img : images) 87 for (evas::line& line : lines)
88 { 88 {
89 img.xy_get(&ox1, &oy1, &ox2, &oy2); 89 line.xy_get(&ox1, &oy1, &ox2, &oy2);
90 _rotate_point(&ox1, &oy1, i); 90 _rotate_point(&ox1, &oy1, i);
91 _rotate_point(&ox2, &oy2, i); 91 _rotate_point(&ox2, &oy2, i);
92 img.xy_set(ox1, oy1, ox2, oy2); 92 line.xy_set(ox1, oy1, ox2, oy2);
93 ++i; 93 ++i;
94 } 94 }
95 FPS_STD(NAME); 95 FPS_STD(NAME);
diff --git a/src/bin/cxx/rect_blend.cc b/src/bin/cxx/rect_blend.cc
index 09838f1..7216ee1 100644
--- a/src/bin/cxx/rect_blend.cc
+++ b/src/bin/cxx/rect_blend.cc
@@ -48,7 +48,8 @@ static void _cleanup()
48/* loop - do things */ 48/* loop - do things */
49static void _loop(double t, int f) 49static void _loop(double t, int f)
50{ 50{
51 for (evas::image& img : images) 51 int i = 0;
52 for (evas::rectangle& rec : rectangles)
52 { 53 {
53 Evas_Coord w0 = 80; 54 Evas_Coord w0 = 80;
54 Evas_Coord h0 = 80; 55 Evas_Coord h0 = 80;
@@ -59,8 +60,9 @@ static void _loop(double t, int f)
59 Evas_Coord y = (win_h / 2) - (h / 2); 60 Evas_Coord y = (win_h / 2) - (h / 2);
60 y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2); 61 y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
61 62
62 img.evas::object::position_set(x, y); 63 rec.evas::object::position_set(x, y);
63 img.evas::object::size_set(w, h); 64 rec.evas::object::size_set(w, h);
65 ++i;
64 } 66 }
65 FPS_STD(NAME); 67 FPS_STD(NAME);
66} 68}
diff --git a/src/bin/cxx/rect_blend_pow2.cc b/src/bin/cxx/rect_blend_pow2.cc
index 9e7cf35..562fdd1 100644
--- a/src/bin/cxx/rect_blend_pow2.cc
+++ b/src/bin/cxx/rect_blend_pow2.cc
@@ -50,7 +50,7 @@ static void _cleanup(void)
50static void _loop(double t, int f) 50static void _loop(double t, int f)
51{ 51{
52 int i = 0; 52 int i = 0;
53 for (evas::image& img : images) 53 for (evas::rectangle& rec : rectangles)
54 { 54 {
55 Evas_Coord w0 = 80; 55 Evas_Coord w0 = 80;
56 Evas_Coord h0 = 80; 56 Evas_Coord h0 = 80;
@@ -60,8 +60,8 @@ static void _loop(double t, int f)
60 x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2); 60 x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
61 Evas_Coord y = (win_h / 2) - (h / 2); 61 Evas_Coord y = (win_h / 2) - (h / 2);
62 y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2); 62 y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
63 img.evas::object::position_set(x, y); 63 rec.evas::object::position_set(x, y);
64 img.evas::object::size_set(w, h); 64 rec.evas::object::size_set(w, h);
65 ++i; 65 ++i;
66 } 66 }
67 FPS_STD(NAME); 67 FPS_STD(NAME);