[libchamplain] Make custom implementation of pick for ChamplainPoint



commit 8634c7e6c41ad7e6f1c240a6e472022c7d9e4a2d
Author: JiÅ?í Techet <techet gmail com>
Date:   Thu Mar 24 23:37:18 2011 +0100

    Make custom implementation of pick for ChamplainPoint

 champlain/champlain-point.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/champlain/champlain-point.c b/champlain/champlain-point.c
index dae1f61..3da237b 100644
--- a/champlain/champlain-point.c
+++ b/champlain/champlain-point.c
@@ -139,10 +139,19 @@ pick (ClutterActor *self,
     const ClutterColor *color)
 {
   ChamplainPointPrivate *priv = GET_PRIVATE (self);
+  gdouble radius = priv->size / 2.0;
 
-  CLUTTER_ACTOR_CLASS (champlain_point_parent_class)->pick (self, color);
+  cogl_path_new ();
 
-  clutter_actor_paint (CLUTTER_ACTOR (priv->point_actor));
+  cogl_set_source_color4ub (color->red,
+      color->green,
+      color->blue,
+      color->alpha);
+
+  cogl_path_move_to (radius, radius);
+  cogl_path_arc (radius, radius, radius, radius, 0, 360.0);
+  cogl_path_close ();
+  cogl_path_fill ();
 }
 
 



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