L_DocSetPaintZoomFactor

#include "ltdoc.h"

L_INT EXT_FUNCTION L_DocSetPaintZoomFactor (hDoc, nPageIndex, fZoomFactor)

L_HDOC hDoc;

/* handle to the OCR document. */

L_INT nPageIndex;

/* page index */

L_FLOAT fZoomFactor;

/* zoom factor */

Sets the zoom factor used to draw the specified OCR page.

Parameter

Description

hDoc

Handle to the OCR document.

nPageIndex

Specifies the index of the page for which to set the zoom factor. This index is zero-based.

fZoomFactor

Specifies the zoom factor used when drawing the specified OCR page. A value of 100 represents normal display; a value of 200 represents a 2X display; a value of 50 represents a 1/2X display; etc.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

The page specified in the nPageIndex may or may not have zones. If the page has zones, the zones will be drawn using the zoom factor too.

To draw the specified page, using the specified zoom factor, call L_DocDrawPage.

To get the zoom factor of a specific page, call L_DocGetPaintZoomFactor.

Required DLLs and Libraries

LTDOC

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

L_DocGetPaintZoomFactor, L_DocRecognize, L_DocDrawPage, L_DocLockPage, L_DocUnlockPage, L_DocSetActivePage, L_DocSelectZoneByPoint, L_DocSelectZone, L_DocRemoveSelectedZone, L_DocSetZonePen, L_DocSetSelectedZonePen, L_DocGetSelectedZone, L_DocZone

Topics:

Drawing Pages and Zones

 

OCR Functions: Drawing Zones and Pages

Example

void TestDrawing(L_HDOC hDoc, HWND hWnd)
{
   HDC hdc = NULL;
   PAGEINFO PageInfo;
   RECT rcDst;
   L_FLOAT fZoom;

   memset(&PageInfo, 0, sizeof(PAGEINFO));
   hdc = GetDC(hWnd);

   L_DocSetActivePage(hDoc, 0);

   L_DocGetPaintZoomFactor(hDoc, 0, &fZoom);
   if (fZoom != 100.0)
      L_DocSetPaintZoomFactor(hDoc, 0, 100);

   L_DocGetPageInfo (hDoc, 0, &PageInfo, sizeof(PAGEINFO));
   SetRect(&rcDst, 0, 0, PageInfo.nWidth, PageInfo.nHeight);

   L_DocDrawPage(hDoc, hdc, 0, NULL, NULL, &rcDst, NULL, SRCCOPY, TRUE);
   ReleaseDC(hWnd, hdc);
}