Prints the associated class object's bitmap to the specified device. This function does no preprocessing of the image.
#include "ltwrappr.h"
virtual HDC LPrint::PrintFast(hDC=NULL, nX=0, nY=0, nWidth=0, nHeight=0, bEndDoc=TRUE)
Handle to the device context (DC) where the bitmap is to print. The mapping mode of the device context must be MM_TEXT.
X position to start the print. Pass a 0 to center the image horizontally on the page.
Y position to start the print. Pass a 0 to center the image vertically on the page.
The printed width. The value is in dots, and the actual width depends on the dots per inch (DPI) of the printer.
Pass a 0 to let the function calculate the width. If you specify only the width or only the height, the function calculates the remaining dimension. If you pass zeros for both width and height, the function calculates the maximum dimensions that fit on the page while preserving the aspect ratio.
The printed height. The value is in dots, and the actual height depends on the dots per inch (DPI) of the printer.
Pass a 0 to let the function calculate the height. If you specify only the width or only the height, the function calculates the remaining dimension. If you pass zeros for both width and height, the function calculates the maximum dimensions that fit on the page while preserving the aspect ratio.
Flag that indicates to LEADTOOLS whether you plan to print another image on the same page or not. Possible values are:
Value | Meaning |
---|---|
TRUE | LEADTOOLS will free the hDC and send a paper eject. |
FALSE | LEADTOOLS will assume that you plan to print another bitmap. |
Value | Meaning |
---|---|
> 0 | Function was successful. If bEndDOC is FALSE, the return value is the printer HDC. |
0 | An error occurred. |
You can specify the position and dimensions of the printed image, or let the function calculate values for you as follows:
You can specify the X and Y offsets of the image, or you can let the function center the image vertically, horizontally, or both.
You can specify the width, and let the function calculate the height to preserve the aspect ratio.
You can specify the height, and let the function calculate the width to preserve the aspect ratio.
You can let the function calculate the maximum printed width and height, while preserving the aspect ratio.
The function is designed to let you print multiple bitmaps on the same page. To do so, call the function with the fEndDoc argument set to FALSE for each image except the last one on the page. Then call the function with the fEndDoc argument set to TRUE. If you do not set the fEndDoc argument to TRUE on the last call, the hDC will not be freed, and the page will not flush.
If fEndDOC is FALSE, you can use the returned hDC to draw to the current printer page. If your printing more than one page and you passed FALSE for fEndDoc, be sure to call EndPage then StartPage between each call to LPrint::PrintFast.
An alternative for greater flexibility is the LPaint::PaintDC function, which you can use by specifying the printer as the display surface.
For an example, refer to LPrint::Print.
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document