[cluttermm_tutorial] Actor transformations example updated
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cluttermm_tutorial] Actor transformations example updated
- Date: Wed, 24 Feb 2016 19:48:52 +0000 (UTC)
commit c289ce67e74dcc0f54b76e9c6077e9d7e6455789
Author: Ian Martin <martin_id vodafone co nz>
Date: Wed Feb 24 20:30:50 2016 +0100
Actor transformations example updated
examples/actor_transformations/main.cc | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/examples/actor_transformations/main.cc b/examples/actor_transformations/main.cc
index 49babee..42b8e01 100644
--- a/examples/actor_transformations/main.cc
+++ b/examples/actor_transformations/main.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008 Openismus GmbH
+ * Copyright (c) 2008, 2016 Openismus GmbH
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
@@ -22,14 +22,15 @@ int main(int argc, char** argv)
Clutter::init(&argc, &argv);
// Get the stage and set its size and color:
- const Glib::RefPtr<Clutter::Stage> stage = Clutter::Stage::get_default();
- stage->set_size(200, 200);
- stage->set_color(Clutter::Color(0, 0, 0, 0xFF)); // black
+ const Glib::RefPtr<Clutter::Stage> stage = Clutter::Stage::create();
+ stage->set_size(400, 200);
+ stage->set_background_color(Clutter::Color(0, 0, 0, 0xFF)); // black
const Clutter::Color actor_color (0xff, 0xff, 0xff, 0x99);
// Add a rectangle to the stage:
- const Glib::RefPtr<Clutter::Rectangle> rect = Clutter::Rectangle::create(actor_color);
+ const Glib::RefPtr<Clutter::Actor> rect = Clutter::Actor::create();
+ rect->set_background_color(Clutter::Color(Clutter::StaticColor::COLOR_WHITE));
rect->set_size(100, 100);
rect->set_position(20, 20);
stage->add_actor(rect);
@@ -42,7 +43,7 @@ int main(int argc, char** argv)
// Add a label to the stage:
const Glib::RefPtr<Clutter::Text> label =
Clutter::Text::create("Sans 12", "Some Text", actor_color);
- label->set_size(500, 500);
+ label->set_size(100, 100);
label->set_position(20, 150);
stage->add_actor(label);
label->show();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]