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:
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:
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.
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.
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.
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.
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.
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.
AnnPredefinedBitmap
property - Gets or sets a copy of the specified predefined bitmap,
used for the annotation Point object (ANNOBJECT_POINT).
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.
AnnSetPredefinedMetafile
method - Sets the default metafiles used by the following object types:
AnnGetPredefinedMetafile
method – Gets the default metafiles used by the following object types: