本文整理汇总了Python中resources.Resources.createComicVineLogo方法的典型用法代码示例。如果您正苦于以下问题:Python Resources.createComicVineLogo方法的具体用法?Python Resources.createComicVineLogo怎么用?Python Resources.createComicVineLogo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类resources.Resources
的用法示例。
在下文中一共展示了Resources.createComicVineLogo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: set_image
# 需要导入模块: from resources import Resources [as 别名]
# 或者: from resources.Resources import createComicVineLogo [as 别名]
def set_image(self, image):
'''
Sets a new image for this _PictureBoxPanel to display. If this image is
None, a default logo will be displayed. Any previous image that was set
will have its Dispose() method called before it is discarded.
'''
if not image:
image = Resources.createComicVineLogo()
self._ratio = 0;
if image and float(image.Height):
self._ratio = float(image.Width) / float(image.Height)
if not self._ratio:
self._ratio =1.55
# dispose the old image, if need be
if self._picbox.Image:
self._picbox.Image.Dispose()
self._picbox.Image = image
self.OnResize(None)
# update our mouse cursor
comicform = self.Parent
if comicform != None:
self.Cursor = Cursors.Hand if comicform._can_change_page(True) or \
comicform._can_change_page(False) else None
示例2: __init__
# 需要导入模块: from resources import Resources [as 别名]
# 或者: from resources.Resources import createComicVineLogo [as 别名]
def __init__(self):
''' Defines member variables for new instances of this class. '''
# the ref of whatever image should currently be displayed, or None
self.__current_image_ref = None
# a simple "last-in-and-ignore-everything-else" scheduler
self.__scheduler = Scheduler()
# our cache of loaded image objects. {(imageref,issuehint)->Image}
self.__image_cache = {}
# the image that gets displayed if we have nothing else to display
self.__unknown_image = Resources.createComicVineLogo()
# the image that gets displayed while we are loading another image
self.__loading_image = self.__copy_transparent(self.__unknown_image)
self._initialize()