Skip to content

Conversation

@radarhere
Copy link
Member

I see no reason to mention mode in the following docstring

Pillow/src/PIL/ImageFont.py

Lines 156 to 172 in 3c2d36e

def getbbox(self, text, *args, **kwargs):
"""
Returns bounding box (in pixels) of given text.
.. versionadded:: 9.2.0
:param text: Text to render.
:param mode: Used by some graphics drivers to indicate what mode the
driver prefers; if empty, the renderer may return either
mode. Note that the mode is always a string, to simplify
C-level implementations.
:return: ``(left, top, right, bottom)`` bounding box
"""
_string_length_check(text)
width, height = self.font.getsize(text)
return 0, 0, width, height

@hugovk hugovk merged commit 8b14ed7 into python-pillow:main May 25, 2024
@radarhere radarhere deleted the imagefont branch May 25, 2024 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants