Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Gráficos
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

 
 
Herramientas Buscar en Tema Desplegado
  #8  
Antiguo 01-11-2008
Avatar de cHackAll
[cHackAll] cHackAll is offline
Baneado?
 
Registrado: oct 2006
Posts: 2.159
Poder: 22
cHackAll Va por buen camino
Código Delphi [-]
unit _Main; // by cHackAll
 
interface
 
uses Windows, Classes, Graphics, Controls, Forms, ExtCtrls;
 
type
 TMain = class(TForm)
  Timer: TTimer;
  procedure FormCreate(Sender: TObject);
  procedure TimerTimer(Sender: TObject);
  procedure FormPaint(Sender: TObject);
 end;
 
var Main: TMain;
 
implementation
 
{$r *.dfm}
 
var
 Step: Double;
 Bitmap: TBitmap;
 Snake: array [0..255] of TPoint; // must be zero when "Text" is changed!
 
procedure TMain.FormCreate(Sender: TObject);
begin
 Timer.Interval := 33;
 Bitmap := TBitmap.Create;
 Bitmap.Width := ClientWidth;
 Bitmap.Height := ClientHeight;
end;
 
procedure TMain.TimerTimer(Sender: TObject);
var
 Size: Double;
 Value: TPoint;
 Index: Integer;
begin
 Size := 360 / Length(Caption);
 with Bitmap.Canvas do
  begin
   FillRect(Rect(0, 0, Bitmap.Width, Bitmap.Height));
   for Index := 1 to Length(Caption) do
    with Snake[Index] do
     begin
      if Index > 1 then
       Value := Snake[Index - 1]
      else
       Value := ScreenToClient(Mouse.CursorPos);
      Inc(X, Round((Value.X - X) * 0.6));
      Inc(Y, Round((Value.Y - Y) * 0.6));
      Pixels[X, Y] := clRed; // It shows a "snake tail" effect
      TextOut(X + Round(66 * Cos(Step + Index * Size * (Pi / 180))),
              Y + Round(66 * Sin(Step + Index * Size * (Pi / 180))),
              Caption[Index]); // It shows your effect, use one or both
     end;
  end;
 FormPaint(nil);
 Step := Step - 0.06;
end;
 
procedure TMain.FormPaint(Sender: TObject);
begin
 BitBlt(Canvas.Handle, 0, 0, Bitmap.Width, Bitmap.Height, Bitmap.Canvas.Handle, 0, 0, SRCCOPY);
end;
 
end.
__________________
RTFM > STFW > Foro > Truco > Post > cHackAll > KeBugCheckEx

Última edición por cHackAll fecha: 10-11-2008 a las 19:30:00.
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Posicion del mouse Luciano M. OOP 8 11-01-2006 19:05:16
Problema con el mouse y la alineacion del texto en un Tcombobox Carlos Arevalo Varios 3 23-09-2005 17:00:36
problemas con mouse ahkimpech Linux 1 29-07-2005 01:10:03
mouse AngelMarvin Windows 2 20-07-2004 07:16:35
inhabilitar mouse Barriccel API de Windows 2 04-12-2003 15:07:35


La franja horaria es GMT +2. Ahora son las 16:11:28.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi