Today I have already asked a question about what seemed to me an anomaly, but I simply had not read XUI's help.
I hope I'm not wrong yet.
To perform graphics processing I assign a panel to a B4XView.
Dim BView As B4XView = PanelImage
And I carry out the elaborations. See example.
Sub Button1_Click
Dim BView As B4XView = PanelImage
PanelResult.SetBackgroundImage(BView.Snapshot)
End Sub
If this
sub I call it
several times, it changes the position of the panel (
Left and
Top became 0). So I'm forced to save
Left and
Top to bring it back to its point of origin.
See:
Sub Button1_Click
Dim BView As B4XView = PanelImage
Dim l As Int = PanelImage.Left
Dim T As Int = PanelImage.Top
PanelResult.SetBackgroundImage(BView.Snapshot)
PanelImage.SetLayout(l,T,PanelImage.Width,PanelImage.Height)
End Sub
Why?