Hide

SftPrintPreview/DLL 2.0 - Print Preview Control for C/C++

Display
Print

SFTPRINTPREVIEW_ZOOM Structure

The SFTPRINTPREVIEW_ZOOM structure is used with the Zoom function to redefine the preview layout.

typedef struct tagSftPrintPreviewZoomParms {
    int pageRow; // (relative) page row number 0..6-1
    int pageCol; // (relative) page col number 0..12-1
    int zoomFactor; // new zoom factor
    double centerPosX, centerPosY; // point on page in inches, to be zoomed or -1.0, -1.0 to center
    int offsetX, offsetY; // center point offset from display center (in pixels)
} SFTPRINTPREVIEW_ZOOM, * LPSFTPRINTPREVIEW_ZOOM;
typedef const SFTPRINTPREVIEW_ZOOM * LPCSFTPRINTPREVIEW_ZOOM;

Members

pageRow

Defines the relative row number of the page to make the current page. pageRow and pageCol indicate relative page numbers, starting at the first page displayed (see SFTPRINTPREVIEW_CONTROL, firstPage member). The number of page rows and columns displayed is defined using the maxPageRows and maxPageCols members of the SFTPRINTPREVIEW_CONTROL structure.

pageCol

Defines the relative column number of the page to make the current page. pageRow and pageCol indicate relative page numbers, starting at the first page displayed (see SFTPRINTPREVIEW_CONTROL, firstPage member). The number of page rows and columns displayed is defined using the maxPageRows and maxPageCols members of the SFTPRINTPREVIEW_CONTROL structure.

zoomFactor

Defines the zoom factor for display of the current page(s). Valid values are 10 - 1000 (percent) and SFTPRINTPREVIEW_ZOOM_FULLPAGE (-1), which cause a single page display at actual size (100% zoom factor). Alternatively, 0 can be specified to display multiple pages. The number of page rows and columns displayed is defined using the maxPageRows and maxPageCols members of the SFTPRINTPREVIEW_CONTROL structure.

centerPosX

Defines the horizontal position (in inches), relative to the top, left corner of the printed/previewed page (in printer dimensions) to be centered if possible. If -1 is specified, the top, left corner of the page is made visible.

centerPosY

Defines the vertical position (in inches), relative to the top, left corner of the printed/previewed page (in printer dimensions) to be centered if possible. If -1 is specified, the top, left corner of the page is made visible.

offsetX

Defines the horizontal offset (in pixels) where the center point (centerPosX, centerPosY) is to be displayed, relative to the center of the display area. Set to 0 to center horizontally.

offsetY

Defines the vertical offset (in pixels) where the center point (centerPosX, centerPosY) is to be displayed, relative to the center of the display area. Set to 0 to center vertically.

Comments

The SFTPRINTPREVIEW_ZOOM structure is used with the Zoom function to redefine the preview layout.

Example

C

SFTPRINTPREVIEW_ZOOM zoom;
memset(&zoom, 0, sizeof(zoom));
zoom.zoomFactor = SFTPRINTPREVIEW_ZOOM_FULLPAGE;
zoom.centerPosX = zoom.centerPosY = 0.0;
zoom.displayX = zoom.displayY = 0;
SftPrintPreview_Zoom(hwndPreview, &zoom);

C++

SFTPRINTPREVIEW_ZOOM zoom;
memset(&zoom, 0, sizeof(zoom));
zoom.zoomFactor = SFTPRINTPREVIEW_ZOOM_FULLPAGE;
zoom.centerPosX = zoom.centerPosY = 0.0;
zoom.displayX = zoom.displayY = 0;
m_Preview.Zoom(&zoom);

See Also C/C++ API | C++ Classes | Notifications


Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.