Entradas

Pygame Steve

Imagen
# -*- coding: utf-8 -*- import pygame from pygame import K_ESCAPE pygame.init() window = pygame.display.set_mode((400, 400)) pygame.display.set_caption("Figura Steve con pygame") window.fill(color=(0, 0, 25))         #cuerpo pygame.draw.polygon(window, (255, 128, 64), [(110, 50), (190, 50), (190, 130), (230, 130), (230, 250), (190, 250), (190, 330), (110, 330), (110, 250), (70, 250), (70, 130), (110, 130), (110, 50)], 0)         #cara pygame.draw.polygon(window, (128, 64, 0), [(110, 50), (190, 50), (190, 80), (180, 80), (180, 70), (120, 70), (120, 80), (110, 80), (110, 50)], 0) pygame.draw.polygon(window, (255, 255, 255), [(120,90), (130, 90), (130, 100), (120, 100), (120,90)],0) pygame.draw.polygon(window, (128, 0, 128), [(130, 90), (140, 90), (140, 100), (130, 100), (130, 90)], 0) pygame.draw.polygon(window, (128, 0, 128), [(160, 90), (170, 90), (170, 100), (160, 100), (160, 90)], 0) pygame.draw.polygon(window, (255, 255, 255),...

Menú Figura Polígonos

from Tkinter import * import tkColorChooser v0=Tk() v0.title( 'Ventana principal' ) v0.config( bg = 'snow' ) v0.geometry( "200x500" ) def mostrar (num): v1=Toplevel(v0) v1.title( 'ventana hija' ) v1.protocol( 'wn_DELETE_WINDOW' , "onexit" ) v1.geometry( "300x400" ) if num == 1 : f1=Canvas(v1 , width = 200 , height = 200 , bg = 'white' ) f1.pack( expand =YES , fill =BOTH) #cuerpo f1.create_polygon( 110 , 50 , 190 , 50 , 190 , 130 , 230 , 130 , 230 , 250 , 190 , 250 , 190 , 330 , 110 , 330 , 110 , 250 , 70 , 250 , 70 , 130 , 110 , 130 , 110 , 50 , width = 10 , fill = 'tan1' ) #cara f1.create_polygon( 110 , 50 , 190 , 50 , 190 , 80 , 180 , 80 , 180 , 70 , 120 , 70 , 120 , 80 , 110 , 80 , 110 , 50 , width = 1 , fill = 'saddle brown' ) f1.create_polygon( 120 , 90 , 130 , 90 , 130 , 100 , 120 , 100 , 120 , 90 , width = 1 , f...