Home | GR32_Blend |
Merge
function MergeReg(F, B: TColor32): TColor32;
procedure MergeMem(F: TColor32; var B: TColor32);
Description
Merges a foregrownd (F) color with the background color (B) using the alpha component of the foreground color. It does merge the alpha-channels.
SA = 1 - (1 - FA) (1 - BA)
SRGB = (FA * FRGB + BA * (1 - FA) * BRGB) / SA
MergeReg takes parameters and produces the result operating on CPU registers.
MergeMem operates with the background color referenced by a memory address.
Note, that after using the Merge function, you have to call EMMS. Otherwise CPU will be unable to handle floating point instructions.
See Also
Blend, BlendEx, Combine, EMMS, MergeEx, TColor32
Copyright ©2000-2007 Alex Denisov and Contributors - Graphics32 v1.8.3 - Build on 4-March-2007