Skip to content

Commit

Permalink
Merge pull request #436 from phst-randomizer/dependabot/pip/base/pill…
Browse files Browse the repository at this point in the history
…ow-10.2.0

Bump pillow from 10.0.1 to 10.2.0 in /base
  • Loading branch information
mike8699 committed Apr 2, 2024
2 parents 8eb78b1 + ffde6a7 commit eecb8f7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
15 changes: 6 additions & 9 deletions base/data/_title_screen.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,16 @@ def insert_title_screen(

if version_string:
draw = ImageDraw.Draw(img)
draw.fontmode = '1' # disable anti-aliasing on text

# Calculate size/location to put version string
img_width, img_height = img.size
_, _, text_width, text_height = draw.textbbox((0, 0), version_string)
_, _, text_width, text_height = draw.textbbox(xy=(0, 0), text=version_string, font_size=10)
x = img_width - text_width - 2
y = img_height - text_height

# draw rectangle to go behind text
draw.rectangle(
(x - 4, y - 2, x + text_width + 3, y + text_height),
fill=(209, 36, 37),
)
y = img_height - text_height - 2

# draw text
draw.text((x, y), version_string, fill=(20, 68, 115), stroke_width=4, stroke_fill=(0, 0, 0))
draw.text((x, y), version_string, fill=(20, 68, 115), font_size=10)

image_data = AutoList()
palette_data: list[tuple[int, int, int]] = []
Expand Down
2 changes: 1 addition & 1 deletion base/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
click==8.1.3
ndspy==4.1.0
Pillow==10.0.1
Pillow==10.2.0
zed @ git+https://github.com/phst-randomizer/zed.git@5ee969236bf3c3d0707da963e5edc818ddf246d3

0 comments on commit eecb8f7

Please sign in to comment.