[lazarus] Trying to port a Delphi graph

Peter Vreman peter at freepascal.org
Sun Mar 30 23:57:54 EST 2003


> Well, that's not quite working for me yet, but I've always been weak
> with pointers, so I may just be confused.  Here's the appropriate info I
> think to make this decision:
>
> Type
> TTrapezeInfo = record
>     Vals : Array[0..3] of T3DPoint;  //real coords
>     Pixs : Array[0..3] of TPoint;  //mapped positions
>     LineNo : LongInt;
>     DistanceToViewer : Double;
>     IsEdge : Boolean;  //True for those forming the walls
>     AVG : T3DPoint;    //average of real values
>     Color : TColor;
> end;
> PTrapezeInfo = ^TTrapezeInfo;
>
> Then, a TList called FTrapezes is created and items are added as:
> T := New(PTrapezeInfo);
> fTrapezes.Add(T);
>
> Then the dispose originally was "Dispose(FTrapezes[i])"
> I've also tried "Dispose((FTrapezes[i] as PTrapezeInfo));" which results
> in an invalid typecast.  I also tried "Dispose((FTrapezes[i] as
> TTrapezeInfo));" just for the heck of it and that fails with invalid
> typecast as well.

Dispose(PTrapezeInfo(FTrapezes[i]));








More information about the Lazarus mailing list