Skip to content
Member Filters
Show Inherited
Show Protected
Show abstract
GR32🞂TBitmap32🞂CreateConstructorPublic
Inherited from:TCustomBitmap32.Create

TBitmap32.Create

Instantiates a new 32-bit bitmap object.

Declarations ​

pascal
constructor Create; overload; override;
constructor Create(AWidth, AHeight: Integer); overload;
constructor Create(ABackendClass: TCustomBackendClass); overload;
Overload Details

Overload 1 ​

pascal
constructor Create; overload; override;

Creates an empty bitmap object with default dimensions (0x0).

Overload 2 ​

pascal
constructor Create(AWidth, AHeight: Integer); overload;

Creates a bitmap object initialized with the specified width and height.

ParameterTypeDescription
AWidthIntegerInitial width of the bitmap in pixels.
AHeightIntegerInitial height of the bitmap in pixels.

Overload 3 ​

pascal
constructor Create(ABackendClass: TCustomBackendClass); overload;

Creates a TBitmap32 object with a custom backend surface class.

ParameterTypeDescription
ABackendClassTCustomBackendClassCustom memory surface backend class (e.g. Memory, GDI, or MMF backend).

Description ​

Create allocates memory for the pixel buffer and initializes internal backend interfaces.

Example ​

pascal
var
  Bmp: TBitmap32;
begin
  // Create a 800x600 bitmap and fill it with the color red
  Bmp := TBitmap32.Create(800, 600);
  try
    Bmp.Clear(clRed32);
  finally
    Bmp.Free;
  end;
end;