#include "ltwrappr.h"
virtual L_INT LAnnProtractor::GetDistance(pdDistance, pdDistance2)
L_DOUBLE *pdDistance; |
address of the variable that will be updated with the distance of a ruler object |
L_DOUBLE *pdDistance2; |
address of the variable that will be updated with the distance of a ruler object |
Gets the distance of the rulers in the object's unit of measurement, set by LAnnProtractor::SetProtractorOptions.
Parameter |
Description |
pdDistance |
Address of the variable to be updated with the distance of the primary ruler. Since protractors have two rulers, this variable will be updated with the length of the primary ruler. |
pdDistance2 |
Address of the variable to be updated with the distance of the secondary ruler. Since protractors have two rulers, this variable will be updated with the length of the secondary ruler. |
Either pdDistance or pdDistance2 can be NULL, but not both. If either of these pointers is NULL, the distance for that ruler will not be retrieved.
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Required DLLs and Libraries
LTANN 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: |
Class Members, LAnnAutomation::GetTicMarkLength, LAnnAutomation::SetTicMarkLength |
Topics: |
|
|
|
|
|
|
L_INT LAnnProtractor_GetDistanceExample(HWND hWnd){LBitmap MyBitmap;RECT rect;LAnnProtractor MyAnnProtractor;ANNPOINT MyPts[3] = {40,40,140,40,140,140};pANNPOINT pMyPts = MyPts;MyAnnProtractor.SetPoints(pMyPts, 3);//Change protractor optionsL_BOOL bAcute;MyAnnProtractor.GetProtractorOptions(&bAcute);MyAnnProtractor.SetProtractorOptions(bAcute, //keep unchangedANNANGLE_DEGREES,TEXT("units"),4, //precision60, //arc radius0);L_DOUBLE dAngle;L_TCHAR szTemp[100];MyAnnProtractor.GetAngle(&dAngle);wsprintf(szTemp, TEXT("Angle %d"), (int)dAngle);AfxMessageBox(szTemp);L_UINT uShowFlags;MyAnnProtractor.GetShowFlags(&uShowFlags);MyAnnProtractor.SetShowFlags(ANNSHOW_LENGTH,0);//Get DistancesL_DOUBLE dDist1=0, dDist2=0;dDist1 = 0; dDist2=0; MyAnnProtractor.GetDistance(&dDist1, &dDist2);//Set Protractor propertiesMyAnnProtractor.SetVisible(TRUE);MyAnnProtractor.GetBoundingRect(&rect);HDC hDC = ::GetDC(hWnd);MyAnnProtractor.Draw(hDC,&rect);::ReleaseDC(hWnd, hDC);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
