PrintBitmap

Description

Writes a bitmap at the specified location on the current page.

Syntax

PrintBitmap ( printjobnumber, bitmap, x, y, width, height )

Argument

Description

printjobnumber

The number the PrintOpen function assigned to the print job.

bitmap

A string whose value is the file name of the bitmap image.

x

An integer whose value is the x coordinate (in thousandths of an inch) on the page of the bitmap image.

y

An integer whose value is the y coordinate (in thousandths of an inch) on the page of the bitmap image.

width

The integer width of the bitmap image in thousandths of an inch. If width is 0, PowerBuilder uses the original width of the image.

height

The integer height of the bitmap image in thousandths of an inch. If height is 0, PowerBuilder uses the original height of the image.


Return value

Integer. Returns 1 if it succeeds and -1 if an error occurs. If any argument's value is null, PrintBitmap returns null.

Usage

PrintBitmap does not change the position of the print cursor, which remains where it was before the function was called. In general, print functions in which you specify coordinates do not affect the print cursor (see the functions listed in See also).

Examples

These statements define a new blank page and then print the bitmap in file d:\PB\BITMAP1.BMP in its original size at location 50,100:

long Job
 
// Define a new blank page.
Job = PrintOpen( )
 
// Print the bitmap in its original size.
PrintBitmap(Job, "d:\PB\BITMAP1.BMP", 50,100, 0,0)
// Send the page to the printer and close Job.
PrintClose(Job)

See also

PrintClose

PrintLine

PrintRect

PrintRoundRect

PrintOval

PrintOpen