JL35
Nombre de messages : 7112 Localisation : 77 Date d'inscription : 29/11/2007
| Sujet: JOYEUX NOEL A TOUS ! Mer 23 Déc 2009 - 23:14 | |
| - Code:
-
' Bonnes fêtes à tous les Panoramiciens DIM coul, y1, yd, f$ DIM xsa, ysa, xd, x, y, i, rs, lc DIM xa, ya, xm, ym, wa, ha, ra, rn, pi, a, a1, a2, v1, v2 DIM objet, r, g, b LABEL Fin, Sapin, Sigle, Etoile, Artifice, za
DATA 10,0,12,7,20,7,14,11,16,18,10,14,4,18,6,11,0,7,8,7,10,0 pi = 4*ATN(1) objet = 1
WIDTH 0, 380: HEIGHT 0, 340 PICTURE objet: WIDTH objet, 360: HEIGHT objet, 300 ' ON_CLICK objet, Fin PRINT_TARGET_IS objet 2D_TARGET_IS objet 2D_FILL_COLOR 100, 100, 255: 2D_RECTANGLE 4, 4, 359, 299 lc = 16 2D_FILL_COLOR 240, 240, 255: 2D_RECTANGLE lc+4, lc+4, 359-lc, 299-lc xsa = 110: ysa = 50 xd = xsa: yd = ysa: r = 0: g = 255: b = 0: GOSUB Sapin xd = xsa-2: yd = ysa+i+40: GOSUB Sigle xd = xsa-10: yd = ysa-20: r = 255: g = 0: b = 0: GOSUB Etoile FONT_COLOR objet, 0, 0, 255 2D_FILL_COLOR 255, 255, 0: 2D_RECTANGLE xsa+110,ysa-5,xsa+200,ysa+64 2D_PEN_COLOR 0,0,0: 2D_POLY_FROM xsa+120, ysa-5 2D_POLY_TO xsa+155, ysa-15 2D_POLY_TO xsa+150, ysa-20:2D_POLY_TO xsa+155, ysa-15 2D_POLY_TO xsa+190,ysa-5 2D_PEN_COLOR 255, 0, 0 Print_locate xsa+115, ysa: Print "BONNES" PRINT_LOCATE xsa+125, ysa+36: Print "FÊTES" 2D_PEN_WIDTH 2: 2D_RECTANGLE xsa+88, ysa+182, xsa+222, ysa+209 PRINT_LOCATE xsa+90, ysa + 183: Print "PANORAMIC !" GOSUB Artifice GOTO Fin END
Fin: TERMINATE
Sapin: 2D_PEN_COLOR r, g, b: 2D_PEN_WIDTH 6 FOR i = 0 TO 140 STEP 10 2D_POLY_FROM xd, yd + i 2D_POLY_TO xd-i/2, yd+i+20 2D_POLY_FROM xd, yd+i 2D_POLY_TO xd+i/2, yd+i+20 NEXT i 2D_FILL_COLOR 128, 64, 0: 2D_PEN_COLOR 128, 64, 0: ' tronc 2D_RECTANGLE xd-6, yd+i-6, xd+6, yd+i+20 2D_FILL_COLOR 243, 160, 24: 2D_PEN_WIDTH 2: ' jardinière 2D_RECTANGLE xd-30, yd+i+20, xd+30, yd+i+60 2D_FILL_COLOR 180,100,0: ' plancher 2D_RECTANGLE lc+4, yd+i+60, 359-lc, 299-lc RETURN
Sigle: rs = 18 2D_FILL_COLOR 255, 255, 255: 2D_PEN_COLOR 255, 0, 0 2D_CIRCLE xd, yd, rs 2D_CIRCLE xd, yd, rs-4 FONT_NAME objet, "Georgia" FONT_SIZE objet, 14: FONT_BOLD 0 PRINT_LOCATE xd-6, yd-12: PRINT "P" RETURN
Etoile: 2D_PEN_COLOR 255, 255, 0: 2D_FILL_COLOR 255, 255, 0 2D_CIRCLE xd+10, yd+10, 5 2D_PEN_COLOR r, g, b: 2D_PEN_WIDTH 1 READ x: READ y: 2D_POLY_FROM xd+x, yd+y FOR i = 1 TO 10 READ x: READ y: 2D_POLY_TO xd+x, yd+y NEXT i RETURN
Artifice: xa = 265: ya = ysa+150: ra = 80 2D_FILL_COLOR 128, 64, 0: 2D_PEN_COLOR 128, 64, 0: 2D_PEN_WIDTH 3 2D_POLY_FROM xa, ya 2D_POLY_TO xa+5, ya+30: 2D_POLY_TO xa-5, ya+30: 2D_POLY_TO xa, ya 2D_PEN_WIDTH 1 a1 = pi/8: a2 = pi-pi/8 v1 = INT(100*a1): v2 = INT(100*a2) za: a = (v1+INT(RND(v2-v1)))/100 xm = xa + ra*COS(a): ym = ya - ra*SIN(a) 2D_PEN_COLOR 240, 240, 255: 2D_LINE xa, ya, xm, ym rn = RND(ra) x = xa + rn*COS(a): y = ya - rn*SIN(a) r = 255*RND(1): g = 255*RND(1): b = 255*RND(1) 2D_PEN_COLOR r, g, b: 2D_LINE xa, ya, x, y WAIT 50 If clicked(1) = 1 then RETURN GOTO za RETURN | |
|