Swift 等价于 Java 的一般路径是什么?
What would be the Swift equivalent of General Path of Java?
目前,我正在编写一个 iOS 应用程序,该应用程序基于以前用 Java 编写的实现。该应用程序是一个自定义地图应用程序,需要大量绘制。我一直在尝试找到 class 或最接近代表 Java 的一般路径的对象。非常感谢!
如果 General Path of Java
你的意思是 java.awt.geom.GeneralPath
The GeneralPath class represents a geometric path constructed from
straight lines, and quadratic and cubic (Bézier) curves. It can
contain multiple subpaths.
所以你应该在 iOS 的 UIKit
中寻找 UIBezierPath
A path that consists of straight and curved line segments that you can
render in your custom views.
…
A single Bézier path object can contain any number of open or closed subpaths, where each subpath represents a connected series of path segments.
目前,我正在编写一个 iOS 应用程序,该应用程序基于以前用 Java 编写的实现。该应用程序是一个自定义地图应用程序,需要大量绘制。我一直在尝试找到 class 或最接近代表 Java 的一般路径的对象。非常感谢!
如果 General Path of Java
你的意思是 java.awt.geom.GeneralPath
The GeneralPath class represents a geometric path constructed from straight lines, and quadratic and cubic (Bézier) curves. It can contain multiple subpaths.
所以你应该在 iOS 的 UIKit
UIBezierPath
A path that consists of straight and curved line segments that you can render in your custom views.
…
A single Bézier path object can contain any number of open or closed subpaths, where each subpath represents a connected series of path segments.