From ea83afdf937e69eee97542d861bca8697df59537 Mon Sep 17 00:00:00 2001 From: dsiders Date: Sun, 4 May 2025 14:53:45 -0400 Subject: [PATCH] Docs: LCL/graphutil. Updates the ScaleImg topic for changes in 412af2a7. Issue #41614. --- docs/xml/lcl/graphutil.xml | 39 +++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/docs/xml/lcl/graphutil.xml b/docs/xml/lcl/graphutil.xml index 744038c599..35f1d04398 100644 --- a/docs/xml/lcl/graphutil.xml +++ b/docs/xml/lcl/graphutil.xml @@ -714,21 +714,28 @@ Scales the specified bitmap image to the required dimensions.

ScaleImg is a procedure used to scale the bitmap in -AImage to the dimensions in AWidth and -AWidth. +AImage to the dimensions in AWidth and +AHeight.

-No actions are performed in the routine if the image already has the dimensions +No actions are performed in the routine if AImage 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. +ScaleImg uses the CreateIntfImage method in the bitmap image to create +TLazIntfImage instances for both the original source image and a destination +image. The destination image is configured with the new width and height. A +TLazCanvas instance is created for the scaled image and its StretchDraw method +is used to resize and draw the original image on the Canvas. +

+

+The Canvas is configured to use interpolation when both the width and height +for the scaled image are larger than the values in the original image. Pixels +generated / inserted into the destination image are an estimate of the +surrounding pixel values from the original image. +

+AImage is updated with the resized image content prior to exiting from the +routine.

@@ -739,13 +746,19 @@ values. -Bitmap image resized in the routine. + +Bitmap image resized in the routine. + -New width requested for the image. + +New width requested for the image. + -New height requested for the image. + +New height requested for the image. +