本文整理汇总了Python中kivy.uix.image.Image.nocache方法的典型用法代码示例。如果您正苦于以下问题:Python Image.nocache方法的具体用法?Python Image.nocache怎么用?Python Image.nocache使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kivy.uix.image.Image
的用法示例。
在下文中一共展示了Image.nocache方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from kivy.uix.image import Image [as 别名]
# 或者: from kivy.uix.image.Image import nocache [as 别名]
def __init__(self, **kwargs):
super(RootWidget, self).__init__(**kwargs)
if bHooking:
print "bHooking is true"
self.hm = hooklib.HookManager()
print "HookManager set to self.hm"
self.hm.HookKeyboard()
self.hm.KeyDown = self.OnKeyDownEvent
self.hm.start()
self.photos = []
self.shown = []
self.photos = glob.glob(strDir + "*.jpg")
global intCount
#global sngInterval
intCount = len(self.photos)
strImage = random.choice(self.photos)
img = Image(source=strImage, id='MainImage')
img.nocache = True
#img.canvas.color = (1, 1, 1)
#Turn on allow_stretch to upscale smaller images to fullscreen
img.allow_stretch = True
self.add_widget(img)
if True:
cb = CustomBtn(size_hint=(1,1), font_size=strFontSize)
cb.bind(pressed=self.btn_pressed)
#cb.text = 'This is a test.'
cb.id = 'MainButton'
cb.bind(texture_size=cb.setter('size'))
cb.bind(size=cb.setter('text_size'))
self.add_widget(cb)
self.show_next_image()
if not bReschedule:
Clock.unschedule(self.show_next_image)
Clock.schedule_interval(self.show_next_image, sngInterval)
if bUseLCD:
Clock.schedule_interval(self.CheckLCD, 0.1)