Registriert seit: 7. Jun 2006
Ort: Karlsruhe
3.724 Beiträge
FreePascal / Lazarus
|
AW: Aero color
18. Jul 2012, 12:57
Why are you adding the original value?
Try this:
Delphi-Quellcode:
if A <> 0 then
begin
R := Clamp(255*R div A, 0, 255);
G := Clamp(255*G div A, 0, 255);
B := Clamp(255*B div A, 0, 255);
end;
[edit]
Btw @Medium: The order used by this function is in fact ARGB: MSDN: “The color format of the value is 0xAARRGGBB”
[/edit]
Geändert von Namenloser (18. Jul 2012 um 13:09 Uhr)
|