mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-16 02:04:45 +03:00
PEP8'ing
This commit is contained in:
parent
2defce3431
commit
033661c17f
|
@ -310,7 +310,7 @@ class ImageDraw(object):
|
|||
lineHeightPercent = 100
|
||||
try:
|
||||
lineHeight = font.font.height
|
||||
except Exception as exc:
|
||||
except AttributeError:
|
||||
lineHeight = sum(font.getmetrics())
|
||||
lineHeight = int(lineHeight * lineHeightPercent / 100)
|
||||
|
||||
|
@ -348,7 +348,6 @@ class ImageDraw(object):
|
|||
font = self.getfont()
|
||||
ink, fill = self._getink(fill)
|
||||
if ink is None:
|
||||
inx = fill
|
||||
if ink is None:
|
||||
return
|
||||
if justifyX not in ('left', 'center', 'right'):
|
||||
|
@ -398,6 +397,16 @@ class ImageDraw(object):
|
|||
break
|
||||
oy += lineHeight
|
||||
|
||||
|
||||
##
|
||||
# A simple 2D drawing interface for PIL images.
|
||||
#
|
||||
# @param im The image to draw in.
|
||||
# @param mode Optional mode to use for color values. For RGB
|
||||
# images, this argument can be RGB or RGBA (to blend the
|
||||
# drawing into the image). For all other modes, this argument
|
||||
# must be the same as the image mode. If omitted, the mode
|
||||
# defaults to the mode of the image.
|
||||
def Draw(im, mode=None):
|
||||
"""
|
||||
A simple 2D drawing interface for PIL images.
|
||||
|
|
Loading…
Reference in New Issue
Block a user