Y
ykjt
Unregistered / Unconfirmed
GUEST, unregistred user!
使用canvas时遇到的
procedure TForm1.Button1Click(Sender: TObject);
var
p:trect;
begin
p.Left:=image1.Left;
p.Top:=image1.Top;
p.Right:=image1.Width;
p.Bottom:=image1.Height;
edit1.Text:=inttostr(p.Right);
canvas.Brush.Style:= bsfdiagonal;
canvas.Brush.Color:=$0032bb22;
canvas.FillRect(p);
end;
本想覆盖整个image1,结果却覆盖了四分之一,是何原因?
procedure TForm1.Button1Click(Sender: TObject);
var
p:trect;
begin
p.Left:=image1.Left;
p.Top:=image1.Top;
p.Right:=image1.Width;
p.Bottom:=image1.Height;
edit1.Text:=inttostr(p.Right);
canvas.Brush.Style:= bsfdiagonal;
canvas.Brush.Color:=$0032bb22;
canvas.FillRect(p);
end;
本想覆盖整个image1,结果却覆盖了四分之一,是何原因?