Skip to content

drag_region2DragRegion2DragRegion2drag_region2T_drag_region2🔗

Short description🔗

drag_region2DragRegion2DragRegion2drag_region2T_drag_region2 — Interactive movement of a region with fixpoint specification.

Warning🔗

This operator does not work in an HDevelop graphics window opened with dev_open_window.

Signature🔗

drag_region2( region SourceRegion, out region DestinationRegion, window WindowHandle, point.y Row, point.x Column )void DragRegion2( const HObject& SourceRegion, HObject* DestinationRegion, const HTuple& WindowHandle, const HTuple& Row, const HTuple& Column )static void HOperatorSet.DragRegion2( HObject sourceRegion, out HObject destinationRegion, HTuple windowHandle, HTuple row, HTuple column )def drag_region2( source_region: HObject, window_handle: HHandle, row: int, column: int ) -> HObject

Herror T_drag_region2( const Hobject SourceRegion, Hobject* DestinationRegion, const Htuple WindowHandle, const Htuple Row, const Htuple Column )

HRegion HRegion::DragRegion2( const HWindow& WindowHandle, Hlong Row, Hlong Column ) const

HRegion HWindow::DragRegion2( const HRegion& SourceRegion, Hlong Row, Hlong Column ) const

HRegion HRegion.DragRegion2( HWindow windowHandle, int row, int column )

HRegion HWindow.DragRegion2( HRegion sourceRegion, int row, int column )

Description🔗

You use drag_region2DragRegion2 to move a region on the display by mouse. It corresponds to the operator drag_region1DragRegion1 with the difference, that the position of the mouse cursor can be determined.

Attention🔗

Gray values of the 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🔗

SourceRegionsourceRegionsource_region (input_object) region-array → objectHObjectHRegionHObjectHobject

Regions to move.

DestinationRegiondestinationRegiondestination_region (output_object) region-array → objectHObjectHRegionHObjectHobject *

Moved regions.

WindowHandlewindowHandlewindow_handle (input_control) window → (handle)HTuple (HHandle)HWindow, HTuple (IntPtr)HHandleHtuple (handle)

Window handle.

Rowrowrow (input_control) point.y → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Row index of the reference point.

Default: 100100
Suggested values: 0, 64, 128, 256, 5120, 64, 128, 256, 512
Value range: 0 ≤ Row ≤ 1024

Columncolumncolumn (input_control) point.x → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Column index of the reference point.

Default: 100100
Suggested values: 0, 64, 128, 256, 5120, 64, 128, 256, 512
Value range: 0 ≤ Column ≤ 1024

Result🔗

drag_region2DragRegion2 returns 2 (H_MSG_TRUE) if a region is entered and the window is valid. 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

open_windowOpenWindow

Possible successors

reduce_domainReduceDomain, disp_regionDispRegion, set_coloredSetColored, set_line_widthSetLineWidth, set_drawSetDraw, affine_trans_imageAffineTransImage

Alternatives

get_mpositionGetMposition, move_regionMoveRegion, drag_region1DragRegion1, drag_region3DragRegion3

See also

set_drawSetDraw, affine_trans_imageAffineTransImage

Module🔗

Foundation