Macro | Package: cg | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version

## restoring-graphics-context

Arguments: (stream) &body body

Calls copy-graphics-context to save the current drawing style options of stream, then executes the body, and then calls set-graphics-context to restore the saved drawing style options. stream should be a `cg-stream`.

This allows the body code to arbitrarily set temporary drawing style options without explicitly setting each one back afterward. An unwind-protect is used to ensure that the final call to set-graphics-context is always performed (as long as the call to copy-graphics-context was completed successfully). Returns the values returned by the body.

See copy-graphics-context (where all the information in a graphics-context object is described), make-graphics-context, set-graphics-context, and graphics-context-p.

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

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version