function SetSize(NewWidth, NewHeight: Integer): Boolean; override;

procedure SetSize(Source: TPersistent); // implemented in TCustomMap


Call SetSize to set a new width and height of the bitmap. If one of the arguments is zero, the bitmap is considered empty and in case of TBitmap32 its Handle property is set to zero.

Calling SetSize works faster than consecutive changing of Width and Height properties. If you use another bitmap or control as an argument, the bitmap will be sized to source dimensions.

If you have an external TCanvas attached, refresh it Handle property after resizing:

Bitmap32.SetSize(100, 200);

Canvas.Handle := Bitmap32.Handle;

After the SetSize call the image the bitmap should be completely redrawn.

See Also

TBitmap32, TBitmap32.Handle, TCustomMap, TCustomMap.Height, TCustomMap.Width