Search code examples
androidskia

Using skia to draw vs using android canvas


I am trying to make a app where i want to draw small detailed boxes that look like crossword and the user should be able to interact with them. So my question is are there any advantages to using Skia to draw on the skia canvas instead of using the android canvas. Also if you know some other way to do this i would be glad to hear you out.


Solution

  • One of the advantages of using Skia instead of Android drawing capability is that you can do it cross platform. For example, if you're developing a drawing app which targets both iOS and Android, most of your code can be written in C++. Java (Android) code exposes the canvas to the native code, sends any related UI events (e.g. touch coordinates) and lets the native code draw on the canvas.

    Hope that my answer will help. I wish I could have a working sample code for you.