欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

WinAPI: Chord - 绘制弦

程序员文章站 2022-03-31 15:25:16
...
//声明:
Chord(
  DC: HDC;                                {设备环境句柄}
  X1, Y1, X2, Y2, X3, Y3, X4, Y4: Integer {四个坐标点}
): BOOL;


 
 
 
 
 

 

 

  

//举例:
procedure TForm1.FormPaint(Sender: TObject);
const
  x1 = 10;
  y1 = 10;
  x2 = 200;
  y2 = 200;
  x3 = 130;
  y3 = 200;
  x4 = 160;
  y4 = 10;
begin
  Canvas.TextOut(x1,y1, '1');
  Canvas.TextOut(x2,y2, '2');
  Canvas.TextOut(x3,y3, '3');
  Canvas.TextOut(x4,y4, '4');
  
  Chord(Canvas.Handle, x1,y1, x2,y2, x3,y3, x4,y4);
end;

 
 
 
 
 

 

 

  

//效果图:
WinAPI: Chord - 绘制弦

转载于:https://my.oschina.net/hermer/blog/320087