伤
伤心
Unregistered / Unconfirmed
GUEST, unregistred user!
使用AJPEG: TJPEGImage;
procedure TForm1.FormCreate(Sender: TObject);
begin
Canvas.Pen.Color:=clBlack;
Canvas.Pen.Style:=psSolid;
Canvas.Brush.color:=clBtnFace;
Canvas.Brush.Style:=bsSolid;
//此上是设置 Canvas 的一些属性,便于以后
//Clear Form and Load a new JPEG file;
Ajpeg:=TJpegImage.Create;//动态生成Ajpeg;
Ajpeg.LoadFromFile('3.jpg'); //生成 Ajpeg 后,调入 JPEG 文件 ;
end;
procedure TForm1.FormPaint(Sender: TObject);
var
x,y:integer;
begin
Canvas.Rectangle(2,2,560,430); //画一个黑框的矩形将图片围住;
x:=10; y:=10;
Form1.Canvas.Draw(x,y,Ajpeg); //以(x,y)为左上角输出 JPEG 文件;
//实际上其作用是当图形被破坏是使图形恢复;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Canvas.Pen.Color:=clBlack;
Canvas.Pen.Style:=psSolid;
Canvas.Brush.color:=clBtnFace;
Canvas.Brush.Style:=bsSolid;
//此上是设置 Canvas 的一些属性,便于以后
//Clear Form and Load a new JPEG file;
Ajpeg:=TJpegImage.Create;//动态生成Ajpeg;
Ajpeg.LoadFromFile('3.jpg'); //生成 Ajpeg 后,调入 JPEG 文件 ;
end;
procedure TForm1.FormPaint(Sender: TObject);
var
x,y:integer;
begin
Canvas.Rectangle(2,2,560,430); //画一个黑框的矩形将图片围住;
x:=10; y:=10;
Form1.Canvas.Draw(x,y,Ajpeg); //以(x,y)为左上角输出 JPEG 文件;
//实际上其作用是当图形被破坏是使图形恢复;
end;