gpt4 book ai didi

iphone - 如何在Core Graphics/Quartz 2D中绘制圆角矩形?

转载 作者:行者123 更新时间:2023-12-03 18:09:26 34 4
gpt4 key购买 nike

我需要绘制圆角矩形的轮廓。我知道我可以制作直线和圆弧,但也许还有一个用于圆角矩形的函数?

最佳答案

您可以使用直线和圆弧来创建自己的路径,而不是使用

[UIBezierPath bezierPathWithRoundedRect:cornerRadius:]

[UIBezierPath bezierPathWithRoundedRect:byRoundingCorners:cornerRadii:]

(第二个让您指定哪些角是圆角的)

适用于 iOS 3.2 或更高版本。

关于iphone - 如何在Core Graphics/Quartz 2D中绘制圆角矩形?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2835448/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com