Example #1
0
from fillCanvas import fillCanvas
from handlers import createHandlers
from update import update
import mpd, math
client = mpd.MPDClient()
client.connect("localhost", 6600)

root = Tk()
root.overrideredirect(True)
root.wait_visibility(root)

root.is_dragging = False
root.is_seeking = False
root.is_adjvol = False

root.SkinRoot = "./theme/"
root.SkinType = ".png"
root.images = {}
root.imgFile = {}


def getImageFile(name):
    if not name in root.imgFile:
        print("Loading image", name)
        root.imgFile[name] = Image.open(root.SkinRoot + name + root.SkinType)
    return root.imgFile[name]


def getImage(name, rename, cx, cy, cw, ch):
    if not rename in root.images:
        print("Cropping image", rename, "from", name)