Skip to content

Commit

Permalink
Added release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Jan 31, 2025
1 parent 9a58456 commit ec72d20
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
10 changes: 8 additions & 2 deletions docs/reference/ImageDraw.rst
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,8 @@ Methods
``"left"``, ``"center"``, ``"right"`` or ``"justify"``. Determines
the relative alignment of lines. Use the ``anchor`` parameter to
specify the alignment to ``xy``.
.. versionadded:: 11.2.0 ``justify``

.. versionadded:: 11.2.0 ``"justify"``
:param direction: Direction of the text. It can be ``"rtl"`` (right to
left), ``"ltr"`` (left to right) or ``"ttb"`` (top to bottom).
Requires libraqm.
Expand Down Expand Up @@ -461,6 +461,8 @@ Methods
:param align: ``"left"``, ``"center"``, ``"right"`` or ``"justify"``. Determines
the relative alignment of lines. Use the ``anchor`` parameter to
specify the alignment to ``xy``.

.. versionadded:: 11.2.0 ``"justify"``
:param direction: Direction of the text. It can be ``"rtl"`` (right to
left), ``"ltr"`` (left to right) or ``"ttb"`` (top to bottom).
Requires libraqm.
Expand Down Expand Up @@ -606,6 +608,8 @@ Methods
``"left"``, ``"center"``, ``"right"`` or ``"justify"``. Determines
the relative alignment of lines. Use the ``anchor`` parameter to
specify the alignment to ``xy``.

.. versionadded:: 11.2.0 ``"justify"``
:param direction: Direction of the text. It can be ``"rtl"`` (right to
left), ``"ltr"`` (left to right) or ``"ttb"`` (top to bottom).
Requires libraqm.
Expand Down Expand Up @@ -658,6 +662,8 @@ Methods
:param align: ``"left"``, ``"center"``, ``"right"`` or ``"justify"``. Determines
the relative alignment of lines. Use the ``anchor`` parameter to
specify the alignment to ``xy``.

.. versionadded:: 11.2.0 ``"justify"``
:param direction: Direction of the text. It can be ``"rtl"`` (right to
left), ``"ltr"`` (left to right) or ``"ttb"`` (top to bottom).
Requires libraqm.
Expand Down
12 changes: 12 additions & 0 deletions docs/releasenotes/11.2.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,18 @@ TODO
API Additions
=============

"justify" multiline text alignment
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

In addition to "left", "center" and "right", multiline text can also be aligned using
"justify"::

from PIL import Image, ImageDraw
im = Image.new("RGB", (50, 25))
draw = ImageDraw.Draw(im)
draw.multiline_text((0, 0), "Multiline\ntext 1", align="justify")
draw.multiline_textbbox((0, 0), "Multiline\ntext 2", align="justify")

Check for MozJPEG
^^^^^^^^^^^^^^^^^

Expand Down

0 comments on commit ec72d20

Please sign in to comment.