mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 00:20:42 -05:00
renamed clutter_actor_project_* functions
This commit is contained in:
parent
e10a0ad025
commit
4bb51a4787
@ -1,3 +1,12 @@
|
|||||||
|
2007-06-27 Tomas Frydrych <tf@openedhand.com>
|
||||||
|
|
||||||
|
* 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>
|
2007-06-27 Tomas Frydrych <tf@openedhand.com>
|
||||||
|
|
||||||
* clutter/clutter-actor.h:
|
* clutter/clutter-actor.h:
|
||||||
|
@ -381,7 +381,7 @@ clutter_actor_transform_point (ClutterActor *actor,
|
|||||||
#define MTX_GL_SCALE_Z(z,w,v1,v2) MTX_GL_SCALE_X(z,w,v1,v2)
|
#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
|
* @self: A #ClutterActor
|
||||||
* @x: x coordinance of the point to project
|
* @x: x coordinance of the point to project
|
||||||
* @y: y coordinance of the point to project
|
* @y: y coordinance of the point to project
|
||||||
@ -396,13 +396,13 @@ clutter_actor_transform_point (ClutterActor *actor,
|
|||||||
* Since: 0.4
|
* Since: 0.4
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
clutter_actor_project_point (ClutterActor *self,
|
clutter_actor_apply_transform_to_point (ClutterActor *self,
|
||||||
ClutterUnit x,
|
ClutterUnit x,
|
||||||
ClutterUnit y,
|
ClutterUnit y,
|
||||||
ClutterUnit z,
|
ClutterUnit z,
|
||||||
ClutterUnit *x2,
|
ClutterUnit *x2,
|
||||||
ClutterUnit *y2,
|
ClutterUnit *y2,
|
||||||
ClutterUnit *z2)
|
ClutterUnit *z2)
|
||||||
{
|
{
|
||||||
ClutterFixed mtx_p[16];
|
ClutterFixed mtx_p[16];
|
||||||
ClutterFixed v[4];
|
ClutterFixed v[4];
|
||||||
@ -499,7 +499,7 @@ clutter_actor_transform_vertices (ClutterActor * self,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* clutter_actor_project_vertices:
|
* clutter_actor_get_vertices:
|
||||||
* @self: A #ClutterActor
|
* @self: A #ClutterActor
|
||||||
* @verts: Pointer to a location of an array of 4 #ClutterVertex where to
|
* @verts: Pointer to a location of an array of 4 #ClutterVertex where to
|
||||||
* store the result.
|
* store the result.
|
||||||
@ -516,7 +516,7 @@ clutter_actor_transform_vertices (ClutterActor * self,
|
|||||||
* Since: 0.4
|
* Since: 0.4
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
clutter_actor_project_vertices (ClutterActor * self,
|
clutter_actor_get_vertices (ClutterActor * self,
|
||||||
ClutterVertex verts[4])
|
ClutterVertex verts[4])
|
||||||
{
|
{
|
||||||
ClutterFixed mtx_p[16];
|
ClutterFixed mtx_p[16];
|
||||||
@ -1437,7 +1437,7 @@ clutter_actor_get_abs_position_units (ClutterActor *self,
|
|||||||
ClutterUnit zu;
|
ClutterUnit zu;
|
||||||
|
|
||||||
*x = *y = 0;
|
*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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1477,7 +1477,7 @@ clutter_actor_get_abs_position (ClutterActor *self,
|
|||||||
* no assumptions can be made about the relative position of this envelope to
|
* no assumptions can be made about the relative position of this envelope to
|
||||||
* the absolute position of the actor, as returned by
|
* the absolute position of the actor, as returned by
|
||||||
* clutter_actor_get_abs_position() - if you need this information, you need
|
* 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.
|
* quadrangle.
|
||||||
*
|
*
|
||||||
* Since: 0.4
|
* Since: 0.4
|
||||||
@ -1491,7 +1491,7 @@ clutter_actor_get_abs_size_units (ClutterActor *self,
|
|||||||
ClutterFixed x_min, x_max, y_min, y_max;
|
ClutterFixed x_min, x_max, y_min, y_max;
|
||||||
gint i;
|
gint i;
|
||||||
|
|
||||||
clutter_actor_project_vertices (self, v);
|
clutter_actor_get_vertices (self, v);
|
||||||
|
|
||||||
x_min = x_max = v[0].x;
|
x_min = x_max = v[0].x;
|
||||||
y_min = y_max = v[0].y;
|
y_min = y_max = v[0].y;
|
||||||
|
@ -274,36 +274,36 @@ void clutter_actor_get_scale (ClutterActor *sel
|
|||||||
gdouble *scale_x,
|
gdouble *scale_x,
|
||||||
gdouble *scale_y);
|
gdouble *scale_y);
|
||||||
|
|
||||||
void clutter_actor_set_scale_with_gravityx (ClutterActor *self,
|
void clutter_actor_set_scale_with_gravityx (ClutterActor *self,
|
||||||
ClutterFixed scale_x,
|
ClutterFixed scale_x,
|
||||||
ClutterFixed scale_y,
|
ClutterFixed scale_y,
|
||||||
ClutterGravity gravity);
|
ClutterGravity gravity);
|
||||||
|
|
||||||
void clutter_actor_set_scale_with_gravity (ClutterActor *self,
|
void clutter_actor_set_scale_with_gravity (ClutterActor *self,
|
||||||
gfloat scale_x,
|
gfloat scale_x,
|
||||||
gfloat scale_y,
|
gfloat scale_y,
|
||||||
ClutterGravity gravity);
|
ClutterGravity gravity);
|
||||||
|
|
||||||
void clutter_actor_get_abs_size (ClutterActor *self,
|
void clutter_actor_get_abs_size (ClutterActor *self,
|
||||||
guint *width,
|
guint *width,
|
||||||
guint *height);
|
guint *height);
|
||||||
void clutter_actor_get_size (ClutterActor *self,
|
void clutter_actor_get_size (ClutterActor *self,
|
||||||
guint *width,
|
guint *width,
|
||||||
guint *height);
|
guint *height);
|
||||||
void clutter_actor_move_by (ClutterActor *self,
|
void clutter_actor_move_by (ClutterActor *self,
|
||||||
gint dx,
|
gint dx,
|
||||||
gint dy);
|
gint dy);
|
||||||
|
|
||||||
void clutter_actor_project_vertices (ClutterActor *self,
|
void clutter_actor_get_vertices (ClutterActor *self,
|
||||||
ClutterVertex verts[4]);
|
ClutterVertex verts[4]);
|
||||||
|
|
||||||
void clutter_actor_project_point (ClutterActor *actor,
|
void clutter_actor_apply_transform_to_point (ClutterActor *actor,
|
||||||
ClutterUnit x,
|
ClutterUnit x,
|
||||||
ClutterUnit y,
|
ClutterUnit y,
|
||||||
ClutterUnit z,
|
ClutterUnit z,
|
||||||
ClutterUnit *x2,
|
ClutterUnit *x2,
|
||||||
ClutterUnit *y2,
|
ClutterUnit *y2,
|
||||||
ClutterUnit *z2);
|
ClutterUnit *z2);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ init_handles ()
|
|||||||
ClutterFixed xp, yp, zp;
|
ClutterFixed xp, yp, zp;
|
||||||
ClutterColor blue = { 0, 0, 0xff, 0xff };
|
ClutterColor blue = { 0, 0, 0xff, 0xff };
|
||||||
|
|
||||||
clutter_actor_project_vertices (rect, v);
|
clutter_actor_get_vertices (rect, v);
|
||||||
for (i = 0; i < 4; ++i)
|
for (i = 0; i < 4; ++i)
|
||||||
{
|
{
|
||||||
p[i] = clutter_rectangle_new_with_color (&blue);
|
p[i] = clutter_rectangle_new_with_color (&blue);
|
||||||
@ -36,7 +36,7 @@ init_handles ()
|
|||||||
yp = CLUTTER_INT_TO_FIXED (clutter_actor_get_height (rect)/2);
|
yp = CLUTTER_INT_TO_FIXED (clutter_actor_get_height (rect)/2);
|
||||||
zp = 0;
|
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);
|
p[4] = clutter_rectangle_new_with_color (&blue);
|
||||||
clutter_actor_set_size (p[4], 5, 5);
|
clutter_actor_set_size (p[4], 5, 5);
|
||||||
clutter_actor_set_position (p[4], 0, 0);
|
clutter_actor_set_position (p[4], 0, 0);
|
||||||
@ -60,7 +60,7 @@ place_handles ()
|
|||||||
ClutterFixed xp, yp, zp;
|
ClutterFixed xp, yp, zp;
|
||||||
ClutterColor blue = { 0, 0, 0xff, 0xff };
|
ClutterColor blue = { 0, 0, 0xff, 0xff };
|
||||||
|
|
||||||
clutter_actor_project_vertices (rect, v);
|
clutter_actor_get_vertices (rect, v);
|
||||||
for (i = 0; i < 4; ++i)
|
for (i = 0; i < 4; ++i)
|
||||||
{
|
{
|
||||||
clutter_actor_set_position (p[i],
|
clutter_actor_set_position (p[i],
|
||||||
@ -74,7 +74,7 @@ place_handles ()
|
|||||||
yp = CLUTTER_INT_TO_FIXED (clutter_actor_get_height (rect)/2);
|
yp = CLUTTER_INT_TO_FIXED (clutter_actor_get_height (rect)/2);
|
||||||
zp = 0;
|
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_actor_set_position (p[4],
|
||||||
CLUTTER_FIXED_INT (xp) -
|
CLUTTER_FIXED_INT (xp) -
|
||||||
clutter_actor_get_width (p[4])/2,
|
clutter_actor_get_width (p[4])/2,
|
||||||
|
Loading…
Reference in New Issue
Block a user