from tkinter import * v0 = Tk() v0.title("Ventana Principal") v0.config(bg="green") v0.geometry("300x300") def mostrar(num): v1 = Toplevel(v0) v1.title('Ventana hija') v1.protocol("WM_DELETE_WINDOW", "onexit") v1.config(bg="blue") v1.geometry('1000x1000') if num == 1: canvas1 = Canvas(v1, width=200, height=200, bg="black") canvas1.pack(expand=YES, fill=BOTH) canvas1.create_polygon(140, 20, 160, 20, 200, 40, 240, 80, 260, 100, 300, 80, 340, 100, 360, 80, 400, 40, 440, 20, 460, 20, 480, 80, 460, 140, 440, 200, 360, 140, 300, 200, 240, 140, 160, 200, 140, 140, 120, 80, width=5, fill=("#C6A58A"), outline="#FFFFFF") canvas1.create_polygon(160, 200, 240, 140, 300, 200, 360, 140, 440, 200, 460, 280, 480, 360, 460, 360, 440, 340, 380, 400, 320, 420, 280, 420, 220, 400, 160, 340, 140, 360, 120, 360, 140, 300, width=5, fill=("#AF7A4E"), outline="#FFFFFF") canvas1.create_polygon(200, 220, 220, 220, 260, 240, 220, 240, width=5, fill=("yellow"), outline="#000000") canvas1.create_polygon(340, 240, 380, 220, 400, 220, 380, 240, width=5, fill=("yellow"), outline="#000000") canvas1.create_polygon(320, 220, 340, 300, width=5, fill=("black"), outline="#FFFFFF") canvas1.create_polygon(340, 300, 360, 340, width=5, fill=("black"), outline="#FFFFFF") canvas1.create_polygon(360, 340, 360, 360, width=5, fill=("black"), outline="#FFFFFF") canvas1.create_polygon(280, 220, 260, 300, width=5, fill=("black"), outline="#FFFFFF") canvas1.create_polygon(260, 300, 240, 340, width=5, fill=("black"), outline="#FFFFFF") canvas1.create_polygon(240, 340, 240, 360, width=5, fill=("black"), outline="#FFFFFF") canvas1.create_polygon(240, 360, 280, 380, width=5, fill=("black"), outline="#FFFFFF") canvas1.create_polygon(360, 360, 320, 380, width=5, fill=("black"), outline="#FFFFFF") canvas1.create_polygon(360, 360, 400, 280, width=5, fill=("black"), outline="#FFFFFF") canvas1.create_polygon(240, 360, 200, 280, width=5, fill=("black"), outline="#FFFFFF") canvas1.create_polygon(320, 380, 340, 340, 320, 320, 280, 320, 260, 340, 280, 380, width=5, fill=("black"), outline="#FFFFFF") canvas1.create_polygon(220, 220, 240, 240, 220, 240, width=5, fill=("black"), outline="#000000") canvas1.create_polygon(380, 220, 380, 240, 360, 240, width=5, fill=("black"), outline="#000000") canvas1.create_polygon(160, 40, 160, 140, 180, 160, 220, 120, 220, 100, width=5, fill=("#AF7A4E"), outline="#FFFFFF") canvas1.create_polygon(440, 40, 380, 100, 380, 120, 420, 160, 440, 140, width=5, fill=("#AF7A4E"), outline="#FFFFFF") b1 = Button(canvas1, text="ocultar", command=lambda: ejecutar(ocultar(v1))) b1.grid(row=1, column=3) elif num == 2: canvas2 = Canvas(v1, width=200, height=200, bg="black") canvas2.pack(expand=YES, fill=BOTH) canvas2.create_rectangle(0, 0, 550, 600, fill='#33FFFF') canvas2.create_rectangle(190, 7, 350, 75, fill='black') canvas2.create_rectangle(120, 75, 190, 40, fill='black') canvas2.create_rectangle(350, 75, 420, 40, fill='black') # colores rojos #DB1414 canvas2.create_rectangle(190, 40, 350, 75, fill='#A70404') canvas2.create_rectangle(120, 120, 190, 75, fill='#A70404') canvas2.create_rectangle(120, 240, 160, 120, fill='#DB1414') canvas2.create_rectangle(230, 120, 310, 75, fill='#DB1414') # colores blancos canvas2.create_rectangle(190, 200, 230, 75, fill='white') canvas2.create_rectangle(160, 160, 270, 120, fill='white') # Black Colors canvas2.create_rectangle(80, 150, 120, 75, fill='black') canvas2.create_rectangle(80, 240, 120, 150, fill='#A70404') canvas2.create_rectangle(310, 240, 420, 75, fill='#A70404') canvas2.create_rectangle(420, 150, 460, 75, fill='black') canvas2.create_rectangle(420, 240, 460, 150, fill='#A70404') ##otros canvas2.create_rectangle(190, 240, 230, 200, fill='#A70404') canvas2.create_rectangle(160, 240, 190, 160, fill='#DB1414') canvas2.create_rectangle(260, 160, 350, 120, fill='#DB1414') canvas2.create_rectangle(230, 200, 350, 160, fill='#DB1414') canvas2.create_rectangle(230, 240, 310, 200, fill='black') # more canvas2.create_rectangle(40, 320, 80, 150, fill='black') canvas2.create_rectangle(80, 280, 120, 240, fill='black') canvas2.create_rectangle(80, 320, 120, 280, fill='#AFB5B4') canvas2.create_rectangle(120, 280, 190, 240, fill='#A70404') canvas2.create_rectangle(190, 320, 230, 240, fill='black') canvas2.create_rectangle(120, 320, 190, 280, fill='black') canvas2.create_rectangle(230, 280, 270, 240, fill='white') canvas2.create_rectangle(270, 320, 310, 240, fill='#AFB5B4') canvas2.create_rectangle(230, 320, 270, 280, fill='#AFB5B4') canvas2.create_rectangle(310, 320, 350, 240, fill='black') canvas2.create_rectangle(320, 320, 420, 280, fill='black') canvas2.create_rectangle(350, 280, 420, 240, fill='#A70404') canvas2.create_rectangle(420, 280, 460, 240, fill='black') canvas2.create_rectangle(420, 320, 460, 280, fill='#AFB5B4') canvas2.create_rectangle(460, 150, 500, 320, fill='black') canvas2.create_rectangle(420, 400, 460, 320, fill='black') canvas2.create_rectangle(270, 400, 420, 320, fill='#AFB5B4') canvas2.create_rectangle(230, 360, 310, 320, fill='black') canvas2.create_rectangle(120, 360, 230, 320, fill='white') canvas2.create_rectangle(80, 400, 120, 320, fill='black') canvas2.create_rectangle(120, 400, 160, 360, fill='#AFB5B4') canvas2.create_rectangle(160, 400, 270, 360, fill='white') canvas2.create_rectangle(120, 440, 200, 400, fill='black') canvas2.create_rectangle(200, 440, 350, 400, fill='#AFB5B4') canvas2.create_rectangle(350, 440, 420, 400, fill='black') canvas2.create_rectangle(200, 480, 350, 440, fill='black') b2 = Button(canvas2, text="ocultar", command=lambda: ejecutar(ocultar(v1))) b2.grid(row=1, column=3) elif num == 3: canvas3 = Canvas(v1, width=300, height=210, bg='grey') canvas3.pack(expand=YES, fill=BOTH) canvas3.create_polygon(245, 82, 286, 60, 332, 49, 376, 49, 430, 65, 482, 94, 510, 120, 535, 159, 556, 153, 556, 153, 602, 213, 610, 268, 610, 322, 593, 372, 575, 391, 549, 380, 518, 347, 485, 380, 493, 391, 538, 405, 526, 426, 549, 465, 567, 509, 580, 553, 580, 571, 602, 557, 630, 529, 683, 429, 683, 477, 671, 529, 646, 579, 613, 616, 576, 645, 568, 671, 530, 683, 494, 683, 450, 683, 445, 722, 38, 625, 45, 549, 57, 464, 85, 380, 124, 303, 192, 322, 174, 286, 164, 249, 140, 259, 102, 264, 76, 245, 86, 197, 117, 143, 157, 101, 188, 76, 225, 71, 245, 82, width=5, fill=("white")) # MANCHAS CAFES canvas3.create_polygon(245, 82, 286, 60, 332, 49, 376, 49, 430, 65, 482, 94, 510, 120, 535, 159, 556, 153, 586, 173, 602, 213, 610, 268, 610, 322, 593, 372, 575, 391, 549, 380, 518, 347, 485, 380, 493, 391, 418, 374, 424, 351, 421, 323, 405, 300, 370, 270, 367, 166, 318, 258, 286, 264, 257, 281, 241, 301, 232, 331, 192, 322, 174, 286, 164, 249, 140, 259, 102, 264, 76, 245, 86, 197, 117, 143, 157, 101, 188, 76, 225, 71, 245, 82, width=5, fill=("#504214")) canvas3.create_polygon(567, 509, 580, 553, 563, 548, 529, 548, 498, 557, 476, 578, 472, 599, 477, 614, 492, 628, 514, 638, 542, 644, 571, 642, 576, 645, 568, 671, 530, 683, 450, 683, 461, 608, 478, 544, 500, 484, 519, 504, 540, 514, 567, 509, width=5, fill=("#504214")) canvas3.create_polygon(580, 571, 602, 557, 630, 529, 643, 507, 664, 509, 677, 499, 671, 529, 646, 579, 613, 616, 576, 645, 580, 571, width=5, fill=("#504214")) # BOCA NARIZ canvas3.create_polygon(259, 325, 259, 340, 266, 357, 285, 376, 307, 387, 325, 388, 354, 387, 377, 375, 387, 365, 381, 362, 373, 372, 353, 383, 327, 383, 312, 381, 322, 351, 349, 351, 368, 341, 375, 322, 367, 302, 346, 288, 323, 286, 303, 289, 289, 303, 287, 320, 289, 336, 316, 349, 305, 380, 287, 371, 271, 355, 265, 341, 265, 327, 259, 325, width=5, fill=("black")) # MANCHA NEGRA canvas3.create_polygon(526, 426, 549, 465, 567, 509, 540, 514, 519, 504, 500, 484, 510, 451, 526, 426, width=5, fill=("black")) # OJOS canvas3.create_polygon(434, 266, 450, 266, 462, 275, 466, 288, 461, 304, 449, 312, 434, 312, 423, 305, 420, 291, 422, 277, 434, 266, width=5, fill=("black")) canvas3.create_polygon(251, 214, 265, 220, 273, 234, 273, 248, 263, 261, 243, 262, 234, 254, 228, 243, 231, 227, 240, 217, 251, 214, width=5, fill=("black")) # CEJAS canvas3.create_polygon(264, 124, 285, 115, 308, 117, 286, 110, width=5, fill=("black")) canvas3.create_polygon(445, 147, 472, 150, 484, 169, 469, 156, width=5, fill=("black")) # DETALLES canvas3.create_polygon(521, 201, 515, 225, 508, 248, 499, 282, 503, 315, 514, 343, 485, 380, 521, 343, 508, 315, 505, 282, 513, 251, 521, 226, 521, 201, width=5, fill=("black")) canvas3.create_polygon(233, 131, 216, 160, 202, 209, 180, 235, 164, 249, 174, 286, 170, 249, 184, 239, 207, 213, 221, 162, width=5, fill=("black")) canvas3.create_polygon(251, 226, 260, 226, 264, 233, 263, 242, 258, 246, 251, 246, 244, 242, 243, 236, 245, 229, 251, 226, width=5, fill=("white")) canvas3.create_polygon(442, 274, 449, 274, 453, 279, 455, 286, 452, 292, 444, 295, 438, 293, 434, 286, 436, 279, 442, 274, width=5, fill=("white")) canvas3.create_polygon(335, 295, 347, 299, 357, 303, 360, 310, 353, 313, 335, 313, 325, 312, 314, 307, 309, 303, 309, 298, 318, 295, 335, 295, width=5, fill=("white")) b3 = Button(canvas3, text="ocultar", command=lambda: ejecutar(ocultar(v1))) b3.grid(row=1, column=3) elif num == 4: canvas4 = Canvas(v1, width=300, height=210, bg='grey') canvas4.pack(expand=YES, fill=BOTH) # BASE # canvas1.create_oval(250,250,700,700, width=0.0, fill=("red")) canvas4.create_rectangle(145, 115, 152, 144, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(138, 145, 144, 183, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(130, 183, 136, 244, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(145, 115, 152, 144, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(145, 275, 152, 312, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(138, 245, 144, 282, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(153, 306, 160, 358, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(160, 314, 167, 321, width=0.0, fill=("#1a1f1c")) canvas4.create_rectangle(160, 344, 167, 359, width=0.0, fill=("#1a1f1c")) canvas4.create_rectangle(168, 360, 174, 366, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(176, 367, 182, 374, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(183, 375, 190, 389, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(191, 383, 205, 389, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(206, 390, 213, 397, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(214, 398, 220, 404, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(221, 405, 226, 419, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(221, 413, 199, 419, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(196, 412, 191, 405, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(176, 398, 190, 404, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(168, 390, 174, 397, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(227, 413, 335, 419, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(336, 405, 343, 412, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(344, 398, 351, 404, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(352, 390, 358, 397, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(298, 405, 305, 412, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(306, 396, 313, 404, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(314, 390, 320, 397, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(321, 383, 343, 389, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(337, 375, 343, 382, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(344, 367, 351, 374, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(352, 360, 358, 366, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(359, 359, 373, 344, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(373, 343, 367, 306, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(359, 313, 366, 320, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(375, 275, 381, 305, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(389, 282, 382, 245, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(396, 244, 390, 176, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(389, 175, 382, 138, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(375, 115, 381, 137, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(176, 92, 182, 98, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(183, 84, 190, 91, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(191, 76, 205, 83, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(206, 69, 221, 76, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(222, 61, 244, 68, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(245, 54, 289, 60, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(290, 61, 305, 68, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(306, 69, 320, 75, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(321, 76, 335, 83, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(336, 84, 343, 91, width=1.0, fill=("#1a1f1c")) canvas4.create_rectangle(344, 92, 350, 98, width=1.0, fill=("#1a1f1c")) # PARTE_GRIS CLARO canvas4.create_rectangle(137, 183, 144, 244, width=0.0, fill=("#2d3630")) canvas4.create_rectangle(152, 220, 144, 145, width=0.0, fill=("#2d3630")) canvas4.create_rectangle(152, 115, 159, 205, width=0.0, fill=("#2d3630")) canvas4.create_rectangle(159, 123, 167, 183, width=0.0, fill=("#2d3630")) canvas4.create_rectangle(167, 153, 174, 174, width=0.0, fill=("#2d3630")) canvas4.create_rectangle(191, 107, 205, 113, width=0.0, fill=("#2d3630")) canvas4.create_rectangle(183, 92, 344, 107, width=0.0, fill=("#2d3630")) canvas4.create_rectangle(321, 107, 335, 113, width=0.0, fill=("#2d3630")) canvas4.create_rectangle(191, 84, 335, 92, width=0.0, fill=("#2d3630")) canvas4.create_rectangle(206, 76, 320, 84, width=0.0, fill=("#2d3630")) canvas4.create_rectangle(222, 69, 305, 76, width=0.0, fill=("#2d3630")) canvas4.create_rectangle(245, 61, 290, 69, width=0.0, fill=("#2d3630")) canvas4.create_rectangle(352, 153, 358, 175, width=0.0, fill=("#2d3630")) canvas4.create_rectangle(358, 121, 366, 182, width=0.0, fill=("#2d3630")) canvas4.create_rectangle(366, 107, 375, 205, width=0.0, fill=("#2d3630")) canvas4.create_rectangle(375, 138, 382, 213, width=0.0, fill=("#2d3630")) canvas4.create_rectangle(382, 176, 390, 245, width=0.0, fill=("#2d3630")) canvas4.create_polygon(176, 375, 176, 398, 191, 398, 191, 405, 197, 405, 197, 413, 220, 413, 221, 405, 213, 405, 213, 398, 205, 398, 205, 390, 182, 390, 182, 375, width=1.0, fill=("#2d3630")) canvas4.create_polygon(350, 375, 350, 398, 343, 398, 343, 405, 335, 405, 335, 413, 306, 413, 306, 405, 313, 405, 313, 398, 321, 398, 321, 390, 344, 390, 344, 375, width=1.0, fill=("#2d3630")) canvas4.create_rectangle(160, 359, 167, 366, width=0.0, fill=("#2d3630")) canvas4.create_rectangle(160, 321, 167, 344, width=0.0, fill=("#2d3630")) canvas4.create_rectangle(152, 283, 159, 305, width=0.0, fill=("#2d3630")) canvas4.create_rectangle(359, 359, 365, 366, width=0.0, fill=("#2d3630")) canvas4.create_rectangle(359, 321, 366, 344, width=0.0, fill=("#2d3630")) canvas4.create_rectangle(367, 283, 374, 245, width=0.0, fill=("#2d3630")) # PARTE BLANCA canvas4.create_polygon(175, 160, 175, 175, 168, 175, 168, 191, 160, 191, 160, 206, 153, 206, 153, 221, 145, 221, 145, 275, 152, 275, 152, 282, 160, 282, 160, 313, 168, 313 , 168, 320, 175, 320, 175, 313, 183, 313, 183, 305, 191, 305, 191, 313, 198, 313, 198, 328, 206, 328, 206, 313, 214, 313, 214, 336, 221, 336, 221, 328, 244, 328, 244, 336, 252, 336, 252, 343, 275, 343, 275, 336, 282, 336, 282, 328, 305, 328, 305, 336, 313, 336, 313, 313, 321, 313, 321, 328, 328, 328, 328, 313, 336, 313, 336, 305, 344, 305, 344, 313, 351, 313, 351, 320, 358, 320 , 358, 313, 366, 313, 366, 282, 374, 282, 374, 275, 381, 275, 381, 221, 374, 221, 374, 206, 366, 206, 366, 191, 359, 191, 359, 175, 351, 175, 351, 160, 350, 115, 175, 115, width=0.0, fill=("#f5f7df")) # CUERNOS canvas4.create_rectangle(160, 84, 167, 121, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(167, 91, 175, 129, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(175, 99, 183, 136, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(183, 107, 190, 144, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(190, 115, 198, 136, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(198, 121, 205, 129, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(359, 84, 366, 121, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(351, 91, 359, 129, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(344, 99, 351, 136, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(336, 107, 344, 144, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(329, 115, 336, 136, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(321, 121, 329, 129, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(207, 207, 228, 228, width=0.0, fill=("#780202")) canvas4.create_rectangle(214, 199, 236, 221, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(222, 191, 243, 213, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(237, 184, 251, 198, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(320, 207, 298, 228, width=0.0, fill=("#780202")) canvas4.create_rectangle(312, 199, 291, 221, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(304, 191, 283, 213, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(289, 184, 275, 198, width=0.0, fill=("#9e0303")) # OJOS canvas4.create_rectangle(199, 237, 236, 289, width=0.0, fill=("black")) canvas4.create_rectangle(199, 245, 236, 282, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(207, 253, 228, 274, width=0.0, fill=("#261809")) canvas4.create_rectangle(214, 260, 221, 267, width=0.0, fill=("#e69335")) canvas4.create_rectangle(191, 237, 199, 282, width=0.0, fill=("black")) canvas4.create_rectangle(184, 237, 191, 274, width=0.0, fill=("black")) canvas4.create_rectangle(176, 237, 184, 259, width=0.0, fill=("black")) canvas4.create_rectangle(168, 230, 176, 251, width=0.0, fill=("black")) canvas4.create_rectangle(160, 222, 168, 243, width=0.0, fill=("black")) canvas4.create_rectangle(236, 245, 244, 282, width=0.0, fill=("black")) canvas4.create_rectangle(244, 222, 251, 274, width=0.0, fill=("black")) canvas4.create_rectangle(251, 253, 259, 274, width=0.0, fill=("black")) canvas4.create_rectangle(191, 252, 199, 274, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(236, 252, 244, 274, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(244, 260, 250, 267, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(291, 237, 327, 289, width=0.0, fill=("black")) canvas4.create_rectangle(291, 245, 327, 282, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(298, 253, 320, 274, width=0.0, fill=("#261809")) canvas4.create_rectangle(305, 260, 313, 267, width=0.0, fill=("#e69335")) canvas4.create_rectangle(327, 237, 335, 282, width=0.0, fill=("black")) canvas4.create_rectangle(335, 237, 343, 274, width=0.0, fill=("black")) canvas4.create_rectangle(343, 237, 350, 259, width=0.0, fill=("black")) canvas4.create_rectangle(350, 230, 358, 251, width=0.0, fill=("black")) canvas4.create_rectangle(358, 222, 366, 243, width=0.0, fill=("black")) canvas4.create_rectangle(282, 245, 291, 282, width=0.0, fill=("black")) canvas4.create_rectangle(275, 222, 282, 274, width=0.0, fill=("black")) canvas4.create_rectangle(267, 253, 275, 274, width=0.0, fill=("black")) canvas4.create_rectangle(259, 265, 267, 274, width=0.0, fill=("black")) canvas4.create_rectangle(191, 252, 199, 274, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(236, 252, 244, 274, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(244, 260, 250, 267, width=0.0, fill=("#9e0303")) # NARIZ canvas4.create_rectangle(245, 283, 251, 305, width=0.0, fill=("black")) canvas4.create_rectangle(275, 283, 281, 305, width=0.0, fill=("black")) canvas4.create_rectangle(282, 305, 289, 313, width=0.0, fill=("black")) canvas4.create_rectangle(237, 305, 244, 313, width=0.0, fill=("black")) canvas4.create_rectangle(244, 313, 251, 320, width=0.0, fill=("black")) canvas4.create_rectangle(275, 313, 282, 320, width=0.0, fill=("black")) canvas4.create_rectangle(252, 321, 274, 328, width=0.0, fill=("black")) canvas4.create_rectangle(352, 367, 366, 389, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(366, 359, 374, 382, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(374, 351, 381, 366, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(160, 367, 175, 389, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(153, 359, 160, 382, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(145, 351, 153, 366, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(168, 321, 175, 343, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(175, 314, 183, 351, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(183, 306, 190, 320, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(183, 344, 190, 358, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(190, 351, 198, 366, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(183, 320, 190, 344, width=0.0, fill=("black")) canvas4.create_rectangle(190, 313, 198, 351, width=0.0, fill=("black")) canvas4.create_rectangle(198, 329, 206, 366, width=0.0, fill=("black")) canvas4.create_rectangle(206, 312, 213, 366, width=0.0, fill=("black")) canvas4.create_rectangle(213, 337, 221, 350, width=0.0, fill=("black")) canvas4.create_rectangle(221, 329, 228, 366, width=0.0, fill=("black")) canvas4.create_rectangle(238, 360, 244, 366, width=0.0, fill=("black")) canvas4.create_rectangle(244, 344, 281, 373, width=0.0, fill=("black")) canvas4.create_rectangle(275, 344, 281, 389, width=0.0, fill=("black")) canvas4.create_rectangle(245, 373, 251, 389, width=0.0, fill=("black")) canvas4.create_rectangle(260, 373, 266, 389, width=0.0, fill=("black")) canvas4.create_rectangle(281, 360, 291, 366, width=0.0, fill=("black")) canvas4.create_rectangle(291, 352, 297, 374, width=0.0, fill=("black")) canvas4.create_rectangle(297, 329, 304, 366, width=0.0, fill=("black")) canvas4.create_rectangle(304, 337, 314, 350, width=0.0, fill=("black")) canvas4.create_rectangle(314, 314, 320, 366, width=0.0, fill=("black")) canvas4.create_rectangle(320, 329, 328, 366, width=0.0, fill=("black")) canvas4.create_rectangle(328, 314, 335, 350, width=0.0, fill=("black")) canvas4.create_rectangle(335, 321, 343, 343, width=0.0, fill=("black")) canvas4.create_rectangle(228, 352, 238, 373, width=0.0, fill=("black")) canvas4.create_rectangle(352, 321, 358, 343, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(344, 314, 352, 351, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(336, 306, 344, 320, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(336, 344, 344, 358, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(328, 351, 336, 366, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(213, 367, 221, 373, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(305, 367, 313, 373, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(336, 321, 343, 343, width=0.0, fill=("black")) canvas4.create_rectangle(237, 382, 245, 389, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(244, 389, 282, 396, width=0.0, fill=("#9e0303")) canvas4.create_rectangle(281, 382, 289, 389, width=0.0, fill=("#9e0303")) # DIENTES canvas4.create_rectangle(214, 351, 221, 366, width=0.0, fill=("#e3e0d3")) canvas4.create_rectangle(229, 336, 244, 351, width=0.0, fill=("#e3e0d3")) canvas4.create_rectangle(237, 351, 244, 359, width=0.0, fill=("#e3e0d3")) canvas4.create_rectangle(237, 367, 244, 382, width=0.0, fill=("#e3e0d3")) canvas4.create_rectangle(282, 336, 297, 351, width=0.0, fill=("#e3e0d3")) canvas4.create_rectangle(282, 351, 290, 359, width=0.0, fill=("#e3e0d3")) canvas4.create_rectangle(275, 334, 281, 345, width=0.0, fill=("#261809")) canvas4.create_rectangle(281, 329, 297, 335, width=0.0, fill=("#261809")) canvas4.create_rectangle(245, 334, 251, 344, width=0.0, fill=("#261809")) canvas4.create_rectangle(228, 329, 245, 336, width=0.0, fill=("#261809")) canvas4.create_rectangle(221, 366, 229, 373, width=0.0, fill=("#261809")) canvas4.create_rectangle(229, 373, 237, 382, width=0.0, fill=("#261809")) canvas4.create_rectangle(207, 366, 213, 373, width=0.0, fill=("#261809")) canvas4.create_rectangle(297, 366, 305, 373, width=0.0, fill=("#261809")) canvas4.create_rectangle(289, 373, 297, 384, width=0.0, fill=("#261809")) canvas4.create_rectangle(313, 366, 319, 373, width=0.0, fill=("#261809")) b4 = Button(canvas4, text="ocultar", command=lambda: ejecutar(ocultar(v1))) b4.grid(row=1, column=3) elif num == 5: canvas5 = Canvas(v1, width=300, height=210, bg='grey') canvas5.pack(expand=YES, fill=BOTH) canvas5.create_rectangle(200, 350, 350, 200, fill="pink") canvas5.create_line(200, 350, 180, 325, width=1.5) canvas5.create_line(180, 180, 180, 325, width=2) canvas5.create_line(200, 200, 175, 170, width=1.5) canvas5.create_polygon(200, 350, 180, 325, 180, 175, 180, 325, 200, 200, 175, 170, fill="pink", width=1.5) canvas5.create_line(350, 200, 325, 170, width=1.5) canvas5.create_line(175, 170, 325, 170, width=1.5) canvas5.create_polygon(350, 200, 325, 170, 175, 175, 325, 175, 200, 200, 175, 170, fill="pink", width=1.5) canvas5.create_rectangle(210, 280, 255, 250, fill="white") canvas5.create_rectangle(340, 280, 295, 250, fill="white") canvas5.create_rectangle(220, 280, 245, 250, fill="black") canvas5.create_rectangle(330, 280, 305, 250, fill="black") canvas5.create_rectangle(220, 335, 335, 285) canvas5.create_rectangle(220, 320, 335, 300, fill="gray") canvas5.create_rectangle(315, 320, 245, 300, fill="pink") b5 = Button(canvas5, text="ocultar", command=lambda: ejecutar(ocultar(v1))) b5.grid(row=1, column=3) def ocultar(ventana): ventana.destroy() def ejecutar(f): v0.after(200,f) b2=Button(v0,text="Pokebola", command=lambda:ejecutar(mostrar(2))) b2.grid(row=1, column=2) b3=Button(v0,text="Perro", command=lambda:ejecutar(mostrar(3))) b3.grid(row=1, column=3) b4=Button(v0,text="Calabera", command=lambda:ejecutar(mostrar(4))) b4.grid(row=1, column=4) b5=Button(v0,text="Marranito", command=lambda:ejecutar(mostrar(5))) b5.grid(row=1, column=5) b1=Button(v0,text="Lobo", command=lambda:ejecutar(mostrar(1))) b1.grid(row=1, column=1)
martes, 21 de abril de 2020
POLIGONOS DE LOS COMPAÑEROS
Suscribirse a:
Comentarios de la entrada (Atom)
No hay comentarios.:
Publicar un comentario