Reset default values

This commit is contained in:
Maximilian Giller 2019-04-08 16:08:20 +02:00
parent 7d0b38c479
commit 4d0b7009cd

View file

@ -9,8 +9,10 @@ truncateerror_fontsize = 0.5
class TextDesign (DesignEntity):
"""Object that manages all information relevant to text
and prints it to an image"""
def __init__ (self, size, color=colors["fg"], background_color=colors["bg"], font = defaultfont, fontsize = defaultfontsize, text = "", horizontalalignment = "left", verticalalignment = "top", mask=True, truncate=False, truncate_suffix = '...', wrap=False):
def __init__ (self, size, color=colors["fg"], background_color=colors["bg"], font = None, fontsize = defaultfontsize, text = "", horizontalalignment = "left", verticalalignment = "top", mask=True, truncate=False, truncate_suffix = '...', wrap=False):
super(TextDesign, self).__init__(size, mask = mask)
if font is None:
font = defaultfont
self.font_family = font
self.font_size = fontsize
self.text = text