[cluttermm_tutorial] Fixed issue where custom_actor example was not appearing.
- From: Chris Kühl <chriskuehl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cluttermm_tutorial] Fixed issue where custom_actor example was not appearing.
- Date: Mon, 20 Sep 2010 13:57:44 +0000 (UTC)
commit 26261960072b0079014411639f6fedbf348aa064
Author: Chris Kühl <chrisk openismus com>
Date: Mon Sep 20 15:28:13 2010 +0200
Fixed issue where custom_actor example was not appearing.
* examples/custom_actor/triangle_actor.cc: Changed Cogl::Fixed
array to float array.
ChangeLog | 7 +++++++
examples/custom_actor/triangle_actor.cc | 16 ++++++++--------
2 files changed, 15 insertions(+), 8 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 141a19f..4fe2fa2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-09-20 Chris Kühl <chrisk openismus com>
+
+ Fixed issue where custom_actor example was not appearing.
+
+ * examples/custom_actor/triangle_actor.cc: Changed Cogl::Fixed
+ array to float array.
+
2010-09-17 Chris Kühl <chrisk openismus com>
Fixed reference count and scope issues in behaviour example.
diff --git a/examples/custom_actor/triangle_actor.cc b/examples/custom_actor/triangle_actor.cc
index a36a24f..1f145a1 100644
--- a/examples/custom_actor/triangle_actor.cc
+++ b/examples/custom_actor/triangle_actor.cc
@@ -50,20 +50,20 @@ void Triangle::do_triangle_paint(const CoglColor* color)
cogl_push_matrix();
cogl_set_source_color(color);
- Cogl::Fixed coords[6];
+ float coords[6];
// Paint a triangle. The parent paint call will have translated us into
// position so paint from 0, 0.
- coords[0] = COGL_FIXED_FROM_INT(0);
- coords[1] = COGL_FIXED_FROM_INT(0);
+ coords[0] = 0;
+ coords[1] = 0;
- coords[2] = COGL_FIXED_FROM_INT(0);
- coords[3] = COGL_FIXED_FROM_INT(geom.get_height());
+ coords[2] = 0;
+ coords[3] = geom.get_height();
- coords[4] = COGL_FIXED_FROM_INT(geom.get_width());
+ coords[4] = geom.get_width();
coords[5] = coords[3];
- cogl_path_polygon((float*)coords, G_N_ELEMENTS(coords) / 2);
+ cogl_path_polygon(coords, G_N_ELEMENTS(coords) / 2);
cogl_path_fill();
cogl_pop_matrix();
@@ -86,7 +86,7 @@ void Triangle::on_paint()
void Triangle::pick_vfunc(const Clutter::Color& color)
{
// Paint the triangle with the pick color, offscreen.
- // This is used by Clutter to detect the actor under the cursor
+ // This is used by Clutter to detect the actor under the cursor
// by identifying the unique color under the cursor.
CoglColor coglcolor;
cogl_color_set_from_4ub(&coglcolor,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]