Commit before breaking everything
[matches/honours.git] / research / transmission_spectroscopy / simulator / pgu-0.18 / examples / html1.py
1 """<title>an example of html usage</title>"""
2 import pygame
3 from pygame.locals import *
4
5 # the following line is not needed if pgu is installed
6 import sys; sys.path.insert(0, "..")
7
8 from pgu import html
9
10 pygame.font.init()
11
12 screen = pygame.display.set_mode((320,320),SWSURFACE)
13 fg = (0,0,0)
14 bg = (255,255,255)
15 screen.fill(bg)
16
17 font = pygame.font.SysFont("sans", 16)
18
19 ##::
20 html.write(screen,font,pygame.Rect(0,0,320,320),"""
21 <p>Welcome to my humble website.</p>
22 <p><img src='cuzco.png' align=right>As usual we have an image of
23 Cuzco included in every location we could possibly think of.</p>
24 <p align='center'>Cuzco is a <b>very big</b> goat.</p>
25 <p align='right'><img src='cuzco.png' align=left>
26 If I wanted to be really silly, I would be sure to add link
27 ability to this module.  But that would be gold plating.</p>
28 """)
29 ##
30
31 pygame.display.flip()
32
33 _quit = 0
34 while not _quit:
35     for e in pygame.event.get():
36         if e.type is QUIT: _quit = 1
37     pygame.time.wait(10)

UCC git Repository :: git.ucc.asn.au