Using Annotation Bitmap Objects

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

ANN_OBJECT_ENCRYPT

ANN_OBJECT_FREEHANDHOTSPOT

ANN_OBJECT_HOTSPOT

ANN_OBJECT_POINT

ANN_OBJECT_PUSHPIN

ANN_OBJECT_STAMP

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

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

image\sqrblit.gif AnnSetBitmap method - Use this function with the ANN_OBJECT_STAMP, ANN_OBJECT_POINT, and ANN_OBJECT_PUSHPIN objects to set the bitmap for the object. The ANN_OBJECT_STAMP (including the different Rubber Stamp tools) object 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 ANN_OBJECT_STAMP displays text. In automation, there are different Rubber Stamp tools available: these are ANN_OBJECT_STAMP objects set up to use the different metafiles for each rubber stamp selection (instead of text). The ANN_OBJECT_PUSHPIN object displays a bitmap in design mode and a secondary bitmap in run mode.

image\sqrblit.gif AnnGetBitmap method - Use this function with the ANN_OBJECT_STAMP, ANN_OBJECT_POINT, and ANN_OBJECT_PUSHPIN objects to get the handle for bitmap being used for the object. The ANN_OBJECT_STAMP (including the different Rubber Stamp tools) 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 ANN_OBJECT_STAMP displays text. In automation, there are different Rubber Stamp tools available, which are ANN_OBJECT_STAMP objects set up to use the different metafiles for each rubber stamp selection (instead of text). The ANN_OBJECT_PUSHPIN object displays a bitmap in design mode and a secondary bitmap in run mode.

image\sqrblit.gif AnnSetMetafile – Use this function with the ANN_OBJECT_STAMP (including the Rubber Stamp tools), ANN_OBJECT_HOTSPOT, ANN_OBJECT_FREEHANDHOTSPOT, and ANN_OBJECT_ENCRYPT objects to change the metafile for the selected objects. This function 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 function and pass NULL to hMetafile.

image\sqrblit.gif AnnGetMetafile method – Use this function with the ANN_OBJECT_STAMP, ANN_OBJECT_HOTSPOT, ANN_OBJECT_FREEHANDHOTSPOT, and ANN_OBJECT_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 (ANN_OBJECT_POINT) use a secondary bitmap. A PushPin object has a primary bitmap, (manipulated using the AnnSetBitmap method and the AnnGetBitmap method) which displays whenever the text is shown, and a secondary bitmap, changed using the AnnSetSecondaryBitmap method. 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 ANN_OBJECT_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 (ANN_OBJECT_POINT) use a secondary bitmap. A PushPin object has a primary bitmap, (manipulated using the AnnSetBitmap method and the AnnGetBitmap method) which displays whenever the text is shown, and a secondary bitmap, changed using the AnnSetSecondaryBitmap method. 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 ANN_OBJECT_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 AnnPredefinedRaster property- Gets or sets a copy of the specified predefined bitmap, used for the annotation Point object (ANN_OBJECT_POINT).

image\sqrblit.gif AnnGetSecondaryMetafile method- Gets the metafile handle associated with an ANN_OBJECT_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:

ANN_OBJECT_ENCRYPT

ANN_OBJECT_FREEHANDHOTSPOT

ANN_OBJECT_HOTSPOT

ANN_OBJECT_STAMP (including the Rubber Stamp tools)

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

ANN_OBJECT_ENCRYPT

ANN_OBJECT_FREEHANDHOTSPOT

ANN_OBJECT_HOTSPOT

ANN_OBJECT_STAMP

Rubber Stamp Tools