>>123 判らないといわれると 余計にパスカル書きたくなる
type TaBYTE= array [0..2] of BYTE;
type TPaBYTE= ^TaBYTE;
procedure BlendProc(src,dst,back:TPaBYTE ; ByteSize,ra,rb:Integer );
var H,L,i:Integer;
var s:^Integer absolute src;
var d:^Integer absolute dst;
var b:^Integer absolute back;
begin
while ByteSize>=4 do begin
H:= ((s^ SHR 8) AND $00FF00FF)*ra;
L:= (s^ AND $00FF00FF)*ra;
inc(s);
H:=H+ ((d^ SHR 8) AND $00FF00FF)*rb;
L:=L+ (d^ AND $00FF00FF)*rb;
b^:= (H AND $FF00FF00) OR ((L SHR 8) AND $00FF00FF);
inc(d);
inc(b);
dec(ByteSize,4);
end;
for i:=0 to ByteSize-1 do begin
back^[i] :=(src^[i]*ra +dst^[i]*rb) shr 8;
end;
end;