delphi canvas怎样画菱形
1个回答
展开全部
procedure TForm1.Button1Click(Sender: TObject);
var
x: integer;
begin
x := 80;
form1.canvas.pen.width := 2;
form1.canvas.pen.color := clred;
form1.canvas.moveto(x, 0);
form1.canvas.lineto(0,x);
form1.canvas.Moveto(0,x);
form1.canvas.Lineto(x, 2*x);
form1.canvas.MoveTo(x, 2*x);
form1.canvas.lineto(2*x, x);
form1.canvas.MoveTo(2*x, x);
form1.canvas.LineTo(x, 0);
end;
var
x: integer;
begin
x := 80;
form1.canvas.pen.width := 2;
form1.canvas.pen.color := clred;
form1.canvas.moveto(x, 0);
form1.canvas.lineto(0,x);
form1.canvas.Moveto(0,x);
form1.canvas.Lineto(x, 2*x);
form1.canvas.MoveTo(x, 2*x);
form1.canvas.lineto(2*x, x);
form1.canvas.MoveTo(2*x, x);
form1.canvas.LineTo(x, 0);
end;
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询