Generic FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version

nget-shape-line

Arguments: window-or-screen start-position old-position draw-fn erase-fn &optional scroll-p cursor

A destructive version of get-shape-line. The old-position argument is modified to be the endpoint position chosen by the user and then returned. Like get-shape-line, this function waits as the user moves the mouse about to establish the second endpoint (the first is start-position and cannot be modified by the user) of the desired line. When the user presses a mouse button to establish the endpoint, old-position is set to that position and returned. old-position must be a position (see make-position).

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 line is to be drawn and erase-fn is called each time it is to be erased. The draw-fn and erase-fn should each take three arguments: the window-or-screen, the start-position, and the mouse-cursor position. 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 lines 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.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version