bugfixes in jpeg.c
[swftools.git] / spec / layers.py
1 from sys import * 
2 from pdflib_py import * 
3
4 p = PDF_new() 
5 PDF_open_file(p, "layers.pdf")
6
7 PDF_set_parameter(p, "usercoordinates", "true")
8 PDF_begin_page(p, 500, 200)
9
10 font = PDF_load_font(p, "Helvetica-Bold", "host", "")
11 PDF_setfont(p, font, 80.0)
12 PDF_set_text_pos(p, 0, 10)
13 PDF_show(p, "Bottom Text")
14
15 PDF_setrgbcolor_stroke(p, 0, 1.0, 1.0)
16 PDF_setlinewidth(p, 10)
17 PDF_moveto(p, 0, 0)
18 PDF_lineto(p, 500, 100)
19 PDF_stroke(p)
20 PDF_moveto(p, 0, 100)
21 PDF_lineto(p, 500, 0)
22 PDF_stroke(p)
23
24 PDF_setrgbcolor_fill(p, 0, 0, 1.0)
25 PDF_moveto(p, 350, 25)
26 PDF_lineto(p, 490, 25)
27 PDF_lineto(p, 490, 75)
28 PDF_lineto(p, 350, 75)
29 PDF_lineto(p, 350, 25)
30 PDF_fill(p)
31
32 PDF_setrgbcolor_fill(p, 1, 1, 0)
33 PDF_set_text_pos(p, 400, 20);PDF_show(p, "A")
34 PDF_set_text_pos(p, 400, 80);PDF_show(p, "B")
35 PDF_set_text_pos(p, 400, 140);PDF_show(p, "C")
36
37
38 PDF_end_page(p)
39
40 PDF_close(p)
41 PDF_delete(p);