make bigger margins in poster
This commit is contained in:
parent
a8736b7805
commit
d4a8d92615
@ -51,18 +51,18 @@ def drawPoster(events, bg, fg, month:int):
|
|||||||
|
|
||||||
header = "DECENTRALA"
|
header = "DECENTRALA"
|
||||||
_, _, w, _ = draw.textbbox((0, 0), header, font=fontFacade)
|
_, _, w, _ = draw.textbbox((0, 0), header, font=fontFacade)
|
||||||
draw.text(((W-w)/2, 120), header, font=fontFacade, fill=fg)
|
draw.text(((W-w)/2, 50), header, font=fontFacade, fill=fg)
|
||||||
|
|
||||||
subheader = f"Plan za {MONTHS_SR[month.month - 1]}"
|
subheader = f"Plan za {MONTHS_SR[month.month - 1]}"
|
||||||
_, _, w, _ = draw.textbbox((0, 0), subheader, font=fontIosevka)
|
_, _, w, _ = draw.textbbox((0, 0), subheader, font=fontIosevka)
|
||||||
draw.text(((W-w)/2, 240), subheader, font=fontIosevka, fill=fg)
|
draw.text(((W-w)/2, 170), subheader, font=fontIosevka, fill=fg)
|
||||||
|
|
||||||
height = 370
|
height = 300
|
||||||
|
|
||||||
draw.text((120, height), "Radionice pocinju u 19h u DC Krovu", font=fontIosevkaSmall, fill=fg)
|
draw.text((50, height), "Radionice pocinju u 19h u DC Krovu", font=fontIosevkaSmall, fill=fg)
|
||||||
height += 60
|
height += 60
|
||||||
|
|
||||||
draw.text((120, height), "Svi dogadjaji su uvek besplatni", font=fontIosevkaSmall, fill=fg)
|
draw.text((50, height), "Svi dogadjaji su uvek besplatni", font=fontIosevkaSmall, fill=fg)
|
||||||
height += 90
|
height += 90
|
||||||
|
|
||||||
# Write list of events to sperate text file as well
|
# Write list of events to sperate text file as well
|
||||||
@ -81,7 +81,7 @@ def drawPoster(events, bg, fg, month:int):
|
|||||||
title = event["title"]
|
title = event["title"]
|
||||||
pad = " " if event["date"].day < 10 else ""
|
pad = " " if event["date"].day < 10 else ""
|
||||||
eventText = f"{date} {day}. {pad} {title}"
|
eventText = f"{date} {day}. {pad} {title}"
|
||||||
draw.text((120, height), eventText, font=fontIosevkaSmall, fill=fg)
|
draw.text((50, height), eventText, font=fontIosevkaSmall, fill=fg)
|
||||||
height += 70
|
height += 70
|
||||||
|
|
||||||
# Add event to textfile
|
# Add event to textfile
|
||||||
@ -93,8 +93,8 @@ def drawPoster(events, bg, fg, month:int):
|
|||||||
r = 10
|
r = 10
|
||||||
draw.ellipse((x - r, y - r, x + r, y+r), fill=fg, outline=(0, 0, 0), width=0)
|
draw.ellipse((x - r, y - r, x + r, y+r), fill=fg, outline=(0, 0, 0), width=0)
|
||||||
|
|
||||||
LCX = 950 # logo center x
|
LCX = 1050 # logo center x
|
||||||
LCY = 1200 # logo center y
|
LCY = 1300 # logo center y
|
||||||
d = 50 # delta
|
d = 50 # delta
|
||||||
drawCircle(LCX - d, LCY)
|
drawCircle(LCX - d, LCY)
|
||||||
drawCircle(LCX, LCY)
|
drawCircle(LCX, LCY)
|
||||||
|
Loading…
Reference in New Issue
Block a user