unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
const arr:array[0..9,0..9] of integer =((0,0,0,5,1,1,5,0,0,0),(0,13,1,10,0,0,10,1,13,0),
(13,1,13,0,0,0,0,13,1,13),(5,10,0,0,0,0,0,0,10,5),(1,13,0,0,0,0,0,0,13,1),(1,13,0,0,0,0,0,0,13,1)
,(5,10,0,0,0,0,0,0,10,5),(13,1,13,0,0,0,0,13,1,13),(0,13,1,10,0,0,10,1,13,0),(0,0,0,5,1,1,5,0,0,0));
type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject); private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses clock;
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var i,j:integer;
ary:array [0..9,0..9] of integer;
begin
ClockOn;
for i:=0 to 9 do
for j:=0 to 9 do
begin
if arr[i,j]<>0 then
//beep();
form1.Canvas.Pixels[50+i,50+j]:=$111100*arr[i,j]+$0000ff;
end;
ClockOff;
//form1.Canvas.Ellipse(50,50,50+arr[1,0],50+arr[1,0]);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
form1.Canvas.Pen.Color:=clred;
form1.Canvas.Ellipse(60,60,70,70);
end;
end.
测试速度还可以,但是怎么样产生这样的数组呢?
各位还有什么其他的好方法?产生透明的反走样圆环呢?