Create

Graphics32

TBitmap32Item.Create

constructor Create(Collection: TCollection); override;

Description

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.

See Also

TBitmap32Collection.Add, TBitmap32Collection, TBitmap32Item