Tema: AlphaBlend
Ver Mensaje Individual
  #2  
Antiguo 27-11-2008
Avatar de cHackAll
[cHackAll] cHackAll is offline
Baneado?
 
Registrado: oct 2006
Posts: 2.159
Reputación: 20
cHackAll Va por buen camino
SemiPanel.pas

Cita:
Empezado por cHackAll Ver Mensaje
Código Delphi [-]
//...
 
 Times := 255 - FAlphaBlendValue;
 if Times <> 0 then
  begin
   y := Height;
   repeat Dec(y);
    lpByte := Pointer(Cardinal(FBitmap.ScanLine[Top + y]) + (Left * 3));
    lpImage := nil;
    if y < FImage.Height then
     begin
      lpImage := FImage.ScanLine[y];
      Max := FImage.Width * 3;
     end;
    x := Width * 3;
    repeat Dec(x);
     if not Assigned(lpImage) then
      begin
       Value := lpByte^ + Times;
       if Value > 255 then
        Value := 255;
       lpByte^ := Value;
      end
     else
      begin
       Value := Abs(lpByte^ - lpImage^);
       if Value <> 0 then
        begin
         if Value > Times then
          Value := Times;
         if lpByte^ < lpImage^ then
          Inc(lpByte^, Value)
         else
          Dec(lpByte^, Value);
        end;
       Inc(lpImage);
       Dec(Max);
       if Max = 0 then
        lpImage := nil;
      end;
     Inc(lpByte);
    until x = 0;
   until (y = 0) or ((Top + y) = 0);
  end;
 
//...
__________________
RTFM > STFW > Foro > Truco > Post > cHackAll > KeBugCheckEx
Responder Con Cita