Generic 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

## nget-shape-box

Arguments: window-or-screen old-box draw-fn erase-fn &optional scroll-p cursor first-corner

A destructive version of get-shape-box. The old-box argument is modified to be the box chosen by the user and then returned. Like get-shape-box, this function waits for the user to press a mouse button to establish one corner of the desired box and then, after moving the mouse about, unpressing it to establish the other corner. old-box is set to the resulting box and returned.

window-or-screen should be a window or the screen. The screen is the value returned by `(screen *system*)`. See screen and `*system*`.

draw-fn should be a function object or a symbol naming a function, as should erase-fn. draw-fn is called each time the shape is to be drawn and erase-fn is called each time it is to be erased. draw-fn and erase-fn each have two arguments: the window-or-screen and the current box. When they are called, the stream brush will be set to one pixel-width black, the stream paint operation to `po-xor`. Thus, drawing the shape twice will suffice.

As the mouse moves about, candidate boxes are drawn and erased using draw-fn and erase-fn.

If scroll-p is true, the window identified by window-or-screen will be scrolled if the cursor moves outside it. Sets the stream cursor to cursor while running. If the cursor argument is t, a stream default is used (typically the cross-hair cursor).

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