Function | Package: cg | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version

## draw-text-file

Arguments: stream pathname-or-string &key font left-margin-in-pixels right-margin-in-pixels newline-spacing-in-lines just-return-text-height-p

Draws the contents of the text file identified by pathname-or-string onto stream, which should be a `cg-stream` and is typically a graphical window. Drawing begins at the current y position indented left-margin-in-pixels. The total pixel height of the drawn text is returned.

font specifies the font to use to write the text. Defaults to the font of stream.

left-margin-in-pixels, measured from the left margin, and right-margin-in-pixels, measured from the right margin, bound the drawing of the string. Both default to 0. Note again that the arguments add space in addition to the current margins of stream.

If newline-spacing-in-lines is specified, it should indicate the number of lines to skip when an explicit newline appears in string. The appearance will then differentiate between newlines caused by wrapping and those caused by explicit newlines. The value can be a floating-point number. Defaults to 0.5.

If just-return-text-height-p is specified true, no drawing is done but the height needed for the drawing is calculated and returned.

Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version