Gets the options for the specified point annotation object.
#include "ltwrappr.h"
virtual L_INT LAnnPoint::GetPointOptions(pPointOptions, uStructSize)
Pointer to an ANNPOINTOPTIONS structure to be updated with the various point appearance options for the specified annotation object.
Size in bytes, of the structure pointed to by pPointOptions. Use sizeof(ANNPOINTOPTIONS).
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
Use this function to get the point appearance options of an annotation point object. To use this function, declare a variable of type ANNPOINTOPTIONS, and pass the address of this variable as the second argument. For more information, refer to ANNPOINTOPTIONS.
Win32, x64.
This example toggles the appearance of a point annotation object.
The appearance toggles between bitmap and circle.
L_INT LAnnPoint_GetPointOptionsExample(LAnnPoint *pLPoint)
{
L_INT nRet;
HMETAFILE hMetafile1=0;
HMETAFILE hMetafile2=0;
ANNPOINTOPTIONS PointOptions;
L_UINT uObjectType;
UNREFERENCED_PARAMETER(hMetafile1);
UNREFERENCED_PARAMETER(hMetafile2);
uObjectType = pLPoint->GetType ();
if (uObjectType != ANNOBJECT_POINT)
{
MessageBox(NULL, TEXT("This object is not a point object."), TEXT("Error"), MB_OK);
return FAILURE ;
}
memset(&PointOptions, 0, sizeof(ANNPOINTOPTIONS));
PointOptions.uStructSize = sizeof(ANNPOINTOPTIONS);
PointOptions.uFlags = ANNPOINT_ALL;
pLPoint->GetPointOptions(&PointOptions, sizeof(PointOptions));
if (PointOptions.bPointUseBitmap)
{
// Change point appearance to a circle
PointOptions.uStructSize = sizeof(ANNPOINTOPTIONS);
PointOptions.bPointUseBitmap = FALSE;
PointOptions.bPointFixedSize = FALSE;
PointOptions.bPointTransparentFill = FALSE;
PointOptions.crPointBorderColor = RGB(0,0,0);
PointOptions.crPointFillColor = RGB(255, 255, 0);
PointOptions.nPointRadius = 12;
PointOptions.nReserved = 0;
PointOptions.uFlags = ANNPOINT_USE_BITMAP |
ANNPOINT_RADIUS |
ANNPOINT_BORDER_COLOR |
ANNPOINT_FILL_COLOR |
ANNPOINT_TRANSPARENT_FILL |
ANNPOINT_FIXED_SIZE;
}
else
{
// Change point appearance to a bitmap
PointOptions.uStructSize = sizeof(ANNPOINTOPTIONS);
PointOptions.bPointUseBitmap = TRUE;
PointOptions.bPointBitmapTransparent = TRUE;
PointOptions.crPointBitmapTransparentColor = RGB(255,255,255);
PointOptions.nReserved = 0;
}
nRet = pLPoint->SetPointOptions(&PointOptions, 0);
if(nRet != SUCCESS)
return nRet;
return SUCCESS;
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document