import pygame
from element import Element

class Image(Element):
	def init(self):
		self.image = None
		self.draw()

	def draw(self):
		if not self.image: return
		self.surface.fill((255,255,255, 0))
		self.surface.blit(self.image, (0,0))

	def loadImage(self, path):
		self.image = pygame.image.load(path)
		self.image = self.image.convert_alpha()
		self.draw()

	def setSurface(self, surface):
		self.image = surface
		self.draw()
