Adding Documentation for outline [ci-skip]

This commit is contained in:
Paddez 2016-11-15 10:53:30 +00:00
parent a22eedad07
commit 61baf1f088
No known key found for this signature in database
GPG Key ID: 1DB178216DA02CD1
4 changed files with 13 additions and 1 deletions

View File

@ -223,7 +223,6 @@ class ImageDraw(object):
return self.multiline_text(xy, text, fill, font, anchor, return self.multiline_text(xy, text, fill, font, anchor,
spacing, align, outline) spacing, align, outline)
ink, fill = self._getink(fill) ink, fill = self._getink(fill)
print("Outline: %s" % outline)
if font is None: if font is None:
font = self.getfont() font = self.getfont()
if ink is None: if ink is None:

View File

@ -240,6 +240,7 @@ Methods
the number of pixels between lines. the number of pixels between lines.
:param align: If the text is passed on to multiline_text(), :param align: If the text is passed on to multiline_text(),
"left", "center" or "right". "left", "center" or "right".
:param outline: Color to use to draw an outline around the text.
.. py:method:: PIL.ImageDraw.Draw.multiline_text(xy, text, fill=None, font=None, anchor=None, spacing=0, align="left") .. py:method:: PIL.ImageDraw.Draw.multiline_text(xy, text, fill=None, font=None, anchor=None, spacing=0, align="left")
@ -252,6 +253,7 @@ Methods
:param font: An :py:class:`~PIL.ImageFont.ImageFont` instance. :param font: An :py:class:`~PIL.ImageFont.ImageFont` instance.
:param spacing: The number of pixels between lines. :param spacing: The number of pixels between lines.
:param align: "left", "center" or "right". :param align: "left", "center" or "right".
:param outline: Color to use to draw an outline around the text.
.. py:method:: PIL.ImageDraw.Draw.textsize(text, font=None, spacing=0) .. py:method:: PIL.ImageDraw.Draw.textsize(text, font=None, spacing=0)

View File

@ -0,0 +1,10 @@
3.5.0
-----
New text-outlining feature
==========================
Both ``ImageDraw.text()`` and ``ImageDraw.multiline_text()`` now supports
text-stroking.
Passing in a color value to the methods using the ``outline`` keyword argument
will now outline the text in that color.

View File

@ -6,6 +6,7 @@ Release Notes
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2
3.5.0
3.4.0 3.4.0
3.3.2 3.3.2
3.3.0 3.3.0