Declaration
procedure Fill(Value: Double; Alpha: Integer = -1); overload;
procedure Fill(Value: TRGBA); overload;
Description
Fill the image with a specified color.
| Pixel Format | Value |
| ie1g | Specify either 0 or 1 |
| ie8g, ie8p | Specify value between 0 and 255 |
| ie16g | Specify value between 0 and 65535 |
| ie24RGB, ie32RGB, ie48RGB, ieCMYK, ieCIELab | Specify TColor |
Optionally, if Alpha <> -1, it will fill the alpha channel (from 0: Fully Transparent - 255: Fully Opaque).
Note: Even if Alpha < 255, all existing content is cleared. To merge a color with existing content, use
Fill
Example
// Fill an image with white
IEBitmap.Fill( clWhite );
// Fill a monochrome image with white
IEBitmap.Fill( 1.0 );
// Compare the following:
IEBitmap.PixelFormat := ie32RGB;
IEBitmap.Fill( clRed ); // Image will be filled with red, but it is fully transparent
IEBitmap.Fill( clRed, 255 ); // Image is filled with red, but it is fully opaque
IEBitmap.Fill( TColor2TRGBA( clRed, 255 )); // Image is filled with red, but is is fully opaque
See Also
◼FillRect
◼GradientFill
◼GradientFillRect
◼AlphaFill
◼AlphaFillRect
◼Fill