예제 #1
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 )
예제 #2
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

		

		complex.rrect(window, (255, 0, 255), [ 10, 10, 100, 100 ], x / 10)

		complex.curve(window, (0, 0, 0), [200, 200], 199, x, x + 180, lnwidth=5)

		complex.triangle(window, (0, 255, 255), [150, 150], 40, x, usecenter=1)

		complex.triangle(window, (255, 255, 255), [200, 150], 20, x, usecenter=0)

		complex.vector(window, (255, 255, 255), [200, 150], x, x, 10)

		complex.regpolygon(window, (255, 255, 255), [300, 300], 50, 10, x)

		complex.vector(window, (255, 255, 0), [300, 300], 0, x, 1)

		complex.regstar(window, (255, 255, 255), [250, 400], 50, 9, 45, 2)

		complex.reggramm(window, (255, 255, 255), [100, 300], 80, 5, 18)



		pg.display.update()

		c.tick(40)
예제 #3
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)
예제 #4
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

        complex.rrect(window, (255, 0, 255), [10, 10, 100, 100], x / 10)

        complex.curve(window, (0, 0, 0), [200, 200], 199, x, x + 180, lnwidth=5)

        complex.triangle(window, (0, 255, 255), [150, 150], 40, x, usecenter=1)

        complex.triangle(window, (255, 255, 255), [200, 150], 20, x, usecenter=0)

        complex.vector(window, (255, 255, 255), [200, 150], x, x, 10)

        complex.regpolygon(window, (255, 255, 255), [300, 300], 50, 10, x)

        complex.vector(window, (255, 255, 0), [300, 300], 0, x, 1)

        complex.regstar(window, (255, 255, 255), [250, 400], 50, 9, 45, 2)

        complex.reggramm(window, (255, 255, 255), [100, 300], 80, 5, 18)

        pg.display.update()

        c.tick(40)