ClassesClasses | | Operators

convert_coordinates_image_to_windowT_convert_coordinates_image_to_windowConvertCoordinatesImageToWindowConvertCoordinatesImageToWindow (Operator)

Name

convert_coordinates_image_to_windowT_convert_coordinates_image_to_windowConvertCoordinatesImageToWindowConvertCoordinatesImageToWindow — Convert image coordinates to window coordinates

Signature

convert_coordinates_image_to_window( : : WindowHandle, RowImage, ColumnImage : RowWindow, ColumnWindow)

Herror T_convert_coordinates_image_to_window(const Htuple WindowHandle, const Htuple RowImage, const Htuple ColumnImage, Htuple* RowWindow, Htuple* ColumnWindow)

void ConvertCoordinatesImageToWindow(const HTuple& WindowHandle, const HTuple& RowImage, const HTuple& ColumnImage, HTuple* RowWindow, HTuple* ColumnWindow)

void HWindow::ConvertCoordinatesImageToWindow(const HTuple& RowImage, const HTuple& ColumnImage, HTuple* RowWindow, HTuple* ColumnWindow) const

void HWindow::ConvertCoordinatesImageToWindow(double RowImage, double ColumnImage, double* RowWindow, double* ColumnWindow) const

static void HOperatorSet.ConvertCoordinatesImageToWindow(HTuple windowHandle, HTuple rowImage, HTuple columnImage, out HTuple rowWindow, out HTuple columnWindow)

void HWindow.ConvertCoordinatesImageToWindow(HTuple rowImage, HTuple columnImage, out HTuple rowWindow, out HTuple columnWindow)

void HWindow.ConvertCoordinatesImageToWindow(double rowImage, double columnImage, out double rowWindow, out double columnWindow)

Description

convert_coordinates_image_to_windowconvert_coordinates_image_to_windowConvertCoordinatesImageToWindowConvertCoordinatesImageToWindowConvertCoordinatesImageToWindow converts image coordinates RowImageRowImageRowImageRowImagerowImage and ColumnImageColumnImageColumnImageColumnImagecolumnImage into window coordinates RowWindowRowWindowRowWindowRowWindowrowWindow and ColumnWindowColumnWindowColumnWindowColumnWindowcolumnWindow based on the displayed image part and the window size of the window defined in WindowHandleWindowHandleWindowHandleWindowHandlewindowHandle.

Execution Information

Parameters

WindowHandleWindowHandleWindowHandleWindowHandlewindowHandle (input_control)  window HWindow, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Window handle

RowImageRowImageRowImageRowImagerowImage (input_control)  coordinates.y(-array) HTupleHTupleHtuple (real) (double) (double) (double)

Row in image coordinates.

ColumnImageColumnImageColumnImageColumnImagecolumnImage (input_control)  coordinates.x(-array) HTupleHTupleHtuple (real) (double) (double) (double)

Column in image coordinates.

RowWindowRowWindowRowWindowRowWindowrowWindow (output_control)  coordinates.y(-array) HTupleHTupleHtuple (real) (double) (double) (double)

Row (Y) in window coordinates.

ColumnWindowColumnWindowColumnWindowColumnWindowcolumnWindow (output_control)  coordinates.x(-array) HTupleHTupleHtuple (real) (double) (double) (double)

Column (X) in window coordinates.

Example (HDevelop)

read_image (Image, 'printer_chip/printer_chip_01')
dev_get_window (WindowHandle)
get_window_extents (WindowHandle, Row, Column, Width, Height)
dev_set_part (450, 300, 750, 600)
dev_display (Image)
*
* Generate rectangle in image coordinates
Row := [474, 746]
Column := [314, 589]
gen_rectangle1 (Rectangle1, Row[0], Column[0], Row[1], Column[1])
* Convert rectangle corner points to window coordinates
convert_coordinates_image_to_window (WindowHandle, Row[[0,1,0,1]], \
    Column[[0,0,1,1]], RowWindow, ColumnWindow)
*
* Window center in window coordinates
WindowCenterRow := Height/2-1
WindowCenterColumn := Width/2-1
* Convert window center to image coordinates
convert_coordinates_window_to_image (WindowHandle, WindowCenterRow, \
    WindowCenterColumn, RowImage, ColumnImage)
*
* Display all points in image coordinates
dev_display (Image)
disp_cross (WindowHandle, Row[[0,1,0,1]], Column[[0,0,1,1]], 6, rad(45))
disp_cross (WindowHandle, RowImage, ColumnImage, 6, 0)

Result

convert_coordinates_image_to_windowconvert_coordinates_image_to_windowConvertCoordinatesImageToWindowConvertCoordinatesImageToWindowConvertCoordinatesImageToWindow returns 2 (H_MSG_TRUE) if the window is valid. Otherwise an exception is raised.

Possible Predecessors

set_window_extentsset_window_extentsSetWindowExtentsSetWindowExtentsSetWindowExtents, set_partset_partSetPartSetPartSetPart

See also

convert_coordinates_window_to_imageconvert_coordinates_window_to_imageConvertCoordinatesWindowToImageConvertCoordinatesWindowToImageConvertCoordinatesWindowToImage

Module

Foundation


ClassesClasses | | Operators