DTWAIN_GetAcquireArea2

Top  Previous  Next

The DTWAIN_GetAcquireArea2 function gets the current image acquisition area.

 

DTWAIN_BOOL DTWAIN_GetAcquireArea2 (

DTWAIN_SOURCE

Source,

LPDTWAIN_FLOAT

lpLeft,

LPDTWAIN_FLOAT

lpTop,

LPDTWAIN_FLOAT

lpRight,

LPDTWAIN_FLOAT

lpBottom,

LPLONG

lpUnit );

 

Parameters

Source

An open TWAIN Source.

 

lpLeft

Indicates upper left of rectangle to acquire.

 

lpTop

Indicates top of rectangle to acquire.

 

lpRight

Indicates right of rectangle to acquire.

 

lpBottom

Indicates bottom of rectangle to acquire.

 

lpUnit

Unit of measure used to describe left, top, right, and bottom of rectangle

 

 

Return Values

The return value is TRUE if successful.  Otherwise FALSE is returned.

 

Comments

The DTWAIN_GetAcquireArea2 function gets the image acquisition area of the Source Source that has been set with DTWAIN_SetAcquireArea2.   The lpLeft, lpTop, lpRight, and lpBottom pointer arguments on return are filled with the left, top, right, and bottom of the area of acquisition.  The lpUnit argument will contain the current unit of measure that DTWAIN_SetAcquireArea2 will use.

 

If there is no current area set by DTWAIN_SetAcquireArea2, a call to DTWAIN_GetAcquireArea2 will set lpTop, lpLeft, lpRight, and lpBottom to

-1.0, and lpUnit is set to -1.  

 

For languages that have difficulties with DTWAIN_FLOAT parameters, the alternate function that can be used as a replacement for DTWAIN_GetAcquireArea2 is DTWAIN_GetAcquireArea2String.

 

TWAIN State Transitions

The Source must be in State 4. or higher (depending on the capability).

 

Prerequisite Function Call(s)

DTWAIN_SysInitialize

 

DTWAIN Source Selection Function

 

 

See Also

Setting / Getting Acquisition Area