HALCON Reference Manual 10.0.2
Table of Contents / Graphics / Drawing ClassesClassesClasses | | | Operators

draw_pointdraw_pointdraw_pointDrawPointDrawPoint (Operator)

Name

draw_pointdraw_pointdraw_pointDrawPointDrawPoint — Draw a point.

Signature

draw_point( : : WindowHandle : Row, Column)

Herror draw_point(const Hlong WindowHandle, double* Row, double* Column)

Herror T_draw_point(const Htuple WindowHandle, Htuple* Row, Htuple* Column)

Herror draw_point(const HTuple& WindowHandle, double* Row, double* Column)

double HWindow::DrawPoint(HTuple* Column) const

void HOperatorSetX.DrawPoint(
[in] VARIANT WindowHandle, [out] VARIANT* Row, [out] VARIANT* Column)

double HWindowX.DrawPoint([out] double* Column)

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

void HWindow.DrawPoint(out double row, out double column)

Description

draw_pointdraw_pointdraw_pointDrawPointDrawPoint returns the parameter for a point, which has been created interactively by the user in the window.

To create a point you have to press the left mouse button. While keeping the button pressed you may “drag” the point in any direction. Pressing the right mousebutton terminates the procedure.

After terminating the procedure the point is not visible in the window any longer.

Parallelization

Parameters

WindowHandleWindowHandleWindowHandleWindowHandlewindowHandle (input_control)  window HWindow, HTupleHTupleHWindowX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong)

Window identifier.

RowRowRowRowrow (output_control)  point.y HTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double)

Row index of the point.

ColumnColumnColumnColumncolumn (output_control)  point.x HTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double)

Column index of the point.

Example (HDevelop)

get_system('width',Width)
get_system('height',Height)
set_part(WindowHandle,0,0,Width-1,Height-1)
read_image(Image,'monkey')
disp_image(Image,WindowHandle)
draw_point(WindowHandle,Row1,Column1)
disp_line(WindowHandle,Row1-2,Column1,Row1+2,Column1)
disp_line(WindowHandle,Row1,Column1-2,Row1,Column1+2)
disp_image(Image,WindowHandle)
fwrite_string(FileHandle,['Clipping = (',Row1,',',Column1,')'])
fnew_line(FileHandle)

Example (C)

get_system("width",Width) ;
get_system("height",Height) ;
set_part(WindowHandle,0,0,Width-1,Height-1) ;
read_image(&Image,"monkey") ;
disp_image(Image,WindowHandle) ;
draw_point(WindowHandle,&Row1,&Column1) ;
disp_line(WindowHandle,Row1-2,Column1,Row1+2,Column1) ;
disp_line(WindowHandle,Row1,Column1-2,Row1,Column1+2) ;
disp_image(Image,WindowHandle) ;
fwrite_string(FileHandle,"Clipping = (") ;
fwrite_string(FileHandle,Row1) ;
fwrite_string(FileHandle,",") ;
fwrite_string(FileHandle,Column1) ;
fwrite_string(FileHandle,"),(") ;
fnew_line(FileHandle) ;

Example (HDevelop)

get_system('width',Width)
get_system('height',Height)
set_part(WindowHandle,0,0,Width-1,Height-1)
read_image(Image,'monkey')
disp_image(Image,WindowHandle)
draw_point(WindowHandle,Row1,Column1)
disp_line(WindowHandle,Row1-2,Column1,Row1+2,Column1)
disp_line(WindowHandle,Row1,Column1-2,Row1,Column1+2)
disp_image(Image,WindowHandle)
fwrite_string(FileHandle,['Clipping = (',Row1,',',Column1,')'])
fnew_line(FileHandle)

Example (HDevelop)

get_system('width',Width)
get_system('height',Height)
set_part(WindowHandle,0,0,Width-1,Height-1)
read_image(Image,'monkey')
disp_image(Image,WindowHandle)
draw_point(WindowHandle,Row1,Column1)
disp_line(WindowHandle,Row1-2,Column1,Row1+2,Column1)
disp_line(WindowHandle,Row1,Column1-2,Row1,Column1+2)
disp_image(Image,WindowHandle)
fwrite_string(FileHandle,['Clipping = (',Row1,',',Column1,')'])
fnew_line(FileHandle)

Example (HDevelop)

get_system('width',Width)
get_system('height',Height)
set_part(WindowHandle,0,0,Width-1,Height-1)
read_image(Image,'monkey')
disp_image(Image,WindowHandle)
draw_point(WindowHandle,Row1,Column1)
disp_line(WindowHandle,Row1-2,Column1,Row1+2,Column1)
disp_line(WindowHandle,Row1,Column1-2,Row1,Column1+2)
disp_image(Image,WindowHandle)
fwrite_string(FileHandle,['Clipping = (',Row1,',',Column1,')'])
fnew_line(FileHandle)

Result

draw_pointdraw_pointdraw_pointDrawPointDrawPoint returns 2 (H_MSG_TRUE), if the window is valid and the needed drawing mode is available. If necessary, an exception is raised.

Possible Predecessors

open_windowopen_windowopen_windowOpenWindowOpenWindow

Possible Successors

reduce_domainreduce_domainreduce_domainReduceDomainReduceDomain, disp_linedisp_linedisp_lineDispLineDispLine, set_coloredset_coloredset_coloredSetColoredSetColored, set_line_widthset_line_widthset_line_widthSetLineWidthSetLineWidth, set_drawset_drawset_drawSetDrawSetDraw, set_insertset_insertset_insertSetInsertSetInsert

See also

draw_point_moddraw_point_moddraw_point_modDrawPointModDrawPointMod, draw_circledraw_circledraw_circleDrawCircleDrawCircle, draw_ellipsedraw_ellipsedraw_ellipseDrawEllipseDrawEllipse, set_insertset_insertset_insertSetInsertSetInsert

Module

Foundation


Table of Contents / Graphics / Drawing ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH