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

ScaleImg

Scales the specified bitmap image to the required dimensions.

Declaration

Source position: graphutil.pp line 76

procedure ScaleImg(

  AImage: TCustomBitmap;

  AWidth: Integer;

  AHeight: Integer

);

Arguments

AImage

  

Bitmap image resized 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 bitmap in AImage to the dimensions in AWidth and AWidth.

No actions are performed in the routine if the image already has the dimensions specified in AWidth and AHeight.

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 its Canvas. AImage is updated with the resized content, and its Height and Width properties are set to the parameter values.

See also

TRasterImage.CreateIntfImage

  

CreateIntfImage - creates an image on the Interface.

TRasterImage.LoadFromIntfImage

  

Loads the image from a TLazIntfImage instance.

TLazCanvas

  

Implements a canvas which masks differences between FCL and LCL canvas classes.

TLazIntfImage

  

Represents a graphical image.


Version 4.0 Generated 2025-05-03 Home