summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2011-10-17 00:32:48 -0700
committerBenjamin Otte <otte@redhat.com>2011-10-17 00:32:48 -0700
commit78bce2018f60d73c3c838a4386bf80ba16d584fc (patch)
tree439068debe76a218cb90b2c980aff64767b9ad37
parentb578d2982a32a7a28cbc1f9a3f808c15afbffc2c (diff)
pacman: Use the gray value of the color for the outlineHEADmaster
-rw-r--r--games/pacman/pacman-graphic.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/games/pacman/pacman-graphic.c b/games/pacman/pacman-graphic.c
index d2eff4a..d9b4ba8 100644
--- a/games/pacman/pacman-graphic.c
+++ b/games/pacman/pacman-graphic.c
@@ -63,14 +63,14 @@ pacman_graphic_draw (GameGraphic *graphic, cairo_t *cr)
mouth_direction + 2 * GAME_PI - mouth_open * GAME_PI / 4);
cairo_line_to (cr, 0.5, 0.5);
cairo_fill_preserve (cr);
- cairo_set_source_rgb (cr, 0.0, 0.0, 0.0);
+
+ if (game_color_to_gray (&pacman->color) <= 0.5)
+ cairo_set_source_rgb (cr, 1.0, 1.0, 1.0);
+ else
+ cairo_set_source_rgb (cr, 0.0, 0.0, 0.0);
cairo_set_line_width (cr, 0.06);
- cairo_stroke_preserve (cr);
- cairo_set_source_rgb (cr, 1.0, 1.0, 1.0);
- cairo_set_line_width (cr, 0.02);
cairo_stroke (cr);
/* eye */
- cairo_set_source_rgb (cr, 0.0, 0.0, 0.0);
cairo_arc (cr, eye_x, eye_y, 0.05, 0.0, 2 * GAME_PI);
cairo_fill (cr);
}