[英]Skia for Kotlin multiplatform mobile
I am working on a KMM project and at the moment there is a need for quite advanced vector graphics.我正在做一个 KMM 项目,目前需要非常先进的矢量图形。 From my previous experience the best library to use was Skia: it is powerful, fairly easy and very fast.
根据我以前的经验,最好使用的库是 Skia:它功能强大、相当简单且速度非常快。 Now I have searched for a day on the Internet for Skia for Kotlin and the only thing I could find is this: https://github.com/JetBrains/skiko However, I do not see it supports Android or iOS but maybe my search was not good enough?
现在我在互联网上搜索了一天的用于 Kotlin 的 Skia,我唯一能找到的是: https : //github.com/JetBrains/skiko但是,我不认为它支持 Android 或 iOS 但也许我的搜索还不够好? So, is there Skia for Kotlin multiplatform mobile?
那么,是否有适用于 Kotlin 多平台移动设备的 Skia? Or maybe there is a way to use original Skia library in KMM?
或者也许有一种方法可以在 KMM 中使用原始的 Skia 库? Or otherwise what is the best way to deal with vector graphics in KMM?
否则,在 KMM 中处理矢量图形的最佳方法是什么?
So https://github.com/JetBrains/skiko is not yet available for Kotlin/Native, only for Kotlin/JVM.所以https://github.com/JetBrains/skiko还不能用于 Kotlin/Native,只能用于 Kotlin/JVM。
One solution might be to do the platform agnostic abstractions yourself in KMM then provide the actual implementations for both your Android and iOS.一种解决方案可能是自己在 KMM 中进行平台无关抽象,然后为您的 Android 和 iOS 提供实际实现。
The same thing could be doable for JetBrains/skiko, so I'd personally do one of the following: JetBrains/skiko 也可以做同样的事情,所以我个人会执行以下操作之一:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.