Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试绘制一个可以通过计算器绘制的平面,并且我知道您可以用一行或几行代码绘制轴,但我不知道它们是什么。
谢谢
我相信您正在寻找的是 NSBezierPath。它有如下方法:
+ (void)strokeLineFromPoint:(NSPoint)point1 toPoint:(NSPoint)point2
您可能还想查看 NSColor,您需要使用它来设置描边颜色。
在 iOS 中,大致等价的类是 UIBezierPath。