double left = 0, top = 0, width = 0, height = 0;
DocumentViewer.SetRectCoordinatesOnDocumentInch(0.217080444, 0.226247683, 3.48402667, 0.363420218);
DocumentViewer.GetRectCoordinatesOnDocumentInch(ref left, ref top, ref width, ref height);
The results we get are
There is something either wrong with the set method where it sets the wrong coordinates, or there is something wrong with the get method returning incorrect coordinates. Either way, there is some incorrect behavior. I want to blame the set method more, because the rectangle does not appear in the correct location.
Or, is there something else about the GdViewer that might be impacting the behavior of these two methods, that we might need to correct in our code?
We are observing this behavior on our existing documents, and we want to note that everything works fine using the prior version of our application, which uses GdPicture9 and the WinForms viewer. The code is virtually identical between the two, other than the minor naming differences from the changes to the WPF stuff.
There is definitely a bug I think, or broken backwards compatibility in terms of how the WPF documentViewer handles this compared to the old WinForms viewer.
This is only my preliminary look at the problem, so I haven't tested this thoroughly with various zoom modes, but so far I think I am on the right track. I can't see the code for that API since it is obfuscated, but there is definitely a hotfix needed for this particular API to some degree.
This problem is only present in the new WPF viewer. The old WinForms component does not have this problem.
Edit: the same problem exists for SetRectCoordinatesOnDocumentInch. You must multiply by GdViewer.Zoom.
Hope this helps. GdPicture is a pretty cool SDK.
Everything is working as expected form me. Are you using the latest release?
Definitively, I can't reproduce it.
Who is online
Users browsing this forum: No registered users and 3 guests