简体   繁体   中英

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. From my previous experience the best library to use was Skia: it is powerful, fairly easy and very fast. 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? So, is there Skia for Kotlin multiplatform mobile? Or maybe there is a way to use original Skia library in KMM? Or otherwise what is the best way to deal with vector graphics in KMM?

So https://github.com/JetBrains/skiko is not yet available for Kotlin/Native, only for 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.

The same thing could be doable for JetBrains/skiko, so I'd personally do one of the following:

  • Wait for https://github.com/JetBrains/skiko/issues/80 to be implemented
  • Make contribution to the library
  • If it feels too much work, do it for your project only, later on you can come back and contribute to the library if you'd like to

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM