[fpc-pascal] Graph Unit

Geno Roupsky groupsky at nola7.com
Tue Feb 14 10:59:00 CET 2006


В пн, 2006-02-13 в 23:15 -0800, Ryo T написа:
> How to use unit Graph in fpc ?
> 
> ==============
>     12y0
>   The ~'S'~
> 

here is the documentation for the graph unit:
http://www.freepascal.org/docs-html/rtl/graph/index.html

a simple test program is attached
-------------- next part --------------
program graphex;

uses Graph;

var 
  i: LongInt;
  gd,gm : integer; 
begin 
   gd:=detect; { highest possible resolution } 
   gm:=0; { not needed, auto detection } 
   InitGraph(gd,gm,''); 
   if GraphResult<>grok then 
     halt; { whatever you need } 
   for i := 0 to 1000000 do
   begin
     SetColor(Random(GetMaxColor));
     LineTo(Random(GetMaxX), Random(GetMaxY));
   end;
   CloseGraph; { restores the old graphics mode } 
end.


More information about the fpc-pascal mailing list