Declaration ​
pascal
function CombineReg(F, B: TColor32): TColor32;
procedure CombineMem(F: TColor32; var B: TColor32);
procedure CombineLine(Src, Dst: PColor32; Count: Integer);Parameters ​
| Parameter | Type | Description |
|---|---|---|
F | TColor32 | Foreground pixel color. |
B | TColor32 | Background pixel color. |
Src | PColor32 | Pointer to the first source foreground pixel in memory. |
Dst | PColor32 | Pointer to the first destination background pixel in memory. |
Count | Integer | Number of contiguous background pixels to blend. |
Returns ​
| Type | Description |
|---|---|
TColor32 | The blended 32-bit ARGB result color. |
Description ​
The Combine* family of functions performs linear interpolation (Lerp) between two 32-bit ARGB colors (
All four channels (Alpha, Red, Green, Blue) are combined simultaneously.
Variant Summary ​
| Variant | Signature | Description |
|---|---|---|
CombineReg | function(X, Y: TColor32; W: Cardinal): TColor32; | Combines colors |
CombineMem | procedure(X: TColor32; var Y: TColor32; W: Cardinal); | Combines color |
CombineLine | procedure(Src, Dst: PColor32; Count: Integer; W: Cardinal); | Combines Count pixels between Src and Dst scanline buffers with weight |
INFO
All these functions are actually delegates; At startup, Graphics32 binds them to the optimal implementation (Pure Pascal, x86/x64 assembly, or SSE2 vector instructions) supported by the host CPU.