Hey,
Does anyone know a faster and more efficient way (might be a library that's out there) to draw a grid in a custom view than using
drawLine()
?
I have a pixel art editor (made with
Bitmap
and written 100% in Kotlin) and I want to give the user the option to enable grid lines, but using
drawLine()
is not performant at all, and I've been trying to find a better alternative for some time now.
Not to mention it's also verbose and for larger canvases it is not performant.
I've spoken to a couple of people who have created a pixel art editor for Windows and they say that most platforms have a custom grid-drawing implementation for
Bitmap
which is lightweight and easy to use, but I so far haven't found one in Android.
I also haven't found any library on GitHub which assists in this.
I understand this is a niche question - since most people haven't created a pixel art editor/have experience in this space - but if anyone has any info/leads please let me know; it's mostly an app for a school project (and will be on the Play Store in the future), and I want it to function perfectly 😄
Cheers 🙏🏻,
thebluepandabear