X-Git-Url: https://scm.cri.ensmp.fr/git/minwii.git/blobdiff_plain/a4026ac6cb2afe5804ca826f7e8fa04254d36d46..46f3ffd7fdde386f41020171b5733e55a8e64a85:/src/app/globals.py diff --git a/src/app/globals.py b/src/app/globals.py deleted file mode 100755 index 0dde5f3..0000000 --- a/src/app/globals.py +++ /dev/null @@ -1,27 +0,0 @@ -# -*- coding: utf-8 -*- -""" -constantes globales partagées par plusieurs modules. - -$Id$ -$URL$ -""" -from colorsys import hls_to_rgb -from math import floor - -BACKGROUND_LAYER = 0 -FOREGROUND_LAYER = 1 -CURSOR_LAYER = 2 -PLAYING_MODES = (('EASY' , u'Facile'), - ('NORMAL' , u'Normal'), - ('ADVANCED', u'Avancé'), - ('EXPERT' , u'Expert')) - - - -PLAYING_MODES_DICT = dict([(v[0], i) for i, v in enumerate(PLAYING_MODES)]) - -def hls_to_rgba_8bits(h, l, s, a=1) : - #convert to rgb ranging from 0 to 255 - rgba = [floor(255 * i) for i in hls_to_rgb(h, l, s) + (a,)] - return tuple(rgba) -