Changeset 31 for VectorObject
- Timestamp:
- Jun 24, 2010, 4:18:03 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
VectorObject/UVectorObject.pas
r26 r31 6 6 7 7 uses 8 Classes, SysUtils, Graphics ;8 Classes, SysUtils, Graphics, Contnrs; 9 9 10 10 type … … 36 36 37 37 TVectorLine = class(TVectorObject) 38 Points: T List; // of TVectorDot38 Points: TObjectList; // of TVectorDot 39 39 procedure Add(Position: TPoint); 40 40 procedure Draw; override; … … 80 80 public 81 81 Brush: TBrush; 82 Objects: T List; // of TVectorObject82 Objects: TObjectList; // of TVectorObject 83 83 BitmapCanvas: TCanvas; 84 84 Pen: TPen; … … 136 136 NewPoint := TVectorDot.Create; 137 137 NewPoint.Position := Position; 138 Points.Add(NewPoint); 138 139 end; 139 140 … … 155 156 begin 156 157 inherited; 157 Points := T List.Create;158 Points := TObjectList.Create; 158 159 end; 159 160 160 161 destructor TVectorLine.Destroy; 161 var 162 I: Integer; 163 begin 164 for I := 0 to Points.Count - 1 do 165 TVectorObject(Points[I]).Destroy; 162 begin 166 163 Points.Destroy; 167 164 inherited Destroy; … … 210 207 begin 211 208 inherited; 212 Objects := T List.Create;209 Objects := TObjectList.Create; 213 210 Brush := TBrush.Create; 214 211 Pen := TPen.Create; … … 223 220 Pen.Destroy; 224 221 Brush.Destroy; 225 for I := 0 to Objects.Count - 1 do226 TVectorObject(Objects[I]).Destroy;227 222 Objects.Destroy; 228 223 inherited Destroy;
Note:
See TracChangeset
for help on using the changeset viewer.