X-Git-Url: https://git.ucc.asn.au/?p=matches%2Fhonours.git;a=blobdiff_plain;f=research%2Ftransmission_spectroscopy%2Fsimulator%2Fpgu-0.18%2Fexamples%2Fhtml1.py;fp=research%2Ftransmission_spectroscopy%2Fsimulator%2Fpgu-0.18%2Fexamples%2Fhtml1.py;h=70fb743ce8b8c27e3611e8f1fbbdf5430fa8e4b1;hp=0000000000000000000000000000000000000000;hb=70a96cca12cb006506461d26cd112bab179fe74c;hpb=8caf60af39689a3546074f0c68d14c3a2e28191e diff --git a/research/transmission_spectroscopy/simulator/pgu-0.18/examples/html1.py b/research/transmission_spectroscopy/simulator/pgu-0.18/examples/html1.py new file mode 100644 index 00000000..70fb743c --- /dev/null +++ b/research/transmission_spectroscopy/simulator/pgu-0.18/examples/html1.py @@ -0,0 +1,37 @@ +"""an example of html usage""" +import pygame +from pygame.locals import * + +# the following line is not needed if pgu is installed +import sys; sys.path.insert(0, "..") + +from pgu import html + +pygame.font.init() + +screen = pygame.display.set_mode((320,320),SWSURFACE) +fg = (0,0,0) +bg = (255,255,255) +screen.fill(bg) + +font = pygame.font.SysFont("sans", 16) + +##:: +html.write(screen,font,pygame.Rect(0,0,320,320),""" +

Welcome to my humble website.

+

As usual we have an image of +Cuzco included in every location we could possibly think of.

+

Cuzco is a very big goat.

+

+If I wanted to be really silly, I would be sure to add link +ability to this module. But that would be gold plating.

+""") +## + +pygame.display.flip() + +_quit = 0 +while not _quit: + for e in pygame.event.get(): + if e.type is QUIT: _quit = 1 + pygame.time.wait(10)