L_AnnGetScalarX

#include "l_bitmap.h"

L_INT EXT_FUNCTION L_AnnGetScalarX(hObject, pdScalarX)

HANNOBJECT hObject;

/* handle to the annotation object */

L_DOUBLE L_FAR * pdScalarX;

/* address of the variable to be updated */

Gets the horizontal scaling factor that is applied to the annotation object. Typically, the scaling factors are applied to a root container so that the annotations will match the displayed image. This function is available in the Document/Medical Toolkits.

Parameter

Description

hObject

Handle to the annotation object.

pdScalarX

Address of the variable to be updated with the horizontal scaling factor.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

Offset values, which are set by the L_AnnSetOffsetX and L_AnnSetOffsetY functions, are applied after the scalar properties. For more information, refer to Low-Level Coordinate System for Annotations.

Before calling this function, you must declare a variable of data type L_DOUBLE. Then, pass the address of the variable in the pdScalarX parameter. This function will update the variable with the horizontal scaling factor.

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.

Platforms

Windows 95 / 98 / Me, Windows 2000 / XP.

See Also

Functions:

L_AnnSetScalarX, L_AnnSetScalarY, L_AnnGetScalarY, L_AnnSetOffsetX, L_AnnSetOffsetY, L_AnnGetOffsetX, L_AnnGetOffsetY, L_AnnGetFixed, L_AnnSetFixed, L_AnnPushFixedState, L_AnnPopFixedState, L_AnnIsFixedInRect

Topics:

Annotation Functions: Getting and Setting Geometric Properties

 

Low-Level Coordinate System for Annotations

 

Implementing an Automated Annotation Program

 

Implementing a Non-automated Annotation Program

 

Fixed Annotations

 

Minimizing Flicker with Double Buffering

 

Obtaining Annotation Object Information

Example

/* This example displays the current annotation scalars as percentages */
HANNOBJECT hContainer; /* Container annotation object */
void TestAnnGetScalars(void)
{
   int XPercent, YPercent; /* X and Y scale percentage */
   L_DOUBLE XScalar, YScalar; /* X and Y floating point scalars */
   L_TCHAR szMessage[80]; /* Message buffer */
   /* Get the floating point scalars */
   L_AnnGetScalarX(hContainer, &XScalar);
   L_AnnGetScalarY(hContainer, &YScalar);
   /* Convert the scalars to percentages */
   XPercent = (int)(XScalar * 100);
   YPercent = (int)(YScalar * 100);
   /* Display the percentages in a message */
   wsprintf (szMessage, TEXT("%d percent X and %d percent Y"), XPercent, YPercent);
   MessageBox (NULL, szMessage, TEXT("Notice"), MB_OK);
   return;
}