def __init__(self, bounds=[0, 0, 100, 20], text="", fontfile="", image_file="", image_align=1, font_size=12, text_align=1): PLabel.new.__init__(self, bounds, text, fontfile, font_size, text_align) if image_file != "": self._image = PImage.new(image_path=image_file) else: self._image = None self.imageAlign = image_align self.imageOffset = 0 self.drawFrame = True
def image(self, path): self._image = PImage.new(image_path=path)