constructor Create(Collection: TCollection); override;
Creates an instance of TBitmap32Item.
When creating bitmap items at run time, pass the corresponding TBitmap32Collection object as the parameter.
Alternatively, you may use TBitmap32Collection.Add method to create new bitmap items:
var
BitmapCollection: TBitmap32Collection;
B1, B2: TBitmap32Item;
begin
BitmapCollection := TBitmap32Collection.Create;
try
B1 := TBitmap32Item.Create(BitmapCollection);
B2 := BitmapCollection.Add;
// some operations with B1, B2...
finally
BitmapCollection.Free;
end;
end;
Note, that it is not necessary to call the Free method for bitmap items, since they are owned by the collection.
TBitmap32Collection, TBitmap32Collection.Add, TBitmap32Item
Copyright ©2000-2024 Alex Denisov and the Graphics32 Team - Graphics32 2.0 - Help file built on 18 Feb 2024