Generic FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version

top-margin

Arguments: graphical-stream &optional (stream-units-p t)

Returns the current top margin of a graphical-stream, measured from the top edge of the stream. The top-margin is initially zero, except as noted below. (setf top-margin) may be called to set the margin at any time.

If stream-units-p is true, as it is by default, then the margin is measured in pixels. If nil, it is measured in text line heights (see line-height).

Margin attributes are provided primarily to allow an application to keep a drawing within arbitrary margins by drawing everything within the coordinates returned by left-margin, top-margin, right-margin, and bottom-margin. Common Graphics also uses them in a few special ways, though, as described below.

When opening a printer stream or calling new-page to advance to the next printed page, the current-position-x of the stream is set to its left-margin, and the current-position-y is set to its top-margin.

A printer stream's coordinate system has position (0, 0) at the printer-physical-offset of the printer. To allow an application to avoid dealing with this arbitrary offset, Common Graphics sets the margins of a printer stream to the distance from the physical offset to the margins selected by the user in the print job dialog or page setup dialog. This allows the application to maintain the requested paper margins by simply drawing everything within the four margins that were set up automatically. See *default-printer-left-margin* for more information.


Copyright (c) 1998-2016, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.1 page.
Created 2010.1.21.

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