Example-VB | Example-VC++ |
Returns or sets the type of annotation to be drawn.
Ö | Imaging for Windows Professional Edition V1.0, V1.1, and V2.0 |
Ö | Imaging for Windows 95 and 98 |
Ö | Imaging for Windows NT 4.0 |
Note: Hyperlink and OCR Zone annotation types are available with Imaging for Windows Professional Edition V1.0, V1.1, and V2.0 only.
Image Annotation Tool Button control, Image Edit control
object.AnnotationType[=value]
Integer (enumerated)
Constant | Setting | Description |
wiNone | 0 (default) | None |
wiStraightLine | 1 | Straight Line |
wiFreehandLine | 2 | Freehand Line |
wiHollowRect | 3 | Hollow Rectangle |
wiFilledRect | 4 | Filled Rectangle |
wiImageEmbedded | 5 | Image Embedded |
wiImageReference | 6 | Image Reference |
wiText | 7 | Text |
wiTextStamp | 8 | Text Stamp |
wiTextFromFile | 9 | Text From File |
wiTextAttachment | 10 | Attach-a-Note |
wiAnnotationSelection | 11 | Select Annotations |
wiHyperlink | 12 | Hyperlink |
wiOcrRegion | 13 | OCR Zone |
Some annotation types require that other properties be set to valid values before they can be used in an annotation. The following list shows the properties that must be set before the corresponding annotation type can be drawn:
Prerequisite Property | Annotation Type |
AnnotationImage | Image Embedded |
AnnotationImage | Image Reference |
AnnotationStampText | Text Stamp |
AnnotationTextFile | Text From File |
The Draw method generates an error if it is invoked without the required property being set.
If an end user attempts to draw an annotation using the Image Annotation Tool Button control without the required property being set, an error event is sent to the target Image Edit control window. It is up to you to decide whether to present this error to the end user in your application.
Do not attempt to change the AnnotationType property when the standard Annotation Tool Palette is displayed. Use the SelectTool method instead.
The Image Annotation Tool Button control and the Image Edit control do not support the use of Tab characters in any of the text-related annotation types.
The Image Embedded annotation type (setting 5) stores a copy of the actual image data. The Image Reference annotation type (setting 6) stores the image data by reference (file name only).
The Hyperlink annotation type (setting 12) lets end users enter hypertext jumps on an image. (The hypertext jumps are similar to those encountered on the Word Wide Web.)
When end users draw the text box for a Hyperlink annotation at run time, Imaging invokes the Link To dialog box, which enables them to specify the item they want the annotation to be linked to. Hyperlink annotations can be linked to the following items:
While users can draw a Hyperlink annotation on any type of image, a Hyperlink annotation can be saved to disk only when the image upon which it is drawn is saved as a TIFF file. If end users burn-in a Hyperlink annotation, it no longer functions as a hypertext jump.
Keep in mind that any annotation type can be a Hyperlink annotation. You can use the ShowAttribsDialog method of the Image Edit control to invoke the Link To dialog box at run time. The Link To dialog box lets end users specify the item they want a selected annotation to be linked to.
The OCR Zones annotation type (setting 13) lets end users draw OCR zones on an image. OCR zones control the process of recognizing image documents (otherwise known as performing OCR). Depending on the setting of the AnnotationOcrType property, OCR zones can be text zones or picture zones.
OCR Text zones Define areas of an image containing text to be processed by the OCR engine. When the OCR engine encounters a text zone, it converts the underlying image to text. When drawn, OCR Text zones are dark green in color.
OCR Picture zones Define areas of an image containing one or more pictures that should not be processed by the OCR engine. When the OCR engine encounters a picture zone, it does not convert the underlying image to text, it retains the image as a graphic instead. When drawn, OCR Picture zones are dark magenta in color.
While users can draw OCR Zone annotations on any type of image, OCR processing functions only with zones drawn on read/write TIFF images. OCR Zone annotations cannot be burned into TIFF images.