Remove long deprecated ImageDraw methods

Deprecated in 89ccf66ff7 since Sep 29,
2015, version 3.0.0.
This commit is contained in:
Jon Dufresne 2016-11-13 10:08:47 -08:00
parent 76d156bef0
commit a5d6519d74
2 changed files with 0 additions and 23 deletions

View File

@ -31,7 +31,6 @@
#
import numbers
import warnings
from PIL import Image, ImageColor
from PIL._util import isStringType
@ -87,20 +86,6 @@ class ImageDraw(object):
self.fill = 0
self.font = None
def setink(self, ink):
raise NotImplementedError("setink() has been removed. " +
"Please use keyword arguments instead.")
def setfill(self, onoff):
raise NotImplementedError("setfill() has been removed. " +
"Please use keyword arguments instead.")
def setfont(self, font):
warnings.warn("setfont() is deprecated. " +
"Please set the attribute directly instead.")
# compatibility
self.font = font
def getfont(self):
"""Get the current default font."""
if not self.font:

View File

@ -44,14 +44,6 @@ class TestImageDraw(PillowTestCase):
draw.polygon(list(range(100)))
draw.rectangle(list(range(4)))
def test_removed_methods(self):
im = hopper()
draw = ImageDraw.Draw(im)
self.assertRaises(Exception, lambda: draw.setink(0))
self.assertRaises(Exception, lambda: draw.setfill(0))
def test_valueerror(self):
im = Image.open("Tests/images/chi.gif")