Using Annotation Object Bitmaps

Note:

This topic is for Document/Medical only.

The following annotation objects utilize bitmaps or metafiles as part of the annotation:

ANNOBJECT_ENCRYPT

ANNOBJECT_FREEHANDHOTSPOT

ANNOBJECT_HOTSPOT

ANNOBJECT_POINT

ANNOBJECT_PUSHPIN

ANNOBJECT_STAMP

In addition, the Automation object (ANNOBJECT_AUTOMATION) stores bitmap or metafile settings along with the other object default settings.

LEADTOOLS provides the following functions to work with bitmaps or metafiles:

image\sqrblit.gif AnnSetBitmap method - Use this method with the ANNOBJECT_STAMP, ANNOBJECT_POINT, and ANNOBJECT_PUSHPIN, objects to set the bitmap for the object. The ANNOBJECT_STAMP (including the Rubber Stamp) objects can display text, a bitmap, or a metafile. Only one of these three can be displayed at any time—setting the object to one of these destroys any settings for the other two. Initially, the ANNOBJECT_STAMP displays text. In automation, there are different Rubber Stamp tools available, which are ANNOBJECT_STAMP objects set up to use the different metafiles for each rubber stamp selection instead of text. The ANNOBJECT_PUSHPIN object displays a bitmap in design mode and a secondary bitmap in run mode.

image\sqrblit.gif AnnGetBitmap method - Use this method with the ANNOBJECT_STAMP, ANNOBJECT_POINT, and ANNOBJECT_PUSHPIN, objects to get the handle for bitmap being used for the object. The ANNOBJECT_STAMP (including the Rubber Stamp) objects can display text, a bitmap, or a metafile. Only one of these three can be displayed at any time—setting the object to one of these destroys any settings for the other two. Initially, the ANNOBJECT_STAMP displays text. In automation, there are different Rubber Stamp tools available, which are ANNOBJECT_STAMP objects set up to use the different metafiles for each rubber stamp selection instead of text. The ANNOBJECT_PUSHPIN object displays a bitmap in design mode and a secondary bitmap in run mode.

image\sqrblit.gif AnnSetMetafile method – Use this method with the ANNOBJECT_STAMP (including the Rubber Stamp tools), ANNOBJECT_HOTSPOT, ANNOBJECT_FREEHANDHOTSPOT, and ANNOBJECT_ENCRYPT objects to change the metafile for the selected objects. This method changes the metafile for the specified objects, but any new objects will still use the default metafiles. To reset a metafile to its original metafile, call the AnnSetPredefinedMetafile method and pass 0 to hMetafile.

image\sqrblit.gif AnnGetMetafile method – Use this method with the ANNOBJECT_STAMP, ANNOBJECT_HOTSPOT, ANNOBJECT_FREEHANDHOTSPOT, and ANNOBJECT_ENCRYPT objects and the Rubber Stamp tools to retrieve the metafile for the selected objects.

image\sqrblit.gif AnnSetSecondaryBitmap method - Sets the secondary bitmap used by the specified annotation object. Only PushPin objects (ANNOBJECT_POINT) use a secondary bitmap. A PushPin object has a primary bitmap, (manipulated using the AnnSetBitmap and AnnGetBitmap methods) which displays whenever the text is shown, and a secondary bitmap, changed using the AnnSetSecondaryBitmap. The primary bitmap is shown with the note text. The secondary bitmap is shown by itself when the note is minimized. In design mode, the ANNOBJECT_PUSHPIN object shows the text and displays the primary bitmap. In the run mode the object shows or hides the text when clicked.

image\sqrblit.gif AnnGetSecondaryBitmap method - Gets the secondary bitmap used by the specified annotation object. Only PushPin objects (ANNOBJECT_POINT) use a secondary bitmap. A PushPin object has a primary bitmap, (manipulated using the AnnSetBitmap and AnnGetBitmap methods) which displays whenever the text is shown, and a secondary bitmap, changed using the AnnSetSecondaryBitmap. The primary bitmap is shown with the note text. The secondary bitmap is shown by itself when the note is minimized. In design mode, the ANNOBJECT_PUSHPIN object shows the text and displays the primary bitmap. In the run mode the object shows or hides the text when clicked.

image\sqrblit.gif AnnPredefinedBitmap property - Gets or sets a copy of the specified predefined bitmap, used for the annotation Point object (ANNOBJECT_POINT).

image\sqrblit.gif AnnGetSecondaryMetafile method - Gets the metafile handle associated with an ANNOBJECT_ENCRYPT object when it is in the ‘decryptor’ state. The encrypt object has two states: Encryptor and Decryptor. Each state is displayed with its own metafile.

image\sqrblit.gif AnnSetPredefinedMetafile method - Sets the default metafiles used by the following object types:

ANNOBJECT_ENCRYPT

ANNOBJECT_FREEHANDHOTSPOT

ANNOBJECT_HOTSPOT

ANNOBJECT_STAMP

Rubber Stamp Tools

image\sqrblit.gif AnnGetPredefinedMetafile method – Gets the default metafiles used by the following object types:

ANNOBJECT_ENCRYPT

ANNOBJECT_FREEHANDHOTSPOT

ANNOBJECT_HOTSPOT

ANNOBJECT_STAMP

Rubber Stamp Tools