Skip to content

drag_region3DragRegion3DragRegion3drag_region3T_drag_region3πŸ”—

Short descriptionπŸ”—

drag_region3DragRegion3DragRegion3drag_region3T_drag_region3 β€” Interactive movement of a region with restriction of positions.

WarningπŸ”—

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

SignatureπŸ”—

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

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

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

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

HRegion HRegion.DragRegion3( HRegion maskRegion, HWindow windowHandle, int row, int column )

HRegion HWindow.DragRegion3( HRegion sourceRegion, HRegion maskRegion, int row, int column )

DescriptionπŸ”—

You use drag_region3DragRegion3 to move a region on the display by mouse. It corresponds to the operator drag_region2DragRegion2 with the enhancement, that all points are specified which can be entered by mouse. If you move the mouse outside of this area (MaskRegionmaskRegionmask_region), the region on the point with the smallest distance inside MaskRegionmaskRegionmask_region will be displayed.

AttentionπŸ”—

The region’s gray values 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.

MaskRegionmaskRegionmask_region (input_object) region-array β†’ objectHObjectHRegionHObjectHobject

Points on which it is allowed for a region 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_region3DragRegion3 returns 2 (H_MSG_TRUE) if a region is entered and if 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, get_mpositionGetMposition

Possible successors

reduce_domainReduceDomain, disp_regionDispRegion, set_coloredSetColored, set_line_widthSetLineWidth, set_drawSetDraw, affine_trans_imageAffineTransImage

Alternatives

get_mpositionGetMposition, move_regionMoveRegion, drag_region1DragRegion1, drag_region2DragRegion2

See also

set_drawSetDraw, affine_trans_imageAffineTransImage

ModuleπŸ”—

Foundation