VintaSoft Imaging .NET SDK v8.8 for .NET Framework
In This Topic
    Build and transform annotations in WPF
    In This Topic

    The WpfAnnotationVisualTool allows the user to build or transform annotation. The building of annotation is performed by annotation builder; the transformation of annotation is performed by annotation transformer. The visual tool gets information about builder and transformer from WpfAnnotationView class:

    Building of annotation.

    After annotation is created the value of its WpfAnnotationView.InteractionController property corresponds to the value of WpfAnnotationView.Builder property. The annotation building process may be started using WpfAnnotationVisualTool.AddAndBuildAnnotation method. The method adds an annotation into the annotation collection of current image, gets the current interaction controller (builder) using WpfAnnotationView.InteractionController property and starts the building of annotation.
    For annotation building are utilized the following interaction controllers (builder):

    Transformation of annotation.

    The annotation transformation process may be started for the annotation that is currently active. For any active annotation the user can change the annotation selection rectangle via mouse. Annotation will vary directly as the annotation selection rectangle. In addition, the user may relocate any of annotation's points for point based annotation.
    For annotation transformation are used the following interactive communication controllers:

    Transformation of annotation using several controllers.

    For the functionality integration of several interactive communication controllers is used WpfCompositeInteractionController.

    Let's review a composition of interactive communication controllers on concrete example:
    The composite annotation WpfFreeTextAnnotationView is derived from WpfCompositeAnnotationView class and consists of two annotations: WpfTextAnnotationView and WpfLeaderLineAnnotationView. To create a transformer for this annotation is used composite interaction controller which merges work of three transformers: