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.
| Parameter | Type | Description |
|---|---|---|
AWidth | Integer | Initial width of the bitmap in pixels. |
AHeight | Integer | Initial height of the bitmap in pixels. |
Overload 3 ​
pascal
constructor Create(ABackendClass: TCustomBackendClass); overload;Creates a TBitmap32 object with a custom backend surface class.
| Parameter | Type | Description |
|---|---|---|
ABackendClass | TCustomBackendClass | Custom 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;