//声明: PolyBezierTo( DC: HDC; {设备环境句柄} const Points; {点数组} Count: DWORD {数组元素个数} ): BOOL;
//需要给 PolyBezierTo 指定起始点 procedure TForm1.FormPaint(Sender: TObject); var ps: array[0..2] of TPoint; begin ps[0].X := 40; ps[0].Y := 110; ps[1].X := 80; ps[1].Y := 30; ps[2].X := 110; ps[2].Y := 70; MoveToEx(Canvas.Handle, 10,70, nil); PolyBezierTo(Canvas.Handle, ps, 3); end;
//效果图:
//PolyBezierTo 会更新当前位置 procedure TForm1.FormPaint(Sender: TObject); var ps: array[0..2] of TPoint; begin ps[0].X := 40; ps[0].Y := 110; ps[1].X := 80; ps[1].Y := 30; ps[2].X := 110; ps[2].Y := 70; MoveToEx(Canvas.Handle, 10,70, nil); PolyBezierTo(Canvas.Handle, ps, 3); {PolyBezierTo 已更新当前位置, 继续画} LineTo(Canvas.Handle, 110,10); LineTo(Canvas.Handle, 10,10); LineTo(Canvas.Handle, 10,70); end;
//效果图:
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步