Star-Dust Expert Licensed User Longtime User Apr 26, 2018 #1 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. Code: Copy Dim BView As B4XView = PanelImage And I carry out the elaborations. See example. Code: Copy 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: Code: Copy 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? Last edited: Apr 26, 2018
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. Code: Copy Dim BView As B4XView = PanelImage And I carry out the elaborations. See example. Code: Copy 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: Code: Copy 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?
Erel B4X founder Staff member Licensed User Longtime User Apr 26, 2018 #2 This is not the expected behavior. Can you upload a small project that demonstrates it? Upvote 0
Star-Dust Expert Licensed User Longtime User Apr 26, 2018 #3 It happened to me several times, but I can attach the last code written to help someone on the forum. Present this problem, I attach it Attachments CropBitmpa.zip CropBitmpa.zip 73 KB · Views: 691 Upvote 0
It happened to me several times, but I can attach the last code written to help someone on the forum. Present this problem, I attach it
OliverA Expert Licensed User Longtime User Apr 26, 2018 #4 It's the Snapshot method that seems to zero out top and left of the method's owner. Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Apr 27, 2018 #5 It is indeed a bug in Snapshot. An updated version will be released next week. Upvote 0
LucaMs Expert Licensed User Longtime User Apr 27, 2018 #7 I don't think it is a bug; simply the horse has gone wild. Upvote 0
Cableguy Expert Licensed User Longtime User Apr 27, 2018 #8 LucaMs said: I don't think it is a bug; simply the horse has gone wild. Click to expand... It needs to be tammed, and that's a horse for @Erel! Upvote 0
LucaMs said: I don't think it is a bug; simply the horse has gone wild. Click to expand... It needs to be tammed, and that's a horse for @Erel!