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


Python Image.wrap方法代码示例

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


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

示例1: set_texture

# 需要导入模块: from kivy.core.image import Image [as 别名]
# 或者: from kivy.core.image.Image import wrap [as 别名]
 def set_texture(self,path):
     #from kivy.core.image import Image
     tex = Image(path).texture
     tex.wrap = 'repeat'
     self.texture_sidebar = tex
     #tex = Image('style/1.png').texture
     if tex is not None:
         tex.wrap = 'repeat'
         self.texture = tex
开发者ID:triselectif,项目名称:Rongo-Rongo,代码行数:11,代码来源:appview.py

示例2: __init__

# 需要导入模块: from kivy.core.image import Image [as 别名]
# 或者: from kivy.core.image.Image import wrap [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

示例3: getTexture

# 需要导入模块: from kivy.core.image import Image [as 别名]
# 或者: from kivy.core.image.Image import wrap [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

示例4: __init__

# 需要导入模块: from kivy.core.image import Image [as 别名]
# 或者: from kivy.core.image.Image import wrap [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

示例5: grass_background

# 需要导入模块: from kivy.core.image import Image [as 别名]
# 或者: from kivy.core.image.Image import wrap [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

示例6: __init__

# 需要导入模块: from kivy.core.image import Image [as 别名]
# 或者: from kivy.core.image.Image import wrap [as 别名]
    def __init__(self, **kw):
        super(HelicopterGame, self).__init__(**kw)

        with self.canvas.before:
            texture = CoreImage('Images/background.png').texture
            texture.wrap = 'repeat'
            self.scroll_back = Rectangle(texture=texture, size=self.size, pos=self.pos)

            self.line=BezierLine()
            Clock.schedule_interval(self.update, 0)
开发者ID:foreverai,项目名称:Walls,代码行数:12,代码来源:walls.py

示例7: init_game

# 需要导入模块: from kivy.core.image import Image [as 别名]
# 或者: from kivy.core.image.Image import wrap [as 别名]
    def init_game(self):
        is_start = False

        # bring stage
        self.bring_stage()

        self.character.velocity = [self.block_size / self.speed_ratio, 0]

        # map init
        with self.background_widget.canvas:
            texture = CoreImage('data/blue_land.png').texture
            texture.wrap = 'repeat'
            self.rect_1 = Rectangle(
                texture=texture, size=self.size, pos=self.pos)
        self.character_pos_init()
        self.init_stage()
开发者ID:jalnanco,项目名称:MerryMe,代码行数:18,代码来源:main.py

示例8: load_tileable

# 需要导入模块: from kivy.core.image import Image [as 别名]
# 或者: from kivy.core.image.Image import wrap [as 别名]
 def load_tileable(self, name):
     t = Image('images/{}.png'.format(name)).texture
     t.wrap = 'repeat'
     setattr(self, 'tx_{}'.format(name), t)
开发者ID:biank88,项目名称:kivyteach,代码行数:6,代码来源:main.py

示例9: load_tileable

# 需要导入模块: from kivy.core.image import Image [as 别名]
# 或者: from kivy.core.image.Image import wrap [as 别名]
 def load_tileable(self, name):
     t = Image('%s.png' % name).texture
     t.wrap = 'repeat'
     setattr(self, 'tx_%s' % name, t)
开发者ID:tadachi,项目名称:kivy_review,代码行数:6,代码来源:main.py

示例10: set_background

# 需要导入模块: from kivy.core.image import Image [as 别名]
# 或者: from kivy.core.image.Image import wrap [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

示例11: getTexture

# 需要导入模块: from kivy.core.image import Image [as 别名]
# 或者: from kivy.core.image.Image import wrap [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

示例12: getTexture

# 需要导入模块: from kivy.core.image import Image [as 别名]
# 或者: from kivy.core.image.Image import wrap [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.wrap方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。