From 3f7395faca51f2cb759f1943eea8b760a12d2aec Mon Sep 17 00:00:00 2001 From: dsiders Date: Tue, 5 Nov 2024 20:30:51 +0000 Subject: [PATCH] Docs: LCL/graphutil. Modifies content in ScaleImg topic for changes in 77121d9b. * Exit ScaleImg immediately when size change for the image is not needed. (cherry picked from commit a265712f5febed7b9a6f330c6f30cb43c4c3edda) --- docs/xml/lcl/graphutil.xml | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/docs/xml/lcl/graphutil.xml b/docs/xml/lcl/graphutil.xml index cc3b9f85ca..3c478bb3fc 100644 --- a/docs/xml/lcl/graphutil.xml +++ b/docs/xml/lcl/graphutil.xml @@ -708,30 +708,41 @@ Original author: Chris Rorden -Scales the specified image to the required dimensions. + +Scales the specified bitmap image to the required dimensions. +

-ScaleImg is a procedure used to scale the image in +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 the Canvas. AImage is updated with the resized content, and its +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.

- + +TCustomBitmap.CreateIntfImage +TRasterImage.LoadFromIntfImage +TLazCanvas +TLazIntfImage +
-Bitmap image resize 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. @@ -739,8 +750,8 @@ values. -Converts an RGB color value to Hue, Lightness, and Saturation values -. +Converts an RGB color value to Hue, Luminance, and Saturation values. + @@ -770,10 +781,10 @@ Converts an RGB color value to Hue, Lightness, and Saturation values - + - +