slide_imageT_slide_imageSlideImageSlideImageslide_image (算子)

名称

slide_imageT_slide_imageSlideImageSlideImageslide_image — 来自两个窗口缓冲区的交互式输出。

警告

The operator slide_imageslide_imageSlideImageSlideImageSlideImageslide_image does not work with HDevelop graphics windows. It is only provided for reasons of backward compatibility.

签名

slide_image( : : WindowHandleSource1, WindowHandleSource2, WindowHandle : )

Herror T_slide_image(const Htuple WindowHandleSource1, const Htuple WindowHandleSource2, const Htuple WindowHandle)

void SlideImage(const HTuple& WindowHandleSource1, const HTuple& WindowHandleSource2, const HTuple& WindowHandle)

void HWindow::SlideImage(const HWindow& WindowHandleSource2, const HWindow& WindowHandle) const

static void HOperatorSet.SlideImage(HTuple windowHandleSource1, HTuple windowHandleSource2, HTuple windowHandle)

void HWindow.SlideImage(HWindow windowHandleSource2, HWindow windowHandle)

def slide_image(window_handle_source_1: HHandle, window_handle_source_2: HHandle, window_handle: HHandle) -> None

描述

slide_imageslide_imageSlideImageSlideImageSlideImageslide_image divides the window horizontal in two logical areas dependent of the mouse position. The content of the first indicated window is copied in the upper area, the content of the second window is copied in the lower area. If you press the left mouse button you may scroll the delimitation between the two areas (you may move the mouse outside the window, too. In doing so the position of the mouse relative to the window determines the borderline).

Pressing the right mouse button in the window terminates the operator slide_imageslide_imageSlideImageSlideImageSlideImageslide_image.

A useful application of the operator slide_imageslide_imageSlideImageSlideImageSlideImageslide_image might be the visualization of the effect of a filtering operation for an image. The output is directed to the currently set window (WindowHandleWindowHandleWindowHandleWindowHandlewindowHandlewindow_handle).

注意

The three windows must have the same size and have to reside on the same computer.

执行信息

参数

WindowHandleSource1WindowHandleSource1WindowHandleSource1WindowHandleSource1windowHandleSource1window_handle_source_1 (输入控制)  window HWindow, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Source window handle of the “upper window”.

WindowHandleSource2WindowHandleSource2WindowHandleSource2WindowHandleSource2windowHandleSource2window_handle_source_2 (输入控制)  window HWindow, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Source window handle of the “lower window”.

WindowHandleWindowHandleWindowHandleWindowHandlewindowHandlewindow_handle (输入控制)  window HWindow, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Output window handle.

示例(HDevelop)

read_image (Image, 'fabrik')
sobel_dir (Image, EdgeAmplitude, EdgeDirection, 'sum_abs', 3)
dev_open_window (0, 0, 512, 512, 'black', WindowHandle1)
dev_display (EdgeAmplitude)
dev_open_window (0, 0, 512, 512, 'black', WindowHandle2)
dev_display (EdgeDirection)
dev_open_window (0, 0, 512, 512, 'black', WindowHandle)
slide_image (WindowHandle1, WindowHandle2, WindowHandle)

示例(C)

read_image(&Image,"fabrik");
sobel_amp(Image,&Amp,"sum_abs",3);
open_window(0,0,-1,-1,"root","buffer","",&Buffer1);
disp_image(Amp,Buffer1);
sobel_dir(Image,&Amp,&Dir,"sum_abs",3);
open_window(0,0,-1,-1,"root","buffer","",&Buffer2);
disp_image(Dir,Buffer2);
open_window(0,0,-1,-1,"root","visible","",&WindowHandle);
slide_image(Buffer1,Buffer2,WindowHandle);

示例(HDevelop)

read_image (Image, 'fabrik')
sobel_dir (Image, EdgeAmplitude, EdgeDirection, 'sum_abs', 3)
dev_open_window (0, 0, 512, 512, 'black', WindowHandle1)
dev_display (EdgeAmplitude)
dev_open_window (0, 0, 512, 512, 'black', WindowHandle2)
dev_display (EdgeDirection)
dev_open_window (0, 0, 512, 512, 'black', WindowHandle)
slide_image (WindowHandle1, WindowHandle2, WindowHandle)

示例(HDevelop)

read_image (Image, 'fabrik')
sobel_dir (Image, EdgeAmplitude, EdgeDirection, 'sum_abs', 3)
dev_open_window (0, 0, 512, 512, 'black', WindowHandle1)
dev_display (EdgeAmplitude)
dev_open_window (0, 0, 512, 512, 'black', WindowHandle2)
dev_display (EdgeDirection)
dev_open_window (0, 0, 512, 512, 'black', WindowHandle)
slide_image (WindowHandle1, WindowHandle2, WindowHandle)

示例(HDevelop)

read_image (Image, 'fabrik')
sobel_dir (Image, EdgeAmplitude, EdgeDirection, 'sum_abs', 3)
dev_open_window (0, 0, 512, 512, 'black', WindowHandle1)
dev_display (EdgeAmplitude)
dev_open_window (0, 0, 512, 512, 'black', WindowHandle2)
dev_display (EdgeDirection)
dev_open_window (0, 0, 512, 512, 'black', WindowHandle)
slide_image (WindowHandle1, WindowHandle2, WindowHandle)

结果

If the both windows exist and one of these windows is valid slide_imageslide_imageSlideImageSlideImageSlideImageslide_image 返回 2 ( H_MSG_TRUE )。如有必要,则抛出异常。

可能的前趋

open_windowopen_windowOpenWindowOpenWindowOpenWindowopen_window

替代

copy_rectanglecopy_rectangleCopyRectangleCopyRectangleCopyRectanglecopy_rectangle, get_mpositionget_mpositionGetMpositionGetMpositionGetMpositionget_mposition

另见

open_windowopen_windowOpenWindowOpenWindowOpenWindowopen_window, move_rectanglemove_rectangleMoveRectangleMoveRectangleMoveRectanglemove_rectangle

模块

基础