This custom view is an improved version of: https://www.b4x.com/android/forum/threads/81604/#content
It depends on BitmapCreator v4.70+: https://www.b4x.com/android/forum/threads/xui-library-drawing-methods.104339/#post-654641
The class is included in the attached B4A project. It is compatible with B4A, B4i and B4J.