Docs: LCL/graphics. Updates TRasterImage.RequestTransparentColor topic to clarify content.

* Discussion: https://forum.lazarus.freepascal.org/index.php/topic,67483.msg519648
This commit is contained in:
dsiders 2024-12-30 03:32:49 +00:00
parent 2ef4fc98ab
commit 431a3980e1

View File

@ -12216,21 +12216,31 @@ Gets the color used to represent transparent pixels in the image.
<descr> <descr>
<p> <p>
<var>RequestTransparentColor</var> is a <var>TColor</var> function used to <var>RequestTransparentColor</var> is a <var>TColor</var> function used to
get the color for transparent pixels in the image. It is called when the resolve the color value for transparent pixels in the image. It is used to
value <var>tmFixed</var> is assigned to the <var>TransparentMode</var> translate the value clDefault in the TransparentColor property to an actual
property. color value.
</p> </p>
<p> <p>
RequestTransparentColor examines pixels in the raw image data to get the When TransparentColor is set to clDefault, the return value for the method is
return value for the method. It gets the color for the pixel located at the used as the color for transparent pixels. The return value is the pixel color
bottom-left corner of the image (x = 0, y - Height-1). stored at the bottom-left corner of the image (x = 0, y = Height-1).
</p> </p>
<p> <p>
When <var>Empty</var> returns <b>True</b> (raw image data is not available), If TransparentColor contains a different TColor value, it is used in its
the return value is <var>clNone</var>. unmodified form.
</p>
<p>
When <var>Empty</var> returns <b>True</b>, raw image data is not available and
the return value is set to <var>clNone</var>.
</p>
<p>
RequestTransparentColor is also called when the value in TransparentMode is
changed to tmAuto. If TransparentMode is set to tmFixed, the TransparentColor
is used as specified.
</p> </p>
</descr> </descr>
<seealso> <seealso>
<link id="TRasterImage.TransparentColor"/>
<link id="TRasterImage.TransparentMode"/> <link id="TRasterImage.TransparentMode"/>
<link id="TGraphic.Empty"/> <link id="TGraphic.Empty"/>
<link id="TTransparentMode"/> <link id="TTransparentMode"/>
@ -13051,8 +13061,7 @@ platforms or widgetsets.
<p> <p>
<var>TransparentColor</var> is a <var>TColor</var> property which indicates <var>TransparentColor</var> is a <var>TColor</var> property which indicates
the color used for transparent pixels in the raw image data. The default the color used for transparent pixels in the raw image data. The default
value for the property is value for the property is <var>clDefault</var>.
<var>clDefault</var>.
</p> </p>
<p> <p>
TransparentColor is used along with <var>TransparentMode</var> to determine TransparentColor is used along with <var>TransparentMode</var> to determine