RemoveRegionByID doesn't clear the region from the control
RemoveRegionByID doesn't clear the region from the control
Hi,
Removing a region from the GdViewer by its ID (using the method GdViewer.RemoveRegionByID) removes it from memory, but doesn't clear it from the screen. Is there another method I should call to refresh the control?
Thank you,
- GD
Removing a region from the GdViewer by its ID (using the method GdViewer.RemoveRegionByID) removes it from memory, but doesn't clear it from the screen. Is there another method I should call to refresh the control?
Thank you,
- GD
Re: RemoveRegionByID doesn't clear the region from the contr
Hello,
All is working fine from my end.
Have you tried with the latest release?
if the problem persists with it, could you share a code snippet reproducing the issue?
Kind regards,
Loïc
All is working fine from my end.
Have you tried with the latest release?
if the problem persists with it, could you share a code snippet reproducing the issue?
Kind regards,
Loïc
Re: RemoveRegionByID doesn't clear the region from the contr
Good day,
I still have the same problem with the latest version (downloaded from https://www.gdpicture.com/download-gdpicture).
I work in a WPF project in which I have a MainWindow. For the sake of testing, I only put a GdViewer in this Window.
In the Window.Loaded event, I wrote this code :
The value of result is GdPictureStatus.OK.
The problem I encounter is that the region will still be there. If I move the image, the region will stay on the same place in the window (it will not move with the image). I have the same problem with GdViewer.RemoveRegionByName, but GdViewer.RemoveAllRegions works flawlessly.
Let me know if I can give you any other information.
Thank you,
- GD
I still have the same problem with the latest version (downloaded from https://www.gdpicture.com/download-gdpicture).
I work in a WPF project in which I have a MainWindow. For the sake of testing, I only put a GdViewer in this Window.
In the Window.Loaded event, I wrote this code :
Code: Select all
using (GdPictureImaging gdp = new GdPictureImaging())
{
int imageId = gdp.CreateGdPictureImageFromFile(STR_PathToImage);
double imageHeight = gdp.GetHeightInches(imageId);
double imageWidth = gdp.GetWidthInches(imageId);
Rect region = new Rect(imageWidth / 2 - imageWidth * .05,
imageHeight / 2 - imageHeight * .05,
imageWidth * .1, imageHeight * .1);
GdViewer.DisplayFromGdPictureImage(imageId);
int regionId = GdViewer.AddRegion("test", region.X, region.Y, region.Width, region.Height,
Colors.Red, GdPicture11.WPF.GdViewer.RegionFillMode.Normal);
var result = GdViewer.RemoveRegionByID(regionId);
}
The problem I encounter is that the region will still be there. If I move the image, the region will stay on the same place in the window (it will not move with the image). I have the same problem with GdViewer.RemoveRegionByName, but GdViewer.RemoveAllRegions works flawlessly.
Let me know if I can give you any other information.
Thank you,
- GD
Re: RemoveRegionByID doesn't clear the region from the contr
Hello,
Thank you for the snippet. The problem has been resolved for the next minor release that will be published today.
With best regards,
Loïc
Thank you for the snippet. The problem has been resolved for the next minor release that will be published today.
With best regards,
Loïc
Re: RemoveRegionByID doesn't clear the region from the contr
Thank you for your support!
Have a nice day,
- GD
Have a nice day,
- GD
Who is online
Users browsing this forum: No registered users and 2 guests