1
0
Fork 0
Commit graph

5 commits

Author SHA1 Message Date
Emmanuele Bassi
b2feb463bd Add a rect-contains-rect function
Similar to the contains-point one.
2012-04-27 12:30:47 +01:00
Emmanuele Bassi
9c637ccb41 Use an epsilon for float comparison
We tend to use float comparison for structured data types like Vertex,
Point, and Size; we should take into consideration fluctuations in the
floating point representation as well.
2012-04-27 12:30:47 +01:00
Emmanuele Bassi
d021cc7c02 Add a function to compute the distance between points 2012-04-27 12:30:47 +01:00
Emmanuele Bassi
bc914bb8a2 Move towards an alloc/init pair for base types
Instead of a single new() constructor that both allocates and
initializes, split the allocation and initialization into two separate
functions for types that are typically used on the stack, and rarely
allocated on the heap, like ClutterPoint and friends.

This is also applied retroactively to ClutterActorBox and ClutterVertex,
given that the same considerations on usage apply to them as well; we
can add a return value to clutter_actor_box_init() and
clutter_vertex_init() in an ABI-compatible way, so that
clutter_actor_box_new() and clutter_vertex_new() can be effectively
reimplemented as "init (alloc ())".
2012-04-27 12:30:47 +01:00
Emmanuele Bassi
61f17e345a Add base geometric types
Clutter should provide some more basic geometric types - Point, Size,
Rect - so that we can use them in properties and accessors.
2012-04-27 12:30:46 +01:00