2008-02-06 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-texture.c:
+ Minor clean up from last commit.
+
+ * tests/test-fbo.c:
+ Swall tweak (rotate offscreen, rather than resize)
+
+2008-02-06 Matthew Allum <mallum@openedhand.com>
+
+ * clutter/clutter-texture.c:
Initial attempt at handling resizing/tranformed source textures.
* clutter/pango/pangoclutter-render.c: (draw_glyph):
return NULL;
}
- /* FIXME abs size - usually fails with 0,0 */
clutter_actor_get_abs_size (actor, &w, &h);
- // printf("abs size is %ix%i\n", w, h);
-
- /* Wont work with any kind of transform on actor */
- //clutter_actor_get_size (actor, &w, &h);
if (w == 0 || h == 0)
return NULL;
clutter_actor_show_all (trans_source); /* need to show() offscreen */
clutter_actor_set_scale (trans_source, 2.5, 2.5);
-#if 0
- /* Rotate about center by 90 degrees - FIXME: fbo seems to get nothing*/
- clutter_actor_move_anchor_point_from_gravity (trans_source,
- CLUTTER_GRAVITY_CENTER);
- clutter_actor_set_rotation (trans_source, CLUTTER_Z_AXIS, 90.0, 0, 0, 0);
-#endif
if ((fbo = clutter_texture_new_from_actor (trans_source)) == NULL)
g_error("transformed fbo creation failed");
if ((fbo = clutter_texture_new_from_actor (trans_source)) == NULL)
g_error("transformed fbo creation failed");
- clutter_actor_set_width (trans_source, 2*padx);
+ /* rotate after */
+ clutter_actor_move_anchor_point_from_gravity (trans_source,
+ CLUTTER_GRAVITY_CENTER);
+ clutter_actor_set_rotation (trans_source, CLUTTER_Z_AXIS, 90.0, 0, 0, 0);
+
clutter_actor_set_position (fbo, padx, pady);
clutter_group_add (stage, fbo);