From d4a8d92615ac2b1ea20e50ee98d5713c0f1bc051 Mon Sep 17 00:00:00 2001 From: fram3d Date: Sat, 1 Jun 2024 12:56:02 +0200 Subject: [PATCH] make bigger margins in poster --- image_poster.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/image_poster.py b/image_poster.py index 28a21b25..f924deca 100755 --- a/image_poster.py +++ b/image_poster.py @@ -51,18 +51,18 @@ def drawPoster(events, bg, fg, month:int): header = "DECENTRALA" _, _, 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]}" _, _, 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 - 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 # Write list of events to sperate text file as well @@ -81,7 +81,7 @@ def drawPoster(events, bg, fg, month:int): title = event["title"] pad = " " if event["date"].day < 10 else "" 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 # Add event to textfile @@ -93,8 +93,8 @@ def drawPoster(events, bg, fg, month:int): r = 10 draw.ellipse((x - r, y - r, x + r, y+r), fill=fg, outline=(0, 0, 0), width=0) - LCX = 950 # logo center x - LCY = 1200 # logo center y + LCX = 1050 # logo center x + LCY = 1300 # logo center y d = 50 # delta drawCircle(LCX - d, LCY) drawCircle(LCX, LCY)