* clutter/clutter-actor.h:
* clutter/clutter-actor.c:
* tests/test-project.c:
+ Renamed clutter_actor_project_point() to
+ clutter_actor_apply_trasform_to_point() and
+ clutter_actor_project_vertices() to clutter_actor_get_vertices().
+
+2007-06-27 Tomas Frydrych <tf@openedhand.com>
+
+ * clutter/clutter-actor.h:
+ * clutter/clutter-actor.c:
+ * tests/test-project.c:
(clutter_actor_project_point):
Separated input from output parameters.
#define MTX_GL_SCALE_Z(z,w,v1,v2) MTX_GL_SCALE_X(z,w,v1,v2)
/**
- * clutter_actor_project_point:
+ * clutter_actor_apply_transform_to_point:
* @self: A #ClutterActor
* @x: x coordinance of the point to project
* @y: y coordinance of the point to project
* Since: 0.4
**/
void
-clutter_actor_project_point (ClutterActor *self,
- ClutterUnit x,
- ClutterUnit y,
- ClutterUnit z,
- ClutterUnit *x2,
- ClutterUnit *y2,
- ClutterUnit *z2)
+clutter_actor_apply_transform_to_point (ClutterActor *self,
+ ClutterUnit x,
+ ClutterUnit y,
+ ClutterUnit z,
+ ClutterUnit *x2,
+ ClutterUnit *y2,
+ ClutterUnit *z2)
{
ClutterFixed mtx_p[16];
ClutterFixed v[4];
}
/**
- * clutter_actor_project_vertices:
+ * clutter_actor_get_vertices:
* @self: A #ClutterActor
* @verts: Pointer to a location of an array of 4 #ClutterVertex where to
* store the result.
* Since: 0.4
**/
void
-clutter_actor_project_vertices (ClutterActor * self,
+clutter_actor_get_vertices (ClutterActor * self,
ClutterVertex verts[4])
{
ClutterFixed mtx_p[16];
ClutterUnit zu;
*x = *y = 0;
- clutter_actor_project_point (self, 0, 0, 0, x, y, &zu);
+ clutter_actor_apply_transform_to_point (self, 0, 0, 0, x, y, &zu);
}
/**
* no assumptions can be made about the relative position of this envelope to
* the absolute position of the actor, as returned by
* clutter_actor_get_abs_position() - if you need this information, you need
- * to use clutter_actor_project_vertices() to get the coords of the actual
+ * to use clutter_actor_get_vertices() to get the coords of the actual
* quadrangle.
*
* Since: 0.4
ClutterFixed x_min, x_max, y_min, y_max;
gint i;
- clutter_actor_project_vertices (self, v);
+ clutter_actor_get_vertices (self, v);
x_min = x_max = v[0].x;
y_min = y_max = v[0].y;
gdouble *scale_x,
gdouble *scale_y);
-void clutter_actor_set_scale_with_gravityx (ClutterActor *self,
- ClutterFixed scale_x,
- ClutterFixed scale_y,
- ClutterGravity gravity);
-
-void clutter_actor_set_scale_with_gravity (ClutterActor *self,
- gfloat scale_x,
- gfloat scale_y,
- ClutterGravity gravity);
-
-void clutter_actor_get_abs_size (ClutterActor *self,
- guint *width,
- guint *height);
-void clutter_actor_get_size (ClutterActor *self,
- guint *width,
- guint *height);
-void clutter_actor_move_by (ClutterActor *self,
- gint dx,
- gint dy);
-
-void clutter_actor_project_vertices (ClutterActor *self,
- ClutterVertex verts[4]);
-
-void clutter_actor_project_point (ClutterActor *actor,
- ClutterUnit x,
- ClutterUnit y,
- ClutterUnit z,
- ClutterUnit *x2,
- ClutterUnit *y2,
- ClutterUnit *z2);
+void clutter_actor_set_scale_with_gravityx (ClutterActor *self,
+ ClutterFixed scale_x,
+ ClutterFixed scale_y,
+ ClutterGravity gravity);
+
+void clutter_actor_set_scale_with_gravity (ClutterActor *self,
+ gfloat scale_x,
+ gfloat scale_y,
+ ClutterGravity gravity);
+
+void clutter_actor_get_abs_size (ClutterActor *self,
+ guint *width,
+ guint *height);
+void clutter_actor_get_size (ClutterActor *self,
+ guint *width,
+ guint *height);
+void clutter_actor_move_by (ClutterActor *self,
+ gint dx,
+ gint dy);
+
+void clutter_actor_get_vertices (ClutterActor *self,
+ ClutterVertex verts[4]);
+
+void clutter_actor_apply_transform_to_point (ClutterActor *actor,
+ ClutterUnit x,
+ ClutterUnit y,
+ ClutterUnit z,
+ ClutterUnit *x2,
+ ClutterUnit *y2,
+ ClutterUnit *z2);
G_END_DECLS
ClutterFixed xp, yp, zp;
ClutterColor blue = { 0, 0, 0xff, 0xff };
- clutter_actor_project_vertices (rect, v);
+ clutter_actor_get_vertices (rect, v);
for (i = 0; i < 4; ++i)
{
p[i] = clutter_rectangle_new_with_color (&blue);
yp = CLUTTER_INT_TO_FIXED (clutter_actor_get_height (rect)/2);
zp = 0;
- clutter_actor_project_point (rect, xp, yp, zp, &xp, &yp, &zp);
+ clutter_actor_apply_transform_to_point (rect, xp, yp, zp, &xp, &yp, &zp);
p[4] = clutter_rectangle_new_with_color (&blue);
clutter_actor_set_size (p[4], 5, 5);
clutter_actor_set_position (p[4], 0, 0);
ClutterFixed xp, yp, zp;
ClutterColor blue = { 0, 0, 0xff, 0xff };
- clutter_actor_project_vertices (rect, v);
+ clutter_actor_get_vertices (rect, v);
for (i = 0; i < 4; ++i)
{
clutter_actor_set_position (p[i],
yp = CLUTTER_INT_TO_FIXED (clutter_actor_get_height (rect)/2);
zp = 0;
- clutter_actor_project_point (rect, xp, yp, zp, &xp, &yp, &zp);
+ clutter_actor_apply_transform_to_point (rect, xp, yp, zp, &xp, &yp, &zp);
clutter_actor_set_position (p[4],
CLUTTER_FIXED_INT (xp) -
clutter_actor_get_width (p[4])/2,