procedure TForm1.Button1Click(Sender: TObject);
begin
canvas.Font.Name := 'Times New Roman';
canvas.Font.size := 72;
canvas.Font.style := [fsItalic,fsBold];
beginpath(canvas.handle);
SetBkMode(Canvas.Handle, TRANSPARENT ); // 试验一下不用这行语句,会得到很有意思的结果
canvas.Polygon([Point(0,0),Point(Width,0),
Point(Width,Height),Point(0,Height),
Point(0,0)]); //试验不用该语句看看结果如何
canvas.TextOut(20,40,'Hello');
endpath(canvas.handle);
SetWindowRgn( Handle, PathToRegion(canvas.Handle), true );
end;