Ejemplo n.º 1
0
def run():
    global x, exit

    exit = 0

    while not exit:

        for e in pg.event.get():
            if e.type == pg.QUIT:
                exit = True

        window.fill((100, 100, 100))

        x += 1
        x %= 360

        acomplex.arrect(window, (255, 0, 255, 100), [10, 10, 100, 100], x / 10)

        acomplex.acurve(window, (0, 0, 0, 100), [200, 200],
                        199,
                        x,
                        x + 180,
                        lnwidth=5)

        acomplex.atriangle(window, (0, 255, 255, 150), [150, 150],
                           40,
                           x,
                           usecenter=1)

        acomplex.atriangle(window, (255, 255, 255, 150), [200, 150],
                           20,
                           x,
                           usecenter=0)

        acomplex.avector(window, (255, 255, 255, 150), [200, 150], x, x, 3)

        acomplex.avector(window, (255, 255, 0, 150), [300, 300], x, x, 1)

        acomplex.aregpolygon(window, (255, 255, 255, 100), [300, 300], 50, 7,
                             x)

        acomplex.aregstar(window, (255, 255, 255, 150), [250, 400], 50, 9, 45,
                          2)

        acomplex.areggramm(window, (255, 255, 255, 150), [100, 300], 80, 8, 18)

        pg.display.update()

        c.tick(40)
Ejemplo n.º 2
0
		def draw( self ):

			d = 0
			for s in self.shadelist:

				if d > 255: d = 255
				su = p.Surface( ( int( 2 * self.w ), int( 2 * self.w ) ), p.SRCALPHA )

				sl = list( self.color )
				sl.append( d )
				complex.regpolygon( su, sl, [ int( self.w ), int( self.w ) ], int( self.w ), self.par.gon, s[ 2 ] )
				
				self.s.blit( su, [ int( s[ 0 ] - self.w ), int( s[ 1 ] - self.w ) ] )

				d += 128.0 / len( self.shadelist )

			acomplex.aregpolygon( self.s, self.color, ( int( self.x ), int( self.y ) ), int( self.w ), self.par.gon, self.rot )
Ejemplo n.º 3
0
def run():
	global x, exit

	exit = 0

	while not exit:

		for e in pg.event.get():
			if e.type == pg.QUIT:
				exit = True

		window.fill((100, 100, 100))

		x += 1
		x %= 360

		

		acomplex.arrect(window, (255, 0, 255, 100), [ 10, 10, 100, 100 ], x / 10)

		acomplex.acurve(window, (0, 0, 0, 100), [200, 200], 199, x, x + 180, lnwidth=5)

		acomplex.atriangle(window, (0, 255, 255, 150), [150, 150], 40, x, usecenter=1)

		acomplex.atriangle(window, (255, 255, 255, 150), [200, 150], 20, x, usecenter=0)

		acomplex.avector(window, (255, 255, 255, 150), [200, 150], x, x, 3)

		acomplex.avector(window, (255, 255, 0, 150), [300, 300], x, x, 1)

		acomplex.aregpolygon(window, (255, 255, 255, 100), [300, 300], 50, 7, x)

		acomplex.aregstar(window, (255, 255, 255, 150), [250, 400], 50, 9, 45, 2)

		acomplex.areggramm(window, (255, 255, 255, 150), [100, 300], 80, 8, 18)



		pg.display.update()

		c.tick(40)
Ejemplo n.º 4
0
        def draw(self):

            d = 0
            for s in self.shadelist:

                if d > 255: d = 255
                su = p.Surface((int(2 * self.w), int(2 * self.w)), p.SRCALPHA)

                sl = list(self.color)
                sl.append(d)
                complex.regpolygon(su, sl,
                                   [int(self.w), int(self.w)], int(self.w),
                                   self.par.gon, s[2])

                self.s.blit(su, [int(s[0] - self.w), int(s[1] - self.w)])

                d += 128.0 / len(self.shadelist)

            acomplex.aregpolygon(self.s,
                                 self.color, (int(self.x), int(self.y)),
                                 int(self.w), self.par.gon, self.rot)