unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, Spin,
ExtCtrls, BGRAVirtualScreen, BGRABitmap, BGRABitmapTypes, Math;
const
sin_data :Array[0..179] of Integer =(0
,2,5,7,10,12,15,17,19,22,24,27,29,31,34,36,39
,41,43,46,48,50,52,55,57,59,61,64,66,68,70,72,74
,76,78,80,82,84,86,88,90,92,94,95,97,99,101,102,104
,106,107,109,110,112,113,115,116,117,119,120,121,122,124,125,126
,127,128,129,130,131,132,132,133,134,135,135,136,136,137,137,138
,138,139,139,139,139,140,140,140,140,140,140,140,140,140,139,139
,139,139,138,138,137,137,136,136,135,135,134,133,132,132,131,130
,129,128,127,126,125,124,122,121,120,119,117,116,115,113,112,110
,109,107,106,104,102,101,99,97,95,94,92,90,88,86,84,82
,80,78,76,74,72,70,68,66,64,61,59,57,55,52,50,48
,46,43,41,39,36,34,31,29,27,24,22,19,17,15,12,10
,7,5,2);
type
{ TForm1 }
TForm1 = class(TForm)
BGRAVirtualScreen1: TBGRAVirtualScreen;
Timer1: TTimer;
procedure BGRAVirtualScreen1Redraw(Sender: TObject; Bitmap: TBGRABitmap);
procedure FormCreate(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
private
public
end;
var
Form1: TForm1;
txt : Array of Pchar;
s1,s2,s3,s4,s5,s6,s7 : Integer;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.FormCreate(Sender: TObject);
begin
SetLength(txt, 1);
txt[0] := 'LAZARUS';
SetLength(txt ,Length(txt));
s7 := 0;
s6 := 4;
s5 := 8;
s4 := 12;
s3 := 16;
s2 := 20;
s1 := 24;
end;
procedure TForm1.BGRAVirtualScreen1Redraw(Sender: TObject; Bitmap: TBGRABitmap);
begin
Bitmap.FontName := 'Arial';
Bitmap.FontHeight := 72;
Bitmap.FontStyle:=[fsBold];
Bitmap.FillRect(0,0,BGRAVirtualScreen1.Width,BGRAVirtualScreen1.Height,BGRA(0,0,0));
Bitmap.TextOut(140+60,460 - sin_data[s1]*3, txt[0][0], BGRA(255,255,255));
Bitmap.TextOut(140+120,460 - sin_data[s2]*3, txt[0][1], BGRA(255,255,255));
Bitmap.TextOut(140+180,460 - sin_data[s3]*3, txt[0][2], BGRA(255,255,255));
Bitmap.TextOut(140+240,460 - sin_data[s4]*3, txt[0][3], BGRA(255,255,255));
Bitmap.TextOut(140+300,460 - sin_data[s5]*3, txt[0][4], BGRA(255,255,255));
Bitmap.TextOut(140+360,460 - sin_data[s6]*3, txt[0][5], BGRA(255,255,255));
Bitmap.TextOut(140+420,460 - sin_data[s7]*3, txt[0][6], BGRA(255,255,255));
inc(s1,2);inc(s2,2);inc(s3,2);inc(s4,2);inc(s5,2);inc(s6,2);inc(s7,2);
s1 := s1 mod Length(sin_data);
s2 := s2 mod Length(sin_data);
s3 := s3 mod Length(sin_data);
s4 := s4 mod Length(sin_data);
s5 := s5 mod Length(sin_data);
s6 := s6 mod Length(sin_data);
s7 := s7 mod Length(sin_data);
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
BGRAVirtualScreen1.RedrawBitmap;
end;
end.