VintaSoft Imaging .NET SDK 12.5: Documentation for .NET developer
In This Topic
    WANG annotations
    In This Topic
    SDK converts Vintasoft annotations to the WANG annotation when Vintasoft annotations are saved to the WANG format. Unfortunately WANG format supports just limited set of annotation types and annotation properties and due of this not all Vintasoft annotations and/or their properties can be converted to the WANG format without significant changes. Some of Vintasoft annotation types are not comparable to WANG format, the same way as some annotation properties have no WANG analogs, thus these annotations and such properties cannot be saved to WANG. Also some values of some annotation properties can lead to critical changes in annotation appearance by saving to WANG format; because of that such annotations cannot be saved to WANG format either. In other cases, while converting to WANG, the algorithm selects the most similar annotation types and their properties automatically in order to leave the visual appearance of annotations after saving or loading without significant changes.



    Save Vintasoft annotations into WANG packet

    Here is a list of annotations, which can be saved into WANG packet:
    1. Not rotated (AnnotationData.Rotation == 0) rectangle annotation (RectangleAnnotationData) with transparent color fill (*) and border (AnnotationData.Border == true) will be saved as WANG-annotation "Hollow rectangle".
    2. Not rotated (AnnotationData.Rotation == 0) rectangle annotation (RectangleAnnotationData) with non-transparent color fill (*) and without border (AnnotationData.Border == false) will be saved as WANG-annotation "Filled rectangle".
    3. Rotated (AnnotationData.Rotation != 0) rectangle annotation (RectangleAnnotationData) with transparent color fill (*) and border (AnnotationData.Border == true) will be saved as WANG-annotation "Hollow polygon"; rectangle will be approximated by a poligon.
    4. Rotated (AnnotationData.Rotation != 0) rectangle annotation (RectangleAnnotationData) with non-transparent color fill (*) and without border (AnnotationData.Border == false) will be saved as WANG-annotation "Filled polygon"; rectangle will be approximated by a poligon.
    5. Ellipse annotation (EllipseAnnotationData) with transparent color fill (*) and border (AnnotationData.Border == true) will be saved as WANG-annotation "Hollow polygon"; ellipse will be approximated by a poligon.
    6. Ellipse annotation (EllipseAnnotationData) with non-transparent color fill (*) and without border (AnnotationData.Border == false) will be saved as WANG-annotation "Filled polygon"; ellipse will be approximated by a poligon.
    7. Not rotated (AnnotationData.Rotation == 0) link annotation (LinkAnnotationData) with border (AnnotationData.Border == true) will be saved as WANG-annotation "Attach-a-note".
    8. Not rotated (AnnotationData.Rotation == 0) link annotation (LinkAnnotationData) withou tborder (AnnotationData.Border == false) will be saved as WANG-annotation "Typed text".
    9. Not rotated (AnnotationData.Rotation == 0) text annotation (TextAnnotationData) with border(AnnotationData.Border == true) will be saved as WANG-annotation "Attach-a-note".
    10. Not rotated text annotation (TextAnnotationData) without border (AnnotationData.Border == false) willbe saved as WANG-annotation "Typed text".
    11. Not rotated highlight annotation (HighlightAnnotationData) will be saved as WANG-annotation "Filled rectangle".
    12. Not rotated (AnnotationData.Rotation == 0) and not mirrored (AnnotationData.HorizontalMirrored == false and AnnotationData.VerticalMirrored == false) embedded image annotation (EmbeddedImageAnnotationData) will be saved as WANG-annotation "Image embedded".
    13. Lines annotation (LineAnnotationData) will be saved as WANG-annotation "Straight line".
    14. Lines annotation (LinesAnnotationData) will be saved as WANG-annotation "Freehand line"; lines with interpolation (LinesAnnotationData.UseInterpolation == true) will be approximated by a polyline.
    15. Polygon annotation (PolygonAnnotationData) with transparent color fill (*) and border (AnnotationData.Border == true) will be saved as WANG-annotation "Hollow polygon"; polygon with interpolation (LinesAnnotationData.UseInterpolation == true) will be approximated by a polyline.
    16. Polygon annotation (PolygonAnnotationData) with non-transparent color fill (*) and no border (AnnotationData.Border == false) will be saved as WANG-annotation "Filled polygon"; polygon with interpolation (LinesAnnotationData.UseInterpolation == true) will be approximated by a polyline.
    17. Group annotation (GroupAnnotationData) will be saved according to the following below guiding principle. All annotations, members of the group, will be saved in full accordance with presented in this article principles of saving into WANG format. If "Name" property of annotation group is not empty, then for all saved annotation the field "GroupName" will be rewritten with the value of this property. If "Name" property is empty, then the value of field "GroupName" will be generated with the template "$GroupN", where N is a sequence number of group starting from 1. While loading annotations from WANG packet, annotations with the same value of "GroupName" field will be merged into one GroupAnnotationData annotation, with value of "Name" property rewritten to the value of this field.

    All other annotations, inclusive annotations derived from above mentioned annotations, cannot be saved into WANG packet.

    (*) The annotation's color fill is counted like transparent by fulfilment of any condition listed below:
    While saving annotations is possible partial or total loss of some property values:
    1. While saving base annotation (AnnotationData)
    2. While saving rectangle annotation (RectangleAnnotationData)
    3. While saving ellipse annotation (EllipseAnnotationData)
      • values of the following properties are lost completely:
    4. While saving link annotation (LinkAnnotationData)
    5. While saving text annotation (TextAnnotationData)
    6. While saving highlight annotation (HighlightAnnotationData)
    7. While saving line annotation (LineAnnotationData)
    8. While saving lines annotation (LinesAnnotationData)
    9. While saving polygon annotation (PolygonAnnotationData)
      • values of the following properties are lost completely:


    Load Vintasoft annotations from WANG packet

    1. "Hollow rectangle" annotation is converted to RectangleAnnotationData.
    2. "Filled rectangle" annotation is converted either to RectangleAnnotationData or HighlightAnnotationDatadepending on value of "Highlighting" field.
    3. "Text from file", "Typed text", "Attach-a-note" and "Text stamp" annotations are converted either to TextAnnotationDataor LinkAnnotationData depending on presence of hyperlink block.
    4. "Straight line" annotation is converted to LineAnnotationData.
    5. "Freehand line" annotation is converted to LinesAnnotationData.
    6. "Hollow polygon" and "Filled polygon" annotations are converted to PolygonAnnotationData.
    7. All loaded annotations with the same value of "GroupName" field will be merged into one GroupAnnotationData annotation, with value of AnnotationData.Name property rewritten to the value of "GroupName" field.

    While loading annotations from WANG packet takes place initialization of the following annotation's properties:
    1. For all annotations loaded from WANG packet
    2. For RectangleAnnotationData
    3. For HighlightAnnotationData
    4. For TextAnnotationData:
    5. For LinkAnnotationData
    6. For PolygonAnnotationData annotation
      • AnnotationData.Border property is initialized to True if WANG-annotation has type "Hollow polygon"; otherwise, property is initialized to False.