Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program graphics;
- uses GRAPH;
- var
- w,h,for_a,for_b,for_c,for_d:integer;
- x1,y1,x2,y2:integer;
- procedure drawStar(x,y:integer);
- begin
- for for_a:=0 to 20 do
- line(x,y+40,x+100-for_a*2,y+40+for_a*2);
- for for_a:=0 to 20 do
- line(x+20,y+100,x+50+for_a,y+for_a*3);
- for for_a:=0 to 20 do
- line(x,y+40,x+80-for_a,y+100-for_a*3);
- end;
- begin
- x1:=0;
- x2:=160;
- y1:=0;
- y2:=160;
- w:= VGA;
- h:= VGAHI;
- initGraph(w,h,'');
- for for_a:=1 to 12 do
- begin
- SetFillStyle(for_a,for_a);
- Bar(x1,y1,x2,y2);
- if x2 = 640 then
- begin
- x1:= 0;
- x2:= 160;
- y1:= y1 + 160;
- y2:= y2 + 160;
- end
- else
- begin
- x1:= x1 + 160;
- x2:= x2 + 160;
- end;
- end;
- readln;
- SetFillStyle(0,0);
- Bar(0,0,639,639);
- setColor(Green);
- for for_a:=250 to 640 do
- Line(0,for_a,640,for_a);
- setcolor(Blue);
- for for_a:=0 to 250 do
- Line(0,for_a,640,for_a);
- setcolor(LightRed);
- for for_a:=50 downto 0 do
- Circle(100,100,for_a);
- setcolor(yellow);
- drawStar(300,100);
- drawStar(500,40);
- drawStar(200,120);
- readln;
- end.
Add Comment
Please, Sign In to add comment