NextPrevUpTopContentsIndex

get-page-area

Function
Summary

Calculates the dimensions of suitable rectangles for use with with-page-transform.

Package

capi

Signature

get-page-area printer &key scale dpi screen

Description

The get-page-area function is provided to simplify the calculation of suitable rectangles for use with with-page-transform. It calculates and returns the width and height of the rectangle in the user's coordinate space that corresponds to one printable page, based on the logical resolution of the user's coordinate space in dpi.

For example, if a logical resolution of 72 dpi was specified, this means that each unit in user space would map onto 1/72 of an inch on the printed page, assuming that no scale is specified.

If dpi is nil or unspecified, the logical resolution of the specified screen is used, or the logical resolution of the default screen if no screen is specified. The dpi argument can be a number, or a list of two elements representing the logical resolution of the coordinate spaces in the x and y directions respectively.

If scale is specified the rectangle is calculated so that the image is scaled by this factor when printed. It defaults to 1.0.

See also

printer-metrics
with-page-transform


LispWorks CAPI Reference Manual - 17 Mar 2008

NextPrevUpTopContentsIndex