Based on example Bitmaptransparency i want only merge two images (not transparency)
But the position of second bitmap must be random.
Any idea?
Thank you
But the position of second bitmap must be random.
B4X:
Sub Activity_Create(FirstTime As Boolean)
imvTest.Initialize("")
Activity.AddView(imvTest, 0%x , 0%y, 100%x, 100%y)
bmp1.Initialize(File.DirAssets, "flor.jpg")
bmp2.Initialize(File.DirAssets, "nina.jpg")
rectDest.Initialize(0, 0, 100%x, 100%y)
'*******
'srcdest.Initialize(0,0,10%x,10%y)
'Then draw at 0,0 but
srcdest.Initialize(Rnd(10%x,60%x),Rnd(10%y,60%y),10%x,10%y)
'draw nothing
cvsTest.Initialize(imvTest)
ABExtPaint.Initialize
ABExtPaint.SetAlpha(255)
ABExtDrawas.drawBitmap(cvsTest, bmp1, Null, rectDest, ABExtPaint)
ABExtPaint.Initialize
ABExtPaint.SetAlpha(255)
ABExtDrawas.drawBitmap(cvsTest, bmp2, Null, srcdest, ABExtPaint)
End Sub
Thank you