drag_region1π
Short descriptionπ
drag_region1 β Interactive moving of a region.
Warningπ
This operator does not work in an HDevelop graphics window opened with
dev_open_window.
Signatureπ
drag_region1( region SourceRegion, out region DestinationRegion, window WindowHandle )
Descriptionπ
drag_region1 is used to move a region on the display by mouse.
Calling drag_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 drag_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.
The operator affine_trans_image moves the gray values.
Attentionπ
Gray values of regions are not moved. With moving the input region it is not sure whether the gray values of the output regions are filled reasonable. This may occur if the gray values of the input regions do not comprise the whole image.
Execution informationπ
Execution information
-
Multithreading type: reentrant (runs in parallel with non-exclusive operators).
-
Multithreading scope: global (may be called from any thread).
-
Processed without parallelization.
Parametersπ
SourceRegion (input_object) region-array β object
Regions to move.
DestinationRegion (output_object) region-array β object
Moved Regions.
WindowHandle (input_control) window β (handle)
Window handle.
Exampleπ
(HDevelop)
draw_region(Obj,WindowHandle)
dev_set_color ('green')
drag_region1(Obj,New,WindowHandle)
dev_display(New)
get_region_runs (Obj, Rows1, ColumnBegins1, ColumnEnds1)
get_region_runs (New, Rows2, ColumnBegins2, ColumnEnds2)
Row1 := Rows1[0]
Column1 := ColumnBegins1[0]
Row2 := Rows2[0]
Column2 := ColumnBegins2[0]
dev_set_color ('white')
gen_arrow_contour_xld (Arrow, Row1,Column1,Row2,Column2, 5, 5)
dev_display (Arrow)
(C)draw_region(&Obj,WindowHandle)\;
drag_region1(Obj,&New,WindowHandle)\;
disp_region(New,WindowHandle)\;
Resultπ
drag_region1 returns 2 (H_MSG_TRUE) if a region is entered and the window
is valid.
The clipping according to the global image size is set via the
operator set_system('clip_region',<'true'/'false'>).
If necessary, an exception is raised.
You may determine the behavior after an empty input with
set_system(::'no_object_result',<Result>:).
Combinations with other operatorsπ
Combinations
Possible predecessors
Possible successors
reduce_domain, disp_region, set_colored, set_line_width, set_draw
Alternatives
See also
Moduleπ
Foundation