This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "krobot".
The branch, master has been updated
via 5c74c5a3162edcc3b84f32a73124c853354287fd (commit)
from d68c3713a184beeec683548139d7af472a545b70 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 5c74c5a3162edcc3b84f32a73124c853354287fd
Author: Jérémie Dimino <je...@di...>
Date: Tue Apr 19 19:16:06 2011 +0200
[krobot_viewer] fix rendering of the robot and the ghost
-----------------------------------------------------------------------
Changes:
diff --git a/info/control2011/src/tools/krobot_viewer.ml b/info/control2011/src/tools/krobot_viewer.ml
index 43e01d8..3b30372 100644
--- a/info/control2011/src/tools/krobot_viewer.ml
+++ b/info/control2011/src/tools/krobot_viewer.ml
@@ -230,10 +230,10 @@ let draw viewer =
Cairo.arc ctx 1.675 0.175 0.05 0. (2. *. pi);
Cairo.fill ctx;
- Cairo.save ctx;
-
List.iter
(fun (state, alpha) ->
+ Cairo.save ctx;
+
(* Draw the robot *)
Cairo.translate ctx state.pos.x state.pos.y;
Cairo.rotate ctx state.theta;
@@ -249,12 +249,12 @@ let draw viewer =
Cairo.line_to ctx d (robot_size /. 4.);
Cairo.line_to ctx (d +. robot_size /. 4.) 0.;
Cairo.set_source_rgba ctx 0. 0. 0. 0.5;
- Cairo.stroke ctx)
+ Cairo.stroke ctx;
+
+ Cairo.restore ctx)
[(viewer.ghost, 0.5);
(viewer.state, 1.0)];
- Cairo.restore ctx;
-
(* Draw the beacon *)
if viewer.beacon.valid then begin
Cairo.arc ctx viewer.beacon.xbeacon viewer.beacon.ybeacon 0.04 0. (2. *. pi);
hooks/post-receive
--
krobot
|