Hi! I write some class(but under Delphi4).<br>You can change it for your program.<br><br>// unit<br>unit Unit2;<br><br>interface<br><br>uses Windows,Graphics;<br><br>type<br> TRec =array of TPoint;<br><br> TA = class(TObject)<br> private<br> FPath : TRec;<br> FColor : TColor;<br> FWidth : integer;<br> procedure WritePath( Path : TRec);<br> public<br> constructor Create;<br> destructor Destroy; override;<br> property Path:TRec read FPath write WritePath;<br> property Color:TColor read FColor write FColor;<br> property Width:integer read FWidth write FWidth;<br><br> procedure WritePoint( No : integer; Pnt : TPoint);<br> end;<br><br>implementation<br><br>procedure TA.WritePath( Path : TRec ); // destroy old and writes new path<br>begin<br> SetLength(FPath,0);<br> FPath:=Path;<br>end;<br><br>procedure TA.WritePoint( No : integer; Pnt : TPoint);// allocates memory until<br> // new point and write value of pnt<br>begin<br> if Length(FPath)<=No then SetLength(FPath,No+1);<br> FPath[No]:=Pnt;<br>end;<br><br>constructor TA.Create;<br>begin<br> inherited;<br> FPath:=nil;<br> FColor:=0;<br> FWidth:=0;<br>end;<br><br>destructor TA.Destroy;<br>begin<br> SetLength(FPath,0); // dispose path<br> inherited;<br>end;<br>end.<br>// end of unit<br><br>in program:<br><br>Uses Unit2;<br><br>procedure SomeProc;<br>var a:TA;<br> i : integer;<br> P:TPoint;<br>begin<br> a:=TA.Create;<br> for i:=0 to 20 do a.WritePoint(i,Point(i,i));<br> a.Color:=clRed;<br> a.Width:=3;<br> Label1.Caption:=IntToStr(a.Path[5].x);<br> a.Free;<br>end;<br>