Copying between output windows.
copy_rectangle copies all pixels from the specified window with the logical window number SourceWindow in the current output window. It copies pixels which reside inside a rectangle which is specified by parameters Row1, Column1, Row2 and Column2. The target position is specified through the upper left corner of the rectangle (DestRow, DestColumn).
If you want to move more than one rectangle, you may pass them at once (in form of the tupel mode). If the specified window is not already active yet, you may activate it by set_window.
You may use copy_rectangle to copy edited graphics from an "invisible" window in a visible window. Therefore a window with the option 'buffer' is opened. The graphics is then displayed in this window and is copied in a visible window afterwards. The advantage of this strategy is, that copy_rectangle is much more rapid than output procedures as e.g. disp_grey. This means a particular advantage while using demo programs. You may even realise short "clips" herewith: therefore you have to create for every image of a sequence a window of a 'buffer' type and pass the data onto it. Output is then the image sequence. This will be achieved in copying all buffers one after another in a visible window.
Both windows have to reside on the same computer.
SourceWindow (input_control) |
window.id -> integer |
Number of the source window. |
Row1 (input_control) |
rectangle.origin.y(-array) -> integer |
Row index of upper left corner in the source window. | |
Default value: 0 | |
Range of values: 0 <= Row1 <= 511 (lin) | |
Minimum increment: 1 | |
Recommended increment: 1 |
Column1 (input_control) |
rectangle.origin.x(-array) -> integer |
Column index of upper left corner in the source window. | |
Default value: 0 | |
Range of values: 0 <= Column1 <= 511 (lin) | |
Minimum increment: 1 | |
Recommended increment: 1 |
Row2 (input_control) |
rectangle.corner.y(-array) -> integer |
Row index of lower right corner in the source window. | |
Default value: 128 | |
Range of values: 0 <= Row2 <= 511 (lin) | |
Minimum increment: 1 | |
Recommended increment: 1 | |
Restriction: Row2 >= Row1 |
Column2 (input_control) |
rectangle.corner.x(-array) -> integer |
Column index of lower right corner in the source window. | |
Default value: 128 | |
Range of values: 0 <= Column2 <= 511 (lin) | |
Minimum increment: 1 | |
Recommended increment: 1 | |
Restriction: Column2 >= Column1 |
DestRow (input_control) |
point.y(-array) -> integer |
Row index of upper left corner in the target window. | |
Default value: 0 | |
Range of values: 0 <= DestRow <= 511 (lin) | |
Minimum increment: 1 | |
Recommended increment: 1 |
DestColumn (input_control) |
point.x(-array) -> integer |
Column index of upper left corner in the target window. | |
Default value: 0 | |
Range of values: 0 <= DestColumn <= 511 (lin) | |
Minimum increment: 1 | |
Recommended increment: 1 |
read_image(Image,"affe") ; open_window(0,0,-1,-1,"root","buffer","") ; get_window(&BufferID) ; disp_image(Image) ; open_window(0,0,-1,-1,"root","visible","") ; do{ get_mbutton(&Row,&Column,&Button) ; copy_rectangle(BufferID,20,90,120,390,Row,Column) ; } while(Button > 1) ; close_window() ; set_window(BufferID) ; close_window() ; clear(Image) ;
If one ouputwindow exists and if the specified parameters are correct, then close_window returns TRUE. If necessary an exception is raised.
open_window, open_textwindow, set_window
set_window, open_window, open_textwindow