Initialize Tizen 2.3
[framework/graphics/cairo.git] / util / cairo-script / examples / infinichess.cs
1 /xdef { exch def } def
2 /-rot { 3 1 roll } def
3 /rot { 3 -1 roll } def
4 /2dup { 2 copy } def
5
6 /SIZE 600. def
7 << /width SIZE /height SIZE >> surface context
8 1 1 1 set-source-rgb paint
9 0 0 0 set-source-rgb
10 EVEN_ODD set-fill-rule
11 SIZE SIZE scale
12
13 0.5 0 translate
14
15 save
16 1 1 scale
17 /n 90 def
18 n neg 1 n {
19         /x xdef
20         0 0 m
21         x 1 l
22         x 0.5 add 1 l
23         0 0 l
24 } for
25 restore
26 fill
27
28 /target get (out.png) write-to-png pop
29 pop