VintaSoft Annotation .NET Plug-in Discussions
Questions, comments and suggestions concerning VintaSoft Annotation .NET Plug-in.
Board index < VintaSoft Imaging < VintaSoft Annotation .NET Plug-in Discussions
... // create the rectangle annotation data RectangleAnnotationData rectData = new RectangleAnnotationData(); // create the rectangle annotation view RectangleAnnotationView rectView = new RectangleAnnotationView(rectData); // get the annotation builder RectangularAnnotationBuilder builder = (RectangularAnnotationBuilder)rectView.Builder; // specify that annotation builder must center rectangular annotation during annotation building builder.ObjectBuildingStyle = Vintasoft.Imaging.UI.VisualTools.UserInteraction.RectangularObjectBuildingStyle.CenterObject; // specify the default size for annotation builder.DefaultSize = new SizeF(150, 100); ... // add annotation to the annotation viewer and start annotation building AnnotationViewer1.AddAndBuildAnnotation(rectView); ...Best regards, Alexander
But setting the ObjectBuildingStyle to RectangularObjectBuildingStyle.CenterObject, seems to still cause the jumping I was trying to avoid (the annotation is initially placed not centered, then jumps to the center). Is this the expected behavior? Is there any way of avoiding the jump?For understanding your problem we need to reproduce the problem on our side. Please send us (to support@vintasoft.com) a small application, which demonstrates the problem. We will analyze your code and will suggest the best solution for your task.
I've finally got this all setup, had to renew the PDF license I was using.Have you solved the problem?
But setting the ObjectBuildingStyle to RectangularObjectBuildingStyle.CenterObject, seems to still cause the jumping I was trying to avoid (the annotation is initially placed not centered, then jumps to the center). Is this the expected behavior? Is there any way of avoiding the jump?
private void annotationViewer_FocusedAnnotationViewChanged(object sender, AnnotationViewChangedEventArgs e)
{
if (e.NewValue != null)
{
// Disallow interation controllers
e.NewValue.CanMove = false;
e.NewValue.CanRotate = false;
e.NewValue.CanResize = false;
}
}