[Overview][Constants][Types][Procedures and functions][Index] Reference for unit 'GraphUtil' (#lcl)

ScaleImg

Scales the specified image to the required dimensions.

Declaration

Source position: graphutil.pp line 76

procedure ScaleImg(

  AImage: TCustomBitmap;

  AWidth: Integer;

  AHeight: Integer

);

Arguments

AImage

  

Bitmap image resize in the routine.

AWidth

  

New Width requested for the image.

AHeight

  

New height requested for the image.

Description

ScaleImg is a procedure used to scale the image in AImage to the dimensions in AWidth and AWidth.

ScaleImg calls the CreateIntfImage method in AImage to get a TLazIntfImage instance with the original content. A temporary TLazCanvas instance is created for the source image, and its StretchDraw method is called to resize and draw the interface image on the Canvas. AImage is updated with the resized content, and its Height and Width properties are set to the parameter values.


Version 3.2 Generated 2024-02-25 Home