g0dkar / qrcode-kotlin

QRCode Generator implemented in pure Kotlin
https://qrcodekotlin.com/
MIT License
160 stars 13 forks source link

Use custom color function to color each square of the position probe independently #133

Open GiuntaJ opened 3 months ago

GiuntaJ commented 3 months ago

Hi,

Since each position probe is rendered with the renderControlSquare, it is not possible to use a custom color function to color each square with a different color because they will all use the color of the parent square.

For now, I overwrote renderControlSquare in my custom shape function to produce the result I wanted but I was wondering if it was possible in a next version to only use a custom color function to do this (for example, by using renderSquare for all the squares)?

Thank you in advance for your answer and thanks for all the work you did so far on the library.