[libchamplain] Resize containing clutter actor together with the point



commit 8c769a60905b7655ac5087ca0f63f6b6d8a4779e
Author: JiÅÃ Techet <techet gmail com>
Date:   Fri Jun 29 00:30:26 2012 +0200

    Resize containing clutter actor together with the point

 champlain/champlain-point.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/champlain/champlain-point.c b/champlain/champlain-point.c
index 7fb4c4a..29e6bdd 100644
--- a/champlain/champlain-point.c
+++ b/champlain/champlain-point.c
@@ -418,7 +418,14 @@ champlain_point_set_size (ChamplainPoint *point,
 {
   g_return_if_fail (CHAMPLAIN_IS_POINT (point));
 
+  ChamplainPointPrivate *priv = point->priv;
+
+  if (priv->point_actor)
+    clutter_actor_unparent (CLUTTER_ACTOR (priv->point_actor));
+
   point->priv->size = size;
+  priv->point_actor = clutter_cairo_texture_new (size, size);
+  clutter_actor_set_parent (CLUTTER_ACTOR (priv->point_actor), CLUTTER_ACTOR (point));
   g_object_notify (G_OBJECT (point), "size");
   draw_point (point);
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]