#include "l_bitmap.h"
L_LTANN_API L_INT L_AnnSetProtractorOptions(hObject, bAcute, uUnit, pszAbbrev, uPrecision, dArcRadius, uFlags)
Sets various options for a Protractor object.
Handle to the annotation object.
Flag that indicates whether to draw the inside (acute or <180 degrees) angle or the outside (obtuse or >180 degrees) angle of the protractor. Possible values are:
Value | Meaning |
---|---|
TRUE | Draw the inside (acute) angle of the protractor. |
FALSE | Draw the outside (obtuse) angle of the protractor. |
Flag that indicates the units of the angle. Possible values are:
Value | Meaning |
---|---|
ANNANGLE_DEGREES | Measure the angle in degrees. The default abbreviation for this unit is the degree sign. |
ANNANGLE_RADIANS | Measure the angle in radians. The default abbreviation for this unit is "rad". |
Character string that contains the abbreviation to be put after the angle. Use NULL to set the default abbreviation for the specified unit.
The number of digits after the decimal. ( "." ) Valid values are 0 200.
The arc radius.
Flags that determine which objects to process. Most of the flags apply only to container objects. You can combine values when appropriate by using a bitwise OR ( | ). The following are valid values:
Value | Meaning |
---|---|
0 | Process only the specified object. |
ANNFLAG_SELECTED | [0x0001] Process only objects that have the selected property set to TRUE. For getting and setting the selected property, use the L_AnnGetSelected and L_AnnSetSelected functions. |
ANNFLAG_NOTTHIS | [0x0004] Process only one level of objects within the specified container, not the container itself. If there are containers within the container, they are modified, but the objects within them are not. |
ANNFLAG_RECURSE | [0x0008] Process objects within a container, and within any subcontainers, down to any level. |
ANNFLAG_NOTCONTAINER | [0x0002] (Used with ANNFLAG_RECURSE) Process objects within containers, not the containers themselves. |
ANNFLAG_NOINVALIDATE | [0x0010] Do not invalidate the affected rectangle in the window. Use this to avoid generating unwanted paint messages. |
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
Note: This function can be called for Container objects, allowing you to change Protractor objects within the container. The objects to change are determined by the settings in uFlags
.
Required DLLs and Libraries
Win32, x64.
L_INT EXT_CALLBACK ProtractorOptionsAnnEnumCallback(HANNOBJECT hObject,
L_VOID* pUserData)
{
UNREFERENCED_PARAMETER(pUserData);
L_UINT Type, Unit;
L_BOOL Acute;
L_DOUBLE Radius;
L_AnnGetType(hObject, &Type);
switch(Type)
{
case ANNOBJECT_PROTRACTOR:
L_AnnGetProtractorOptions(hObject, &Acute, &Unit, NULL, NULL, NULL, &Radius);
if (Acute == TRUE)
Acute = FALSE;
else
Acute = TRUE;
if (Unit == ANNANGLE_DEGREES)
Unit = ANNANGLE_RADIANS;
else
Unit = ANNANGLE_DEGREES;
if (Radius >= 25)
Radius = 10;
else
Radius = 25;
L_AnnSetProtractorOptions(hObject, Acute, Unit, NULL, 2, Radius, 0);
break;
default:
MessageBox(NULL, TEXT("This object is not a protractor."), TEXT("Notice"), MB_OK);
}
return SUCCESS;
}
L_INT AnnSetProtractorOptionsExample(HANNOBJECT hContainer)
{
L_INT nRet;
nRet = L_AnnEnumerate(hContainer, (ANNENUMCALLBACK) ProtractorOptionsAnnEnumCallback, NULL, ANNFLAG_RECURSE|ANNFLAG_SELECTED, NULL);
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