Ver Mensaje Individual
  #14  
Antiguo 27-11-2008
Avatar de cHackAll
[cHackAll] cHackAll is offline
Baneado?
 
Registrado: oct 2006
Posts: 2.159
Reputación: 22
cHackAll Va por buen camino
Código Delphi [-]
var Bitmap: TBitmap;
 
procedure TForm1.FormCreate(Sender: TObject);
var Offset, Value, Index: Cardinal;
begin
 Bitmap := TBitmap.Create;
 Bitmap.Width := 255 * 3;
 Bitmap.Height := 1;
 Offset := 0;
 Value := 255; // change this
 for Index := 0 to 255 * 3 - 1 do
  begin
   Bitmap.Canvas.Pixels[Index, 0] := Value;
   Dec(PByte(Cardinal(@Value) + (Offset mod 3))^);
   Inc(PByte(Cardinal(@Value) + ((Offset + 1) mod 3))^);
   if ((Index + 1) mod 255) = 0 then
    Inc(Offset);
  end;
end;
 
procedure TForm1.FormPaint(Sender: TObject); // OnPaint, OnResize
begin
 SetStretchBltMode(Canvas.Handle, COLORONCOLOR);
 StretchBlt(Canvas.Handle, 0, 0, ClientWidth, ClientHeight, Bitmap.Canvas.Handle, 0, 0, 255 * 3, 1, SRCCOPY);
end;
__________________
RTFM > STFW > Foro > Truco > Post > cHackAll > KeBugCheckEx
Responder Con Cita