Print

ImagePrint, PrintPage

ImagePrint

This function runs the File > Print command.

Description 

 ImagePrint();

This function displays the Print dialog box.

PrintPage

Description 

 PrintPage(
   int  pageflags,
   int  pictype,
   int  sourcex,
   int  sourcey,
   int  sourcew,
   int  sourceh,
   int  destx,
   int  desty,
   int  destw,
   int  desth,
   int  numcopies,
   double  poimratio
);

This function prints picture to the printer selected in the Print Image dialog. Setting sourcex, sourcey, sourcew and sourceh all to 0 causes printing the whole current picture. Set destx (resp. desty) to -1 to center the picture on page horizontally (resp. vertically). Set destw to 0 to maximize the printout. Set desth to 0 to keep the aspect ratio. The PoImRatio parameter is ignored when set to 0 or less.

Parameters

int pageflags

Page Flags

0

Continue printing started page.

1

Start printing new page without sending to printer.

2

Send started page to the printer after printing picture.

3

Start page, print picture, send page (default).

int pictype

Type of printed picture.

0

Prints current binary picture.

1

Prints current color/gray picture.

int sourcex

Offset to left edge of printed picture (in pixels).

int sourcey

Offset to top edge of printed picture (in pixels).

int sourcew

Width of printed picture (in pixels).

int sourceh

Height of printed picture (in pixels).

int destx

Offset to left edge of picture on the page (in mm).

int desty

Offset to top edge of picture on the page (in mm).

int destw

Width of printed picture in mm.

int desth

Height of printed picture in mm.

int numcopies

Number of copies.

double poimratio

Printout/Image Ratio.