Exemplo n.º 1
0
 def __init__(self):
     self.hasDrawFunc = True
     self.hasEraseDrawFunc = True
     self.visible = True
     #self.texture = Texture( "../data/test1.png")
     self.easyTexture = EasyTexture("../data/test1.png")
     self.easyTexture.width = renderer.width * 0.8
     self.easyTexture.height = renderer.height * 0.8
     self.useDrawPixel = False  # For comparison debugging
Exemplo n.º 2
0
 def __init__(self, imageFilename="../data/test1.png"):
     self.hasDrawFunc = True
     self.hasEraseDrawFunc = True
     self.visible = True
     #self.texture = Texture( "../data/test1.png")
     self.easyTexture = EasyTexture(imageFilename, blend=False)
     #self.easyTexture.width = renderer.width * 0.8
     #self.easyTexture.height = renderer.height * 0.8
     self.easyTexture.width = renderer.width
     self.easyTexture.height = renderer.height
     self.useDrawPixel = False  # For comparison debugging
     self.useDrawPixel = False  # For comparison debugging
     self.xvel = 0.1
     self.yvel = 0.1
     self.xoffset = 0.0
     self.yoffset = 0.0
     self.easyTexture.zoom(2, 2)
Exemplo n.º 3
0
    def __init__(self,
                 origWidth=800,
                 origHeight=600,
                 textureScale=None,
                 dstRectScale=None):
        self.hasDrawFunc = True
        self.hasEraseDrawFunc = False
        self.visible = True
        #self.texture = Texture( "../data/test1.png")
        tmpImageFile = "../data/test1_darkgray.png"
        if not os.path.exists(tmpImageFile):
            tmpImageFile = "data/test1_darkgray.png"
        self.easyTexture = EasyTexture(tmpImageFile)
        self.easyTexture.setWidth(origWidth)
        self.easyTexture.setHeight(origHeight)
        self.videoSrc = None

        self.setTextureScale(textureScale)
        self.setDstRectScale(dstRectScale)