Added image to illustrate size vs bbox

This commit is contained in:
Andrew Murray 2024-02-19 17:08:21 +11:00
parent 617b9cbc00
commit 55d0289a7d
3 changed files with 12 additions and 4 deletions

View File

@ -253,8 +253,12 @@ Use instead::
width, height = right - left, bottom - top width, height = right - left, bottom - top
Previously, the ``size`` methods returned a ``height`` that included the vertical Previously, the ``size`` methods returned a ``height`` that included the vertical
offset of the text, while the new ``bbox`` methods explicitly distinguish this as a offset of the text, while the new ``bbox`` methods distinguish this as a ``top``
``top`` offset. offset.
.. image:: ./example/size_vs_bbox.png
:alt: Demonstration of size height vs bbox top and bottom
:align: center
FreeTypeFont.getmask2 fill parameter FreeTypeFont.getmask2 fill parameter
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -90,8 +90,12 @@ Use instead::
width, height = right - left, bottom - top width, height = right - left, bottom - top
Previously, the ``size`` methods returned a ``height`` that included the vertical Previously, the ``size`` methods returned a ``height`` that included the vertical
offset of the text, while the new ``bbox`` methods explicitly distinguish this as a offset of the text, while the new ``bbox`` methods distinguish this as a ``top``
``top`` offset. offset.
.. image:: ./example/size_vs_bbox.png
:alt: Demonstration of size height vs bbox top and bottom
:align: center
API Additions API Additions
============= =============