使用 C# 绘制矩形,我需要先在每条边上绘制圆弧,然后我需要单击按钮,它会在边缘绘制圆弧,我该怎么做?
最佳答案
C# 中的图形类没有用于绘制圆角矩形的内置方法,但是有多种方法可以实现此效果。 Jay Riggs 答案中的链接提供关于从哪里开始的好建议,此外我建议您查看这篇文章:
C# - Creating Rounded Rectangles Using A Graphics Path
So first, we create a GraphicsPath, and then we call StartFigure so that we can start adding edges to the path. The rest of this code is for the top left corner and the top line of the rounded rectangle. If we are supposed to make this corner rounded, we add an arc - otherwise...
关于c# - 如何使用 WinForms (.NET) 绘制圆角矩形?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1967944/