怎么画圆角矩形??

koalacsdn 2005-08-22 02:50:36
同题
...全文
99 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
wqdzgh 2006-01-26
  • 打赏
  • 举报
回复
如果不嫌麻烦可以用API函数
大可山人 2006-01-26
  • 打赏
  • 举报
回复
public GraphicsPath DrawRoundRect(int x,int y,int width,int height,int arcWidth)
{
GraphicsPath gp=new GraphicsPath();
gp.AddArc(x,y,arcWidth,arcWidth,180,90);
gp.AddArc(width-arcWidth,y,arcWidth,arcWidth,270,90);
gp.AddArc(width -arcWidth,height-arcWidth,arcWidth,arcWidth,0,90);
gp.AddArc(x,height-arcWidth,arcWidth,arcWidth,90,90);
gp.CloseAllFigures();
return gp;
}
然后graphics.DrawPath(yourPen, DrawRoundRect(...));

16,555

社区成员

发帖
与我相关
我的任务
社区描述
VB技术相关讨论,主要为经典vb,即VB6.0
社区管理员
  • VB.NET
  • 水哥阿乐
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧