drag_region3T_drag_region3DragRegion3DragRegion3drag_region3 (Operator)

Name

drag_region3T_drag_region3DragRegion3DragRegion3drag_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(SourceRegion, MaskRegion : DestinationRegion : WindowHandle, Row, Column : )

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

void DragRegion3(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

static void HOperatorSet.DragRegion3(HObject sourceRegion, HObject maskRegion, out HObject destinationRegion, HTuple windowHandle, HTuple row, HTuple column)

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

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

def drag_region3(source_region: HObject, mask_region: HObject, window_handle: HHandle, row: int, column: int) -> HObject

Description

You use drag_region3drag_region3DragRegion3DragRegion3drag_region3 to move a region on the display by mouse. It corresponds to the operator drag_region2drag_region2DragRegion2DragRegion2drag_region2 with the enhancement, that all points are specified which can be entered by mouse. If you move the mouse outside of this area (MaskRegionMaskRegionMaskRegionmaskRegionmask_region), the region on the point with the smallest distance inside MaskRegionMaskRegionMaskRegionmaskRegionmask_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

Parameters

SourceRegionSourceRegionSourceRegionsourceRegionsource_region (input_object)  region-array objectHRegionHObjectHObjectHobject

Regions to move.

MaskRegionMaskRegionMaskRegionmaskRegionmask_region (input_object)  region-array objectHRegionHObjectHObjectHobject

Points on which it is allowed for a region to move.

DestinationRegionDestinationRegionDestinationRegiondestinationRegiondestination_region (output_object)  region-array objectHRegionHObjectHObjectHobject *

Moved regions.

WindowHandleWindowHandleWindowHandlewindowHandlewindow_handle (input_control)  window HWindow, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Window handle.

RowRowRowrowrow (input_control)  point.y HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Row index of the reference point.

Default: 100

Suggested values: 0, 64, 128, 256, 512

Value range: 0 ≤ Row Row Row row row ≤ 1024

ColumnColumnColumncolumncolumn (input_control)  point.x HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Column index of the reference point.

Default: 100

Suggested values: 0, 64, 128, 256, 512

Value range: 0 ≤ Column Column Column column column ≤ 1024

Result

drag_region3drag_region3DragRegion3DragRegion3drag_region3 returns 2 ( H_MSG_TRUE) , if a region is entered, if the window is valid and the needed drawing mode (see set_insertset_insertSetInsertSetInsertset_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>:)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>).

Possible Predecessors

open_windowopen_windowOpenWindowOpenWindowopen_window, get_mpositionget_mpositionGetMpositionGetMpositionget_mposition

Possible Successors

reduce_domainreduce_domainReduceDomainReduceDomainreduce_domain, disp_regiondisp_regionDispRegionDispRegiondisp_region, set_coloredset_coloredSetColoredSetColoredset_colored, set_line_widthset_line_widthSetLineWidthSetLineWidthset_line_width, set_drawset_drawSetDrawSetDrawset_draw, set_insertset_insertSetInsertSetInsertset_insert, affine_trans_imageaffine_trans_imageAffineTransImageAffineTransImageaffine_trans_image

Alternatives

get_mpositionget_mpositionGetMpositionGetMpositionget_mposition, move_regionmove_regionMoveRegionMoveRegionmove_region, drag_region1drag_region1DragRegion1DragRegion1drag_region1, drag_region2drag_region2DragRegion2DragRegion2drag_region2

See also

set_insertset_insertSetInsertSetInsertset_insert, set_drawset_drawSetDrawSetDrawset_draw, affine_trans_imageaffine_trans_imageAffineTransImageAffineTransImageaffine_trans_image

Module

Foundation