#include <Fl_Native_Printer.H>
Public Member Functions | |
| Fl_Native_Printer (void) | |
| The constructor. | |
| int | startjob (int pagecount, int *frompage=NULL, int *topage=NULL) |
| Starts a print job. | |
| int | startpage (void) |
| Starts a new printed page. | |
| int | getprintablerect (int *x, int *y, int *w, int *h) |
| Computes the origin and size of the printable area of the page. | |
| void | setorigin (int x, int y) |
| Sets the position in page coordinates of the origin of graphics functions. | |
| void | rescale (float scale_x, float scale_y) |
| Changes the scaling of page coordinates. | |
| int | endpage (void) |
| To be called at the end of each page. | |
| void | endjob (void) |
| To be called at the end of a print job. | |
This class provides an OS-independent interface to printing under MSWindows and Mac OS X only. It allows to use all FLTK drawing, color, text, and clip functions, and to have them operate on printed page(s).
| int Fl_Native_Printer::endpage | ( | void | ) |
To be called at the end of each page.
| int Fl_Native_Printer::getprintablerect | ( | int * | x, | |
| int * | y, | |||
| int * | w, | |||
| int * | h | |||
| ) |
Computes the origin and size of the printable area of the page.
Values are in the same unit as that used by FLTK drawing functions, are unchanged by calls to setorigin(), but are changed by rescale() calls.
| void Fl_Native_Printer::rescale | ( | float | scale_x, | |
| float | scale_y | |||
| ) |
Changes the scaling of page coordinates.
Use next getprintablerect() to get the new coordinates of the printable page area. Successive rescale() calls don't cumulate their effects.
| scale_x | Horizontal dimensions of plot are multiplied by this quantity | |
| scale_y | Vertical dimensions of plot are multiplied by this quantity |
| int Fl_Native_Printer::startjob | ( | int | pagecount, | |
| int * | frompage = NULL, |
|||
| int * | topage = NULL | |||
| ) |
Starts a print job.
| [in] | pagecount | the total number of pages of the job |
| [out] | frompage | if non-null, *frompage is set to the first page the user wants printed |
| [out] | topage | if non-null, *topage is set to the last page the user wants printed |
| int Fl_Native_Printer::startpage | ( | void | ) |
Starts a new printed page.
The page coordinates are initially in points, i.e., 1/72 inch, and with origin at the top left of the page or of the printable page area.
1.5.9