Bagian yang bergerak dalam program ini adalah: mata keduanya, rok, peci, dan kancing yang keluar satu per satu. berikut adalah Pseudo Codenya:
procedure Tunda(Detik,MiliDetik:word);
var
TimeOut: TDateTime;
begin
TimeOut:=Now+EncodeTime(0,Detik div 60, Detik mod 60, MiliDetik);
while Now<TimeOut do
Application.ProcessMessages;
end;
var i:integer;
begin
with image2.Canvas do
begin
//girl
pen.Width:=3;
Arc(60,10,150,150,60,50,150,50); //face
moveto(60,52);
lineto(150,52);
brush.Color:=clblack;
for i:=1 to 3 do
begin
ellipse(80-i,70-i,90+i,80+i); //left eye
tunda(0,150);
end;
for i:=1 to 3 do
begin
ellipse(120-i,70-i,130+i,80+i); //right eye
tunda(0,150);
end;
pen.Color:=clred;
arc(90,100,120,116,90,108,120,108); //lips
pen.Color:=clblack;
Arc(30,10,180,350,180,170,30,170); //jilbab
moveto(30,170);
lineto(110,200);
moveto(180,170);
lineto(110,200);
moveto(30,170); //left hand
lineto(10,280);
moveto(180,170); //right hand
lineto(200,280);
moveto(10,280); //clothes
lineto(50,280);
moveto(200,280);
lineto(160,280);
moveto(50,280);
lineto(60,220);
moveto(160,280);
lineto(150,220);
moveto(50,280);
lineto(40,320);
moveto(160,280);
lineto(170,320);
moveto(40,320);
lineto(170,320);
pen.Color:=clblack;
for i:=1 to 130 do
begin
moveto(60,320+i);
lineto(150,320+i); //rok
tunda(0,30);
end;
brush.color:=clgreen;
rectangle(60,320,150,450);
moveto(20,280); //tangan kiri
lineto(15,310);
lineto(30,285);
lineto(30,295);
lineto(40,280);
moveto(170,280); //tangan kanan
lineto(180,295);
lineto(180,285);
lineto(195,310);
lineto(190,280);
arc(60,455,110,475,75,455,110,475); //kaki kiri
moveto(75,455);
lineto(75,450);
moveto(100,470);
lineto(100,450);
arc(110,455,150,475,110,475,135,455); //kaki kanan
moveto(135,455);
lineto(135,450);
moveto(115,470);
lineto(115,450);
//boy
Arc(300,10,390,150,300,50,390,50); //face
moveto(300,52);
lineto(390,52);
brush.Color:=clblack;
for i:=1 to 3 do
begin
ellipse(320-i,70-i,330+i,80+i); //left eye
tunda(0,150);
end;
for i:=1 to 3 do
begin
ellipse(360-i,70-i,370+i,80+i); //right eye
tunda(0,150);
end;
pen.Color:=clred;
arc(330,100,360,116,330,108,360,108); //lips
pen.color:=clblack;
brush.Color:=clgreen;
for i:=1 to 90 do
begin
moveto(300+i,10);
lineto(300+i,52);
tunda(0,30);
end;
rectangle(300,10,390,52); //peci
moveto(330,145); //neck
lineto(330,157);
moveto(360,145);
lineto(360,157);
moveto(345,160); //kerah
lineto(315,154);
moveto(345,160);
lineto(375,154);
moveto(315,154);
lineto(330,151);
moveto(375,154);
lineto(360,151);
moveto(315,154);
lineto(315,165);
moveto(345,160);
lineto(345,171);
moveto(375,154);
lineto(375,165);
moveto(315,165);
lineto(345,171);
lineto(375,165);
moveto(315,165); //bahu kiri
lineto(280,170);
moveto(375,165); //bahu kanan
lineto(410,170);
moveto(280,170); //left hand
lineto(250,280);
lineto(290,280);
lineto(300,220);
moveto(410,170); //right hand
lineto(440,280);
lineto(400,280);
lineto(390,220);
moveto(300,220); //clothes
lineto(300,320);
moveto(390,220);
lineto(390,320);
lineto(300,320);
moveto(300,320); //foot
lineto(290,450);
lineto(330,450);
lineto(345,360);
lineto(360,450);
lineto(400,450);
lineto(390,320);
brush.Color:=clgreen;
pen.color:=clgreen;
for i:=1 to 2 do
begin
ellipse(342-i,175-i,348+i,181+i); //kancing
tunda(0,230);
end;
for i:=1 to 2 do
begin
ellipse(342-i,190-i,348+i,196+i);
tunda(0,230);
end;
for i:=1 to 2 do
begin
ellipse(342-i,205-i,348+i,211+i);
tunda(0,230);
end;
for i:=1 to 2 do
begin
ellipse(342-i,220-i,348+i,226+i);
tunda(0,230);
end;
pen.Color:=clblack;
moveto(339,170);
lineto(339,230);
lineto(351,230);
lineto(351,170);
moveto(260,280); //tangan kiri
lineto(255,310);
lineto(270,285);
lineto(270,295);
lineto(280,280);
moveto(410,280); //tangan kanan
lineto(420,295);
lineto(420,285);
lineto(435,310);
lineto(430,280);
arc(290,455,330,475,305,455,330,475); //kaki kiri
moveto(305,455);
lineto(305,450);
moveto(325,470);
lineto(325,450);
arc(360,455,400,475,360,475,385,455); //kaki kanan
moveto(385,455);
lineto(385,450);
moveto(365,470);
lineto(365,450);
label1.caption:=' Assalamualaikum :) ';
end;
end;
4 comments:
boleh minta filenya mbak??newbie nie...
silahkan,, tinggal copy paste aja pseudo code nya ke delphi..
upload file dong
bergerak gmna tu, pengaturn pada properti untuk gmbr nya kayak apa, apa langsung hnya dengan code, trus langsung di run.