FMX.ImgList.TCustomImageList.Bitmap

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function Bitmap(Size: TSizeF; const Index: Integer): TBitmap;

C++

Fmx::Graphics::TBitmap* __fastcall Bitmap(const System::Types::TSizeF &Size, const int Index);

Properties

Type Visibility Source Unit Parent
function public
FMX.ImgList.pas
FMX.ImgList.hpp
FMX.ImgList TCustomImageList

Description

Returns the TBitmap object, in the cache, containing the image referenced with Index in the Destination collection and having the specified Size.

Bitmap checks whether a TBitmap object containing the image referenced with Index in the Destination collection and having the specified Size already exists in the internal cache. If such TBitmap object exists, Bitmap returns it. If such TBitmap object does not exist in the cache, then Bitmap creates in the cache the TBitmap object, corresponding to the Index item in the Destination collection and having the specified Size, and returns the created TBitmap object.

If the specified Index item does not exist in Destination collection, Bitmap returns nil.

A call to Bitmap guarantees that the returned TBitmap object exists in the internal cache.

Because the TCustomImageList component can automatically destroys the TBitmap objects, that are returned by Bitmap, in the internal cache; therefore, you must not:

  • Store references to returned TBitmap objects.
  • Destroy returned TBitmap objects explicitly.

See Also