TGPTextureBrush.Create(
本例效果圖:
image: TGPImage; {用於畫刷的圖像}
);
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;
type
TForm1 = class(TForm)
procedure FormPaint(Sender: TObject);
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
uses GDIPOBJ, GDIPAPI;
procedure TForm1.FormPaint(Sender: TObject);
var
g: TGPGraphics;
img: TGPImage;
tb: TGPTextureBrush;
begin
g := TGPGraphics.Create(Canvas.Handle);
img := TGPImage.Create('c:tempsmall.jpg');
tb := TGPTextureBrush.Create(img);
g.FillEllipse(tb, 0, 0, Self.ClientWidth, Self.ClIEntHeight);
img.Free;
tb.Free;
g.Free;
end;
end.