AnnotationBoundingRect of WpfAnnotationViewer not working properly?

Questions, comments and suggestions concerning VintaSoft Annotation .NET Plug-in.

Moderator: Alex

Post Reply
AlexanderJ
Posts: 2
Joined: Mon Aug 05, 2019 1:50 pm

AnnotationBoundingRect of WpfAnnotationViewer not working properly?

Post by AlexanderJ » Tue Aug 20, 2019 10:21 pm

Hello,

we use WpfAnnotationViewer in our project to show an image and create/draw annotations on it.
We want that the user is only able to draw/create annotations inside the image but not outside of it.

To achieve that we thought it's enough to set IsAnnotationBoundingRectEnabled to true and AnnotationBoundingRect to Rect.Empty if necessary, at least that is what I would expect after reading the documentation of these properties.

Unfortunately this isn't working properly for some annotations you provide (we didn't create any custom annotations yet).
For example creating an ellipse or rectangle annotation is only possible inside the image boundaries, using the freehand annotation I'm still able to draw outside the image boundaries. Also the line annotation isn't behaving correctly in my opinion, you can only start inside the image boundaries but you can end it outside the image boundaries.
As long as you don't move or touch the freehand/line annotation after creation it will stay at the position it was drawn..

The above mentioned annotations are those I've tested, not sure if other annotations you provide also won't stay inside the image boundaries...
Am I missing something to achieve the behaviour for freehand/line annotations to allow drawing/creation only inside image boundaries when above mentioned settings are applied to WpfAnnotationViewer or is this a bug?

Thanks

Alex
Site Admin
Posts: 1730
Joined: Thu Jul 10, 2008 2:21 pm

Re: AnnotationBoundingRect of WpfAnnotationViewer not working properly?

Post by Alex » Thu Aug 22, 2019 2:42 pm

Hello Alexander,

In current version WPF annotation viewer allows to bound only building/transformation of rectangle-based annotations. In next minor version (8.8.0.7) we will add the ability to bound building/transformation of all annotation types.

Best regards, Alexander

AlexanderJ
Posts: 2
Joined: Mon Aug 05, 2019 1:50 pm

Re: AnnotationBoundingRect of WpfAnnotationViewer not working properly?

Post by AlexanderJ » Fri Aug 23, 2019 4:52 pm

Great thanks for the information.

Alex
Site Admin
Posts: 1730
Joined: Thu Jul 10, 2008 2:21 pm

Re: AnnotationBoundingRect of WpfAnnotationViewer not working properly?

Post by Alex » Thu Sep 05, 2019 5:18 pm

Hello Alexander,

In version 8.8.0.7 we fixed the bug in algorithm that bounds building/transformation of annotations in WPF image viewer. Please use version 8.8.0.7 and let me know if you will have any question or problem.

Best regards, Alexander

Post Reply