class RedDotAni(): dotColorR = 0xff dotColorG = 0xff dotColorB = 0xff frameCnt = 0 font1LineChars = { "$":""" #*#*#*#*#* #*##**#*## #****#*##* ##***#**## #***##**** #*#*##*#*# ##****#*#* ##**###### #*#***###* ########## """ } def __init__(self): self.fontObj = PyFcFonts(self.font1LineChars) def frameupdate(self, frame): self.frameCnt+=1 self.fontObj.drawText(frame, 0, 0, "$", 0x48, 0x48, 0x48) if self.frameCnt > 60: return True
class RedDotAni(): dotPosX = 10 dotPosY = 0 dotColorR = 0xef dotColorG = 0x30 dotColorB = 0x10 repiet = 0 #text = "C3MA - CHAOS IM QUADRAT" text = "SEXIEST ERFA 2012 -" # text = "29C3 - NOT MY DEPARTMENT" frameCnt = 0 def __init__(self): self.fontObj = PyFcFonts(PyFcFonts.font2LineChars) def frameupdate(self, frame): self.frameCnt+=1 for x in range(0,frame.getWidth()): for y in range(0,frame.getHeight()): frame.setColorForPixel(x,y,0x88,0x88,0x88) self.fontObj.drawText(frame, self.dotPosX, 1, self.text, self.dotColorR, self.dotColorG, self.dotColorB) # if self.frameCnt > 253: # return None if (self.frameCnt % 1) == 0: self.dotPosX -= 1 if self.dotPosX < (len(self.text)+1)*-5: self.repiet += 1 if self.repiet > 10: return True else: self.dotPosX = 10
class ClockAni(): frameCnt = 0 dotColorR = 0x00 dotColorG = 0x00 dotColorB = 0xff dpOn = True def __init__(self): self.fontObj = PyFcFonts(PyFcFonts.font2LineNumbers) def frameupdate(self, frame): h = time.strftime("%H") m = time.strftime("%M") self.fontObj.drawText(frame, 0,0, h +"\n"+ m , self.dotColorR, 0x00, self.dotColorB) self.frameCnt+=1 if self.frameCnt > 253: return True if self.dotColorB >= 0x00 and self.dotColorR <= 0xff: self.dotColorB -= 2 self.dotColorR += 2 else: self.dotColorB = 0xff self.dotColorR = 0x00 if (self.frameCnt % 30) == 0: self.dpOn = not self.dpOn if self.dpOn: self.fontObj.drawText(frame, frame.getWidth() -3,3, ":" , 0x00, 0xff, 0x00)
def __init__(self): self.fontObj = PyFcFonts(self.font1LineChars)
def __init__(self): self.fontObj = PyFcFonts(PyFcFonts.font2LineNumbers)