Great results.
Thank you Erel.
Thank you Erel.
If I set the orientation to portrait, detected rectangle gets incorrect coordinates. Can you please give me a hint how to fix it?New version was uploaded. The detected rectangle is drawn.
I've locked the orientation to landscape to make it simpler.
If 100%x < 100%y Then
r.Initialize(100%x - br.GetField("y"),tl.GetField("x") , 100%x - tl.GetField("y"), br.GetField("x"))
Log(r)
Else
'landscape
r.Initialize(tl.GetField("x"), tl.GetField("y"), br.GetField("x"), br.GetField("y"))
End If
Where?Start with this:
B4X:If 100%x < 100%y Then r.Initialize(100%x - br.GetField("y"),tl.GetField("x") , 100%x - tl.GetField("y"), br.GetField("x")) Log(r) Else 'landscape r.Initialize(tl.GetField("x"), tl.GetField("y"), br.GetField("x"), br.GetField("y")) End If