Although a Canvas is an "Activity Object", can a canvas be used in a code module?
A sub in a code module is passed a bitmap and returns a bitmap (manipulated with canvas).
for example:
A sub in a code module is passed a bitmap and returns a bitmap (manipulated with canvas).
for example:
B4X:
sub DoIt(pic as bitmap) as bitmap
dim cvs as canvas
dim bmp as bitmap
Dim rct As Rect
bmp.InitializeMutable(....
rct.Initialize(.......
cvs.Initialize2(bmp)
cvs.DrawBitmap(.......
return bmp
end sub