VariablePackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.1
Unrevised from 8.0 to 8.1.
8.0 version

*default-printer-left-margin*

The value of this variable is an integer that determines the initial left-margin property of any printer stream that is opened. Its units are one-thousandths of an inch, and so the initial value of 500 indicates a default margin of half an inch. (This arbitrary resolution is used because the variable is independent of any particular printer that would have a particular resolution.)

If the Page Setup dialog is invoked by calling pop-up-printer-setup-dialog, the value of this variable is modified afterwards to reflect the left margin value that the user specified on this dialog (if they do not cancel). An application may also set this variable directly if it knows what printer margins it plans to use.

When a printer stream is opened, Common Graphics sets its left-margin property to the x coordinate at which an application should draw in order to draw at the margin indicated by *default-printer-left-margin*. This left-margin number is different from **default-printer-left-margin*, though, for a couple of reasons. First, the left-margin property is in the stream units of the stream, which an application uses to draw on a stream, rather than the arbitrary one-thousandths of an inch of *default-printer-left-margin*. Second, a printer has a "hardware margin" outside of which it cannot draw.

For a laser printer, the hardware margin is typically about a quarter of an inch. When an application draws at position 0,0 it is actually drawing at the top-left hardware margin. An application can find these hardware margins by calling printer-physical-offset and printer-physical-size, and can compute its own margins from that, but in most cases it is easier to let Common Graphics set up the margins for you, assuming that *default-printer-left-margin* and the other default margin variables are set up as desired. Common Graphics computes the initial left-margin for a printer stream by scaling *default-printer-left-margin* into the stream units of the printer stream and then subtracting the hardware left margin. An application then simply needs to check the margin properties of the printer stream to find the range of coordinates into which it should fit its drawing.

See also left-margin, top-margin, right-margin, bottom-margin, *default-printer-top-margin*, *default-printer-right-margin*, and *default-printer-bottom-margin*.


Copyright (c) 1998-2009, Franz Inc. Oakland, CA., USA. All rights reserved.
Documentation for Allegro CL version 8.1. This page was not revised from the 8.0 page.
Created 2009.7.29.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.1
Unrevised from 8.0 to 8.1.
8.0 version