The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....


Declaration:procedure CalcExtentsOfPrint (MapWindow: TRect; Scale: integer; var Width, Height: integer);

The method CalcExtentsOfPrint calculates the extents of a printout (in logical units of the currently open printer). The range of the map area to be printed is specified by the parameter MapWindow (coordinates in pixels of the map image). The parameter Scale specifies the scale of the printed map (e.g. a value of 20000 meaning a scale of 1:20000). The variable parameters Width and Height return the width and the height of the printed map (in logical printer units).

Hint: The method CalcExtentsOfPrint requires the printer to be open before calling it. Use the procedure TPrinter.BeginDoc (see Delphi manual for more information) to open the printer.

Last Update: 2012-Oct-20