LEADTOOLS Raster Imaging C++ Class Library Help > LEADTOOLS Raster Imaging Features > Annotations > Used Structures > ANNPOINTOPTIONS |
typedef struct tagANNPOINTOPTIONS
{
L_UINT uStructSize;
L_UINT uFlags;
L_BOOL bPointUseBitmap;
pBITMAPHANDLE pPointBitmap;
L_UINT uBitmapStructSize;
L_BOOL bPointBitmapTransparent;
COLORREF crPointBitmapTransparentColor;
L_INT32 nPointRadius;
COLORREF crPointBorderColor;
L_BOOL bPointTransparentFill;
COLORREF crPointFillColor;
L_BOOL bPointFixedSize;
L_INT32 nReserved;
} ANNPOINTOPTIONS, *pANNPOINTOPTIONS;
The ANNPOINTOPTIONS structure is used with the functions LAnnAutomation::SetPointOptions, LAnnPoint::SetPointOptions and LAnnAutomation::GetPointOptions, LAnnPoint::GetPointOptions to get or set options on an annotation point object.
Member |
Description |
|
uStructSize |
Size of this structure. Use sizeof(ANNENCRYPTOPTIONS) |
|
uFlags |
Identifies which fields are valid. Possible values are one or more of the following constants "or"ed together. |
|
|
Value |
Meaning |
|
ANNPOINT_USE_BITMAP |
[0x001] bPointUseBitmap field is valid. |
|
ANNPOINT_BITMAP |
[0x002] pPointBitmap field is valid. |
|
ANNPOINT_BITMAP_TRANSPARENT |
[0x004] bPointBitmapTransparent field is valid |
|
ANNPOINT_BITMAP_TRANSPARENT_COLOR |
[0x008] crPointBitmapTransparentColor field is valid. |
|
ANNPOINT_RADIUS |
[0x010] nPointRadius field is valid. |
|
ANNPOINT_BORDER_COLOR |
[0x020] crPointBorderColor field is valid. |
|
ANNPOINT_FILL_COLOR |
[0x040] crPointFillColor field is valid. |
|
ANNPOINT_TRANSPARENT_FILL |
[0x080] bPointTransparentFill field is valid. |
|
ANNPOINT_FIXED_SIZE |
[0x100] bPointFixedSize field is valid. |
|
ANNPOINT_ALL |
[0x1ff] All fields are valid. |
bPointUseBitmap |
Flag that indicates whether to draw the point using the current point bitmap or as a circle. Possible values are: |
|
|
Value |
Meaning |
|
TRUE |
Draw the point using the current point bitmap. |
|
FALSE |
Draw the point as a circle. |
pPointBitmap |
Pointer to a BITMAPHANDLE structure that gets or sets the point bitmap. |
|
uBitmapStructSize |
Size of the structure pointed to by pBitmap, for versioning. Use sizeof(BITMAPHANDLE). |
|
bPointBitmapTransparent |
Flag that indicates whether there is a transparent color. Possible values are: |
|
|
Value |
Meaning |
|
TRUE |
If the point is drawn using a bitmap, draw with a transparent color. |
|
FALSE |
If the point is drawn using a bitmap, there is no transparent color. |
crPointBitmapTransparentColor |
If the point is drawn as a bitmap, and bPointBitmapTransparent is TRUE, this specifies the transparent color. |
|
nPointRadius |
If the point is drawn as a circle, this specifies the radius in pixels (assuming no zooming). |
|
crPointBorderColor |
If the point is drawn as a circle, this is the outline color |
|
bPointTransparentFill |
Flag for a point drawn as a circle that indicates whether the inside is transparent or uses the fill color. Possible values are: |
|
|
Value |
Meaning |
|
TRUE |
If the point is drawn as a circle, the inside is transparent. |
|
FALSE |
If the point is drawn as a circle, the fill color is crPointFillColor. |
crPointFillColor |
If the point is drawn as a circle, this is the fill color. |
|
bPointFixedSize |
Flag for a point drawn as a circle that indicates whether the point is a fixed size. Possible values are: |
|
|
Value |
Meaning |
|
TRUE |
If the point is drawn as a circle, the size does not change, regardless of the zoom factor |
|
FALSE |
If the point is drawn as a circle, the size changes with the zoom factor. |
nReserved |
Reserved for future use. Must set this field to zero. |
Comments
When calling LAnnAutomation::GetPointOptions or LAnnPoint::GetPointOptions, the uFlags field identifies which fields to retrieve. When calling LAnnAutomation::SetPointOptions or LAnnPoint::SetPointOptions, the uFlags field identifies which fields to set.
To get the bitmap of the current point object (hObject), do the following:
memset(&PointOptions, 0, sizeof(ANNPOINTOPTIONS));
PointOptions.nSize = sizeof(ANNPOINTOPTIONS);
PointOptions.uFlags = ANNPOINT_BITMAP;
PointOptions. pPointBitmap = &PointBitmap;
LAnnAutomation::GetPointOptions, LAnnPoint::GetPointOptions(hObject, &PointOptions);
If the call to LAnnAutomation::GetPointOptions or LAnnPoint::GetPointOptions is successful, PointBitmap now contains the point bitmap. You must call LBitmapBase::Free(&PointBitmap) when you are finished with the bitmap.
If the point is being drawn using a bitmap, the current default point bitmap is used. This can be changed by making the pPointBitmap field point to a valid LEAD bitmap handle, adding the ANNPOINT_BITMAP flag to the uFlags field, and calling LAnnAutomation::SetPointOptions or LAnnPoint::SetPointOptions.
If bPointBitmapTransparent is TRUE, then the point bitmap is displayed with transparency, where crPointBitmapTransparentColor is the transparent color.
If the point is not being drawn using a bitmap, it is displayed as a circle with the following properties:
Radius is nPointRadius
Outline color is crPointBorderColor
If bPointTransparentFill is TRUE, then the inside of the point is transparent
If bPointTransparentFill is FALSE, then the inside of the point is drawn with color crFillColor
If bPointFixedSize is TRUE, the size of the point remains constant, regardless of the zoom factor
If bPointFixedSize is FALSE, the size of the point changes with the zoom factor