move_region1 ( SourceRegion : DestinationRegion : : )

Interactive moving of a region.

move_region1 is used to move a region on the display by mouse. Calling move_region1 turns the region visible as soon as the left mouse button is pressed. Therefore the region's edges are displayed only. As representation mode the mode 'not' (see set_draw) is used during procedure's permanence. During the movement the cursor resides in the region's barycenter. If you move the mouse with pressed left mouse button, the depicted region follows - delayed - this movement. If you press the right mouse button you terminate move_region1. The depicted region disappears from the display. Output is a region which corresponds to the last position on the display. You may pass even several regions at once. Procedure image_transform__ moves the grey values.


Attention

Grey values of regions are not moved. As the inputregion is moved it is not sure whether the grey values of the output regions are filled reasonable. This may occur if the grey values of the input regions do not comprise the whole image.


Parameters

SourceRegion (input_object)
region-array -> object
Regions to move.

DestinationRegion (output_object)
region-array -> object
Moved Regions.


Example
draw_region(:Obj::) >
move_region1(Obj:New::) >
disp_region(New:::) >
position(Obj:::_,Row1,Column1,_,_,_,_) >
position(New:::_,Row2,Column2,_,_,_,_) >
disp_arrow(::Row1,Column1,Row2,Column2,1.0:) >
fwrite_string(::['Transformation: (',Row2-Row1,',',Column2-Column1,')']:) >
fnew_line(:::).

Result

move_region1 returns TRUE, if a region is entered, if a window is activated and if the needed drawing mode (see set_insert) is available. If necessary an exception is raised. You may determine the behavior after an empty input with set_system(::'no_object_result',<Result>:).


Possible Predecessors

open_window, set_window


Possible Successors

reduce_domain, disp_region, set_colored, set_line_width, set_draw, set_insert


Alternatives

get_mposition, move


See also

set_insert, set_draw, image_scale, image_transform__



Copyright © 1996-1997 MVTec Software GmbH