get_mbutton_sub_pixT_get_mbutton_sub_pixGetMbuttonSubPixGetMbuttonSubPixget_mbutton_sub_pix (算子名称)

名称

get_mbutton_sub_pixT_get_mbutton_sub_pixGetMbuttonSubPixGetMbuttonSubPixget_mbutton_sub_pix — Wait until a mouse button is pressed and get the subpixel mouse position.

参数签名

get_mbutton_sub_pix( : : WindowHandle : Row, Column, Button)

Herror T_get_mbutton_sub_pix(const Htuple WindowHandle, Htuple* Row, Htuple* Column, Htuple* Button)

void GetMbuttonSubPix(const HTuple& WindowHandle, HTuple* Row, HTuple* Column, HTuple* Button)

void HWindow::GetMbuttonSubPix(double* Row, double* Column, Hlong* Button) const

static void HOperatorSet.GetMbuttonSubPix(HTuple windowHandle, out HTuple row, out HTuple column, out HTuple button)

void HWindow.GetMbuttonSubPix(out double row, out double column, out int button)

def get_mbutton_sub_pix(window_handle: HHandle) -> Tuple[float, float, int]

描述

get_mbutton_sub_pixget_mbutton_sub_pixGetMbuttonSubPixGetMbuttonSubPixGetMbuttonSubPixget_mbutton_sub_pix returns the subpixel accurate image coordinates of the mouse pointer in the output window and the mouse button pressed. In addition the state of the modifier keys is returned. The following values are assigned to the individual buttons and keys:

1:

Left button,

2:

Middle button,

4:

Right button,

8:

Shift key,

16:

Ctrl key,

32:

Alt key.

The sum of the values for all pressed keys added to the value of the pressed mouse button is returned in ButtonButtonButtonButtonbuttonbutton.

The operator waits until a button is pressed in the output window. For graphics windows the coordinates RowRowRowRowrowrow and ColumnColumnColumnColumncolumncolumn are expressed with consideration of the current image part (see set_partset_partSetPartSetPartSetPartset_part).

If only pixel accurate image coordinates are required, you can use the operator get_mbuttonget_mbuttonGetMbuttonGetMbuttonGetMbuttonget_mbutton.

注意

get_mbutton_sub_pixget_mbutton_sub_pixGetMbuttonSubPixGetMbuttonSubPixGetMbuttonSubPixget_mbutton_sub_pix only returns if a mouse button is pressed in the window.

运行信息

参数表

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

Window handle.

RowRowRowRowrowrow (output_control)  point.y HTuplefloatHTupleHtuple (real) (double) (double) (double)

Row coordinate of the mouse cursor in the image coordinate system.

ColumnColumnColumnColumncolumncolumn (output_control)  point.x HTuplefloatHTupleHtuple (real) (double) (double) (double)

Column coordinate of the mouse cursor in the image coordinate system.

ButtonButtonButtonButtonbuttonbutton (output_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Mouse button(s) pressed.

结果

get_mbutton_sub_pixget_mbutton_sub_pixGetMbuttonSubPixGetMbuttonSubPixGetMbuttonSubPixget_mbutton_sub_pix returns the value 2 ( H_MSG_TRUE) .

可能的前置算子

open_windowopen_windowOpenWindowOpenWindowOpenWindowopen_window

可替代算子

get_mbuttonget_mbuttonGetMbuttonGetMbuttonGetMbuttonget_mbutton, get_mpositionget_mpositionGetMpositionGetMpositionGetMpositionget_mposition, get_mposition_sub_pixget_mposition_sub_pixGetMpositionSubPixGetMpositionSubPixGetMpositionSubPixget_mposition_sub_pix

参考其它

open_windowopen_windowOpenWindowOpenWindowOpenWindowopen_window

模块

Foundation