E-Paper-Calendar/Calendar/EllipseDesign.py

15 lines
486 B
Python
Raw Permalink Normal View History

from BoxDesign import BoxDesign
from PIL import ImageDraw, ImageOps
2019-07-13 08:05:35 +02:00
class EllipseDesign (BoxDesign):
"""Redefinition of ImageDraw.Draw.Rectangle"""
2019-07-13 08:05:35 +02:00
def __init__(self, size, fill=None, outline=None, width=0):
2019-07-13 08:05:35 +02:00
super(EllipseDesign, self).__init__(
size, fill=fill, outline=outline, width=width)
2019-07-13 08:05:35 +02:00
def __finish_image__(self):
ImageDraw.Draw(self.__image__).ellipse(
self.corners, fill=self.fill, outline=self.outline, width=self.width)