2 from pdflib_py import *
4 PDF_open_file(p, "pattern.pdf")
6 PDF_set_parameter(p, "usercoordinates", "true")
7 PDF_set_info(p, "Creator", "pattern.py")
12 PDF_begin_page(p, width, height)
14 PDF_setrgbcolor_stroke(p, 0, 0, 0.9)
15 PDF_setrgbcolor_fill(p, 0.7, 0.7, 0.0)
16 pattern = PDF_begin_pattern(p, 4, 4, 4, 4, 2)
30 PDF_setcolor(p, "fill", "pattern", pattern, 0.0, 0.9, 0.0)
32 PDF_lineto(p, width-100, 0)
33 PDF_lineto(p, width-100, height)
34 PDF_lineto(p, 0, height)