alexzhirkevich / custom-qr-generator

Android library for creating QR codes with logo, custom shapes, colors, background image. Powered by ZXing
MIT License
173 stars 18 forks source link

Separate painting mode #35

Closed alexzhirkevich closed 1 year ago

alexzhirkevich commented 1 year ago

Separate painting mode

Adds separate mode for drawing elements (as a property of a QrVectorColor). New default color - QrVectorColor.SolidRandom - allows to pick a random color from a set with declared probabilities

Perfomance optimization

Since using separate painting mode required a lot more objects to allocate, createPaint and createPath were replaced with Paint.paint and Path.shape methods that reuse allocated objects.

Will require a little manual migration if custom colors/shapes were used

New

Rect shape with size


Closes #29 Closes #33 Closes #34