4 * The geeky little puzzle game with a big noodly crunch!
6 * gPlanarity copyright (C) 2005 Monty <monty@xiph.org>
7 * Original Flash game by John Tantalo <john.tantalo@case.edu>
8 * Original game concept by Mary Radcliffe
10 * gPlanarity is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2, or (at your option)
15 * gPlanarity is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with Postfish; see the file COPYING. If not, write to the
22 * Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
29 #include <gtk/gtkmain.h>
37 #include "gameboard.h"
39 /* cache the curtain surface/pattern ******************************/
42 void cache_curtain(Gameboard
*g
){
46 cairo_surface_create_similar (cairo_get_target (g
->wc
),
47 CAIRO_CONTENT_COLOR_ALPHA
,
50 c
= cairo_create(g
->curtains
);
52 cairo_set_operator(c
,CAIRO_OPERATOR_CLEAR
);
53 cairo_set_source_rgba (c
, 1,1,1,1);
57 cairo_set_line_width(c
,1);
58 cairo_set_source_rgba (c
, 0,0,0,.5);
62 cairo_move_to(c
,x
+.5,y
);
63 cairo_rel_line_to(c
,0,1);
69 g
->curtainp
=cairo_pattern_create_for_surface (g
->curtains
);
70 cairo_pattern_set_extend (g
->curtainp
, CAIRO_EXTEND_REPEAT
);
74 void draw_curtain(Gameboard
*g
){
76 cairo_t
*c
= cairo_create(g
->background
);
78 cairo_set_source (c
, g
->curtainp
);