Example #1
0
    def mouseDown(self,x,y):
        # swap images on the fly
        f = utilities.path("data/ixi2.png")
        self.a.setImage(f)
        self.aa.setImage(f)

        f = utilities.path("data/im.bmp")
        self.b.setImage(f)
        self.c.setImage(f)
        self.b.flipH()
Example #2
0
    def mouseDown(self, x, y):
        # swap images on the fly
        f = utilities.path("data/ixi2.png")
        self.a.setImage(f)
        self.aa.setImage(f)

        f = utilities.path("data/im.bmp")
        self.b.setImage(f)
        self.c.setImage(f)
        self.b.flipH()
Example #3
0
File: 09audio.py Project: msarch/py
    def start(self):
        """ First thing to happen after the instance has been initalisiated
            good place to instanciate classes and init stuff
        """
	self.initAudio()
        
	self.c = SoundBlob()
        self.ch = self.findFreeChannel() # we need to remember the channel to be able to change the vol and pan

        f = utilities.path("data/tone.aiff")
        self.playSound(f, loop=-1)
Example #4
0
    def start(self):
        """ First thing to happen after the instance has been initalisiated
            good place to instanciate classes and init stuff
        """
        f = utilities.path("data/im.bmp")

        self.a = Bitmap(f, 150, 250, 0, 200,200)
        self.a.tile(4)
        self.a.flipV()

        self.aa = Bitmap(f, 350, 150, 1, 200, 250)
        self.aa.tile(2)

        f = utilities.path("data/ixi2.png")

        self.b = Bitmap(f, 450, 250, 3, 200, 150, rotation=25)
        self.b.flipH()
##        self.b.tile(0)
        
        self.c = BitmapPolygon(f, [(10, 10), (100,5), (120, 200), (30, 100)], 2)
Example #5
0
    def start(self):
        """ First thing to happen after the instance has been initalisiated
            good place to instanciate classes and init stuff
        """
        f = utilities.path("data/ixi2.png")

        for i in range(50):
            x, y = utilities.randPoint(0, 0, self.width, self.height)
            d = utilities.randint(30, 50)
            bl = ImageBlob(f, x, y, i, d, d)
            bl.interactiveState = 2  #draggable
Example #6
0
    def start(self):
        """ First thing to happen after the instance has been initalisiated
            good place to instanciate classes and init stuff
        """
        f = utilities.path("data/ixi2.png")

        for i in range(50):
            x,y = utilities.randPoint(0, 0, self.width, self.height)
            d = utilities.randint(30, 50)
            bl = ImageBlob(f, x, y, i, d, d)
            bl.interactiveState = 2 #draggable
Example #7
0
    def start(self):
        """ First thing to happen after the instance has been initalisiated
            good place to instanciate classes and init stuff
        """
        self.bgColor = 0.3, 1, 1

        f = utilities.path("data/ixi2.png")
        self.a = Bitmap(f, 300, 200, 0, 100, 100, 45)
        b = Bitmap(f, 300, 200, 0, 200, 100)
        b.interactiveState = 2
        b.blend = 0.5
        BitmapPolygon(f, [(10, 10), (100, 5), (120, 200), (30, 100)], 1, -3)
Example #8
0
    def start(self):
        """ First thing to happen after the instance has been initalisiated
            good place to instanciate classes and init stuff
        """
        self.bgColor = 0.3, 1, 1

        f = utilities.path("data/ixi2.png")
        self.a = Bitmap(f, 300, 200, 0, 100, 100, 45)
        b = Bitmap(f, 300, 200, 0, 200, 100)
        b.interactiveState = 2
        b.blend = 0.5
        BitmapPolygon(f, [(10, 10), (100,5), (120, 200), (30, 100)], 1, -3)
Example #9
0
    def start(self):
        """ First thing to happen after the instance has been initalisiated
            good place to instanciate classes and init stuff
        """
        f = utilities.path("data/im.bmp")

        self.a = Bitmap(f, 150, 250, 0, 200, 200)
        self.a.tile(4)
        self.a.flipV()

        self.aa = Bitmap(f, 350, 150, 1, 200, 250)
        self.aa.tile(2)

        f = utilities.path("data/ixi2.png")

        self.b = Bitmap(f, 450, 250, 3, 200, 150, rotation=25)
        self.b.flipH()
        ##        self.b.tile(0)

        self.c = BitmapPolygon(f, [(10, 10), (100, 5), (120, 200), (30, 100)],
                               2)
Example #10
0
File: 09audio.py Project: msarch/py
 def __init__(self):
     Circle.__init__(self, 100, 100, 1, 100, color=(1,0,0)) # hard wired props
     self.interactiveState = 2
     self.s = utilities.path("data/beep1.aiff")
     self.app.preLoadSound(self.s) # it can be preloaded if you want