/[gquickdraw]/gquickdraw/examples/raster.py
ViewVC logotype

Contents of /gquickdraw/examples/raster.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download) (as text)
Wed Nov 13 13:27:36 2002 UTC (21 years, 5 months ago) by grumbel
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/x-python
initial checkin

1 from gquickdraw import *
2 import time
3
4 gd_init_screen(500, 500, 1)
5
6 for i in range(1,500, 10):
7 gd_set_fg_color(0xFF0000)
8 gd_draw_line(0, i, i, 500)
9
10 gd_set_fg_color(0x00FF00)
11 gd_draw_line(i, 0, 0, 500-i)
12
13 gd_set_fg_color(0x0000FF)
14 gd_draw_line(i, 0, 500, i)
15
16 gd_set_fg_color(0xFF00FF)
17 gd_draw_line(i, 500, 500, 500-i)
18
19 gd_set_fg_color(0xFFFFFF)
20 gd_set_bg_color(0x000000)
21
22 f=open("../examples/raster.py", "r")
23 lines = f.readlines()
24
25 y = 105
26 for i in lines:
27 gd_draw_string (165, y, i[:-1])
28 y += 10
29
30 gd_flip_screen()
31 time.sleep(10)
32

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26