ImageEn, unit iexBitmaps

TIEBitmap.AlphaFillRect

TIEBitmap.AlphaFillRect


Declaration


procedure AlphaFillRect(x1, y1, x2, y2: integer; Value: Byte); overload;
procedure AlphaFillRect(x1, y1, x2, y2: integer; StartValue, EndValue: Byte; Direction: TIEGradientDir = gdVertical); overload;


Description


Sets the transparency of the alpha channel within a rect. Either filling it with a single value, or graduating from one value to another (gradient transparency).

0 is transparent, 255 is opaque, 1 - 254 are partially transparent.




Example


// Set image rect as fully transparent
IEBitmap.AlphaFillRect( 100, 100, 200, 200, 0 );

// Set image rect as fully opaque
IEBitmap.AlphaFillRect( 100, 100, 200, 200, 255 );

// Set image rect as 50% transparent
IEBitmap.AlphaFillRect( 100, 100, 200, 200, 128 );

// Graduate the transparency of an image rect from fully transparent on the left to fully opaque on the right
IEBitmap.AlphaFillRect( 100, 100, 200, 200, 0, 255, gdHorizontal );


See Also


- Alpha
- AlphaChannel
- AlphaFill
- Fill
- FillRect
- GradientFill
- GradientFillRect