Silverfrost Logo About Us | Contact Us
 

PRINT_GRAPHICS@

Platform

Win32, x64

Purpose

To simplify the process of printing graphics.

Syntax

INTEGER FUNCTION PRINT_GRAPHICS@(CB)
INTEGER FUNCTION CB()

Description

PRINT_GRAPHICS@ takes one argument which is a user-defined callback function. It calls OPEN_PRINTER@ in order to display the standard open printer dialog, then it calls the callback function and then CLOSE_PRINTER@. For example, PRINT_GRAPHICS@ can be used together with a callback function that uses %pl - SIMPLEPLOT Graphics Region[external] in order to print a graph. When the callback draws directly to the graphics object (using routines such as DRAW_LINE_BETWEEN@), a call to AUTO_SCALE_FONT@() will automatically scale the font to a reasonable size for the printer resolution. Otherwise CLEARWIN_INFO@ (with "GRAPHICS_WIDTH" and "GRAPHICS_DEPTH") can be called in order to get the pixel width and height and to assign a suitable scaling factor in a call to SCALE_FONT@.

PRINT_GRAPHICS@ automatically sets the default line width (see SET_LINE_WIDTH@) to a value that is reasonable for the printer resolution. It returns zero if CANCEL is selected from the open printer dialog. Otherwise it returns the value returned by the callback function.

Notes

Introduced with FTN95 8.30.

See also AUTO_SCALE_FONT@

 

 

Copyright © 1999-2018 Silverfrost Limited