#include "l_bitmap.h"
L_LTANN_API L_INT L_AnnSetProtractorOptions(hObject, bAcute, uUnit, pszAbbrev, uPrecision, dArcRadius, uFlags)
HANNOBJECT hObject; |
handle to the annotation object |
L_BOOL bAcute; |
flag that indicates which angle to set |
L_UINT uUnit; |
flag that indicates the units of the angle |
L_TCHAR *pszAbbrev; |
address of the character string containing the unit abbreviation string |
L_UINT uPrecision; |
number of digits |
L_DOUBLE dArcRadius; |
length of the arc radius |
L_UINT uFlags; |
flag that determine which objects to process |
Sets various options for a Protractor object.
Parameter | Description | |
hObject | Handle to the annotation object. | |
bAcute | 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. | |
uUnit | 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". | |
pszAbbrev | Character string that contains the abbreviation to be put after the angle. Use NULL to set the default abbreviation for the specified unit. | |
uPrecision | The number of digits after the decimal. ( "." ) Valid values are 0 200. | |
dArcRadius | The arc radius. | |
uFlags | 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. |
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
For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
Win32, x64.
Functions: |
|
Topics: |
|
|
|
|
|
|
|
|
|
|
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;
}
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET