当前位置: 首页>>代码示例>>Python>>正文


Python Image.uvsize方法代码示例

本文整理汇总了Python中kivy.core.image.Image.uvsize方法的典型用法代码示例。如果您正苦于以下问题:Python Image.uvsize方法的具体用法?Python Image.uvsize怎么用?Python Image.uvsize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在kivy.core.image.Image的用法示例。


在下文中一共展示了Image.uvsize方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from kivy.core.image import Image [as 别名]
# 或者: from kivy.core.image.Image import uvsize [as 别名]
 def __init__(self, *args, **kw):
     super(RootWidget, self).__init__(*args, **kw)
     texture = Image('wood.png').texture
     texture.wrap = 'repeat'
     texture.uvsize = (8, 8)
     with self.canvas:
         Rectangle(size=(2048, 2048), texture=texture)
开发者ID:letaiefbechir,项目名称:kivy.tips,代码行数:9,代码来源:main.py

示例2: getTexture

# 需要导入模块: from kivy.core.image import Image [as 别名]
# 或者: from kivy.core.image.Image import uvsize [as 别名]
 def getTexture(self,name, size):
     filename = join('art', name+'.png')
     texture = Image(filename).texture
     texture.wrap = 'repeat'
     texture.uvsize = size
     self.logger.info(filename)
     return texture
开发者ID:Jvatinsa,项目名称:spylight,代码行数:9,代码来源:main.py

示例3: __init__

# 需要导入模块: from kivy.core.image import Image [as 别名]
# 或者: from kivy.core.image.Image import uvsize [as 别名]
	def __init__(self, *args, **kwargs) :
		super(ScreenNexus, self).__init__(*args, **kwargs)
		texture = Image(os.path.join("res", "tile.png")).texture # Create background texture
		texture.wrap = "repeat"
		texture.uvsize = (12, 24)
		
		with self.canvas.before : # Draw background
			Color(1, 1, 1)
			Rectangle(texture = texture, size = (Window.width, Window.height), pos = self.pos)
开发者ID:redevined,项目名称:BrennerAssistentenApp,代码行数:11,代码来源:main.py

示例4: grass_background

# 需要导入模块: from kivy.core.image import Image [as 别名]
# 或者: from kivy.core.image.Image import uvsize [as 别名]
def grass_background(widget):
    bg_texture = Image('resources/grass/grass-texture.png', nocache=True).texture
    # get POT texture
    #bg_texture = bg_texture.get_region(0, 0, 64, 64)
    #bg_texture.uvpos = (0, 0)
    bg_texture.uvsize = (35, 35)
    bg_texture.wrap = 'repeat'
    # fill all the background
    with widget.canvas.before:
        Rectangle(pos=(0, 0), size=(2560, 2560), texture=bg_texture)
开发者ID:nskrypnik,项目名称:moonrabbit,代码行数:12,代码来源:ui.py

示例5: set_background

# 需要导入模块: from kivy.core.image import Image [as 别名]
# 或者: from kivy.core.image.Image import uvsize [as 别名]
 def set_background(self):
     texture = Image('resources/interface/modal-background.png').texture
     texture.wrap = 'repeat'
     texture.uvsize = (2, 1)
     with self.canvas.before:
         Rectangle(texture=texture, size=self.size, pos=self.pos)
开发者ID:nskrypnik,项目名称:moonrabbit,代码行数:8,代码来源:msgbox.py

示例6: getTexture

# 需要导入模块: from kivy.core.image import Image [as 别名]
# 或者: from kivy.core.image.Image import uvsize [as 别名]
def getTexture(name, size):
    filename = join('art', name+'.png')
    texture = Image(filename).texture
    texture.wrap = 'repeat'
    texture.uvsize = size
    return texture
开发者ID:tdubourg,项目名称:spylight,代码行数:8,代码来源:bleh.py

示例7: getTexture

# 需要导入模块: from kivy.core.image import Image [as 别名]
# 或者: from kivy.core.image.Image import uvsize [as 别名]
def getTexture(name, size=(CELL_SIZE, CELL_SIZE)):
    filename = spritePath.format(name)
    texture = Image(filename).texture
    texture.wrap = 'repeat'
    texture.uvsize = size
    return texture
开发者ID:tdubourg,项目名称:spylight,代码行数:8,代码来源:utils.py


注:本文中的kivy.core.image.Image.uvsize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。