mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
Added example image [ci skip]
This commit is contained in:
parent
11c9e6c0dd
commit
28f0940d59
|
@ -28,6 +28,22 @@ the ``fill`` parameter.
|
||||||
draw.multiline_text((10, 10), "A\nB", "#f00", font,
|
draw.multiline_text((10, 10), "A\nB", "#f00", font,
|
||||||
stroke_width=2, stroke_fill="#0f0")
|
stroke_width=2, stroke_fill="#0f0")
|
||||||
|
|
||||||
|
For example,
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
from PIL import Image, ImageDraw, ImageFont
|
||||||
|
|
||||||
|
im = Image.new("RGB", (120, 130))
|
||||||
|
draw = ImageDraw.Draw(im)
|
||||||
|
font = ImageFont.truetype("Tests/fonts/FreeMono.ttf", 120)
|
||||||
|
draw.text((10, 10), "A", "#f00", font, stroke_width=2, stroke_fill="#0f0")
|
||||||
|
|
||||||
|
|
||||||
|
creates the following image:
|
||||||
|
|
||||||
|
.. image:: ../../Tests/images/imagedraw_stroke_different.png
|
||||||
|
|
||||||
API Changes
|
API Changes
|
||||||
===========
|
===========
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user