def __init__(self, img, ani_xy=100): self.ani_xy = ani_xy self.img = img.resize((self.ani_xy, self.ani_xy)) self.gif = TopWindow() self.gif.size = (ani_xy, ani_xy) self.gif.position = self.get_mid((ani_xy, ani_xy)) self.txt = TopWindow() self.blank = graphics.Image.new((1, 1)) self.ani_xy = ani_xy
def __init__(self,img,ani_xy=100): self.status=0 self.wait=0.01 self.ani_xy=ani_xy self.img=graphics.Image.open(img).resize((self.ani_xy,self.ani_xy)) self.gif=TopWindow() self.gif.size=(ani_xy, ani_xy) self.gif.position=self.get_mid((ani_xy,ani_xy)) self.txt=TopWindow() self.blank=graphics.Image.new((1,1)) self.ani_xy=ani_xy
def __init__(self, items, title=u'Menu:'): self.items = items self.title = title self.capture = KeyCapturer(self.keys_answer) self.window_main = TopWindow() self.window_add1 = TopWindow() self.window_add2 = TopWindow() self.y, self.y1, self.y2, self.flag1, self.flag2 = 0, 0, 0, 0, 0 try: self.size_display = aw.app.layout(aw.EScreen)[0] except AttributeError: self.size_display = (176, 208)
def __init__(self): self.old_func_focus = appuifw.app.focus appuifw.app.focus = self.focus self.focusflag = 1 if e32.s60_version_info >= (2, 8): self.scr = appuifw.app.layout(appuifw.EScreen)[0] else: self.scr = (176, 208) img_none = Image.new((1, 1)) h = img_none.measure_text(u'by', 'annotation')[0] self.__h_text = h[3] - h[1] self.__dislocation_text = h[3] h2 = img_none.measure_text(u'by', 'dense')[0] h_text2 = h2[3] - h2[1] self.__dislocation_text2 = h2[3] self.__sizeW = 6 + h_text2 self.__sizeY = self.__sizeW + self.__h_text * 2 + 6 self.img = Image.new((self.scr[0] - 10, self.__sizeY)) self.top_shadow = TopWindow() x = max(self.scr) self.top_shadow.position = (-x, -x) self.top_shadow.shadow = x / 2 self.window = TopWindow() self.window.size = (self.scr[0] - 10, self.__sizeY) self.window.position = (5, self.scr[1] / 2 - self.__sizeY / 2) self.color_background = 0x555500 self.color_text = 0xffffff self.color_background2 = 0xffffff self.color_text2 = 0x707070 self.img1 = Image.new((self.scr[0] - 22, self.__sizeW), mode = 'RGB') self.img2 = Image.new((self.scr[0] - 22, self.__sizeW - 2), mode = 'RGB') self.img_gradient = Image.new((self.scr[0] - 22, self.__sizeW - 2), mode = 'RGB') r = 255 / ((self.scr[0] - 22) / 4.0) for i in xrange(self.scr[0] - 22): if i <= (self.scr[0] - 22) / 4.0: self.img_gradient.line((i, 0, i, self.__sizeW - 2), (255, int(i * r), 0)) elif (self.scr[0] - 22) / 4.0 < i <= (self.scr[0] - 22) / 2.0: self.img_gradient.line((i, 0, i, self.__sizeW - 2), (int(255 - (i - (self.scr[0] - 22) / 4.0) * r), 255, 0)) elif (self.scr[0] - 22) / 2.0 < i <= (self.scr[0] - 22) * 3 / 4.0: self.img_gradient.line((i, 0, i, self.__sizeW - 2), (0, 255, int((i - (self.scr[0] - 22) / 2.0) * r))) else: self.img_gradient.line((i, 0, i, self.__sizeW - 2), (0, int(255 - (i - (self.scr[0] - 22) * 3 /4.0) * r), 255)) e32.ao_yield()
app = Q.QApplication(sys.argv) # player = Player() args = list() kwargs = dict() for arg in sys.argv[1:]: if '=' in arg: parts = arg.partition('=') kwargs[parts[0]] = parts[2] else: args.append(arg) with SignalWakeupHandler(app): signal.signal(signal.SIGINT, lambda *a:app.quit()) win = TopWindow(*args, **kwargs) fmt = Q.QOpenGLContext.globalShareContext().format() print('OpenGLFormat:\n') print('version={}'.format(fmt.version())) print('samples={}'.format(fmt.samples())) print('redBufferSize={}'.format(fmt.redBufferSize())) print('greenBufferSize={}'.format(fmt.greenBufferSize())) print('blueBufferSize={}'.format(fmt.blueBufferSize())) print('alphaBufferSize={}'.format(fmt.alphaBufferSize())) print('depthBufferSize={}'.format(fmt.depthBufferSize())) print('stencilBufferSize={}'.format(fmt.stencilBufferSize())) print('swapBehavior={}'.format(fmt.swapBehavior())) print('swapInterval={}'.format(fmt.swapInterval())) print('debugContext={}'.format(fmt.testOption(fmt.DebugContext))) print('deprecatedFunctions={}'.format(fmt.testOption(fmt.DeprecatedFunctions))) print('renderable={}'.format(fmt.renderableType()))