Commit 23ed610c authored by Amélie Dumont's avatar Amélie Dumont
parents a48cf4f5 e755ac76
......@@ -58,9 +58,6 @@ s = shape().nostroke().fill(choice((red1, red2, red3)))
p.place(s.rect(10, 10, 180, 220))
# 4 - fonts, kerning, svg
p = d.addpage()
......
This diff is collapsed.
......@@ -12,7 +12,7 @@ boundary = shape().width(0.12)
sigma = document(SIZE, SIZE, 'mm')
page = sigma.addpage()
for i in range(500000):
for i in range(50000):
angle = 2*pi*random()
radius = normalvariate(0, 1)*r
x = cos(angle)*radius + cx
......@@ -22,4 +22,4 @@ for i in range(500000):
for i in range(3, 4):
page.place(boundary.circle(cx, cy, r*i))
sigma.pdf('sigma.pdf')
\ No newline at end of file
sigma.pdf('sigma.pdf')
This diff is collapsed.
......@@ -10,16 +10,30 @@ def layout(author, title, paragraphs):
headline.paragraph(title),
body.paragraph('')]
pieces.extend(body.paragraph(p) for p in paragraphs)
doc = document(100, 210, 'mm')
doc = document(140, 210, 'mm')
page = doc.addpage()
block = page.place(text(pieces))
while block.frame(18, 21, 114, 167).overflow():
page = doc.addpage()
nn = 0
folio = 1
while block.frame(18, 10, 50, 167).overflow():
if nn == 1:
block.frame(70, 20, 50, 160)
page = doc.addpage()
nn = 0
elif nn == 0:
block.frame(10, 20, 50, 160)
nn = 1
block = page.chain(block)
folio = folio + 1
page = doc.addpage()
return doc
fichier = codecs.open("songe.txt", "r", "utf-8")
lignes_brutes = fichier.readlines()
print(lignes_brutes)
fichier.close()
......@@ -29,5 +43,4 @@ for l in lignes_brutes:
lignes.append(l.replace("\n", "").replace("/"," /".replace(";", " ;")))
doc = layout('author', 'titre', lignes)
doc.pdf('layout.pdf')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment