ClassesClasses | | Operators

drag_region1drag_region1DragRegion1DragRegion1 (Operator)

Name

drag_region1drag_region1DragRegion1DragRegion1 — Interactive moving of a region.

Signature

drag_region1(SourceRegion : DestinationRegion : WindowHandle : )

Herror drag_region1(const Hobject SourceRegion, Hobject* DestinationRegion, const Hlong WindowHandle)

Herror T_drag_region1(const Hobject SourceRegion, Hobject* DestinationRegion, const Htuple WindowHandle)

void DragRegion1(const HObject& SourceRegion, HObject* DestinationRegion, const HTuple& WindowHandle)

HRegion HRegion::DragRegion1(const HWindow& WindowHandle) const

HRegion HWindow::DragRegion1(const HRegion& SourceRegion) const

static void HOperatorSet.DragRegion1(HObject sourceRegion, out HObject destinationRegion, HTuple windowHandle)

HRegion HRegion.DragRegion1(HWindow windowHandle)

HRegion HWindow.DragRegion1(HRegion sourceRegion)

Description

drag_region1drag_region1DragRegion1DragRegion1DragRegion1 is used to move a region on the display by mouse. Calling drag_region1drag_region1DragRegion1DragRegion1DragRegion1 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_drawset_drawSetDrawSetDrawSetDraw) 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_region1drag_region1DragRegion1DragRegion1DragRegion1. On macOS drag_region1drag_region1DragRegion1DragRegion1DragRegion1 can also be terminated by pressing the escape key. 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_imageaffine_trans_imageAffineTransImageAffineTransImageAffineTransImage 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

Parameters

SourceRegionSourceRegionSourceRegionSourceRegionsourceRegion (input_object)  region-array objectHRegionHRegionHobject

Regions to move.

DestinationRegionDestinationRegionDestinationRegionDestinationRegiondestinationRegion (output_object)  region-array objectHRegionHRegionHobject *

Moved Regions.

WindowHandleWindowHandleWindowHandleWindowHandlewindowHandle (input_control)  window HWindow, HTupleHTupleHtuple (integer) (IntPtr) (Hlong) (Hlong)

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)

Example (C)

draw_region(&Obj,WindowHandle) ;
drag_region1(Obj,&New,WindowHandle) ;
disp_region(New,WindowHandle) ;

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)

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)

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)

Result

drag_region1drag_region1DragRegion1DragRegion1DragRegion1 returns 2 (H_MSG_TRUE), if a region is entered, the window is valid and the needed drawing mode (see set_insertset_insertSetInsertSetInsertSetInsert) is available. If necessary, an exception is raised. You may determine the behavior after an empty input with set_system(::'no_object_result',<Result>:)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>).

Possible Predecessors

open_windowopen_windowOpenWindowOpenWindowOpenWindow

Possible Successors

reduce_domainreduce_domainReduceDomainReduceDomainReduceDomain, disp_regiondisp_regionDispRegionDispRegionDispRegion, set_coloredset_coloredSetColoredSetColoredSetColored, set_line_widthset_line_widthSetLineWidthSetLineWidthSetLineWidth, set_drawset_drawSetDrawSetDrawSetDraw, set_insertset_insertSetInsertSetInsertSetInsert

Alternatives

get_mpositionget_mpositionGetMpositionGetMpositionGetMposition, move_regionmove_regionMoveRegionMoveRegionMoveRegion

See also

set_insertset_insertSetInsertSetInsertSetInsert, set_drawset_drawSetDrawSetDrawSetDraw, affine_trans_imageaffine_trans_imageAffineTransImageAffineTransImageAffineTransImage

Module

Foundation


ClassesClasses | | Operators