Skip to content

draw_lineDrawLineDrawLinedraw_lineT_draw_lineπŸ”—

Short descriptionπŸ”—

draw_lineDrawLineDrawLinedraw_lineT_draw_line β€” Draw a line.

SignatureπŸ”—

draw_line( window WindowHandle, out line.begin.y Row1, out line.begin.x Column1, out line.end.y Row2, out line.end.x Column2 )void DrawLine( const HTuple& WindowHandle, HTuple* Row1, HTuple* Column1, HTuple* Row2, HTuple* Column2 )static void HOperatorSet.DrawLine( HTuple windowHandle, out HTuple row1, out HTuple column1, out HTuple row2, out HTuple column2 )def draw_line( window_handle: HHandle ) -> Tuple[float, float, float, float]

Herror T_draw_line( const Htuple WindowHandle, Htuple* Row1, Htuple* Column1, Htuple* Row2, Htuple* Column2 )

void HWindow::DrawLine( double* Row1, double* Column1, double* Row2, double* Column2 ) const

void HWindow.DrawLine( out double row1, out double column1, out double row2, out double column2 )

DescriptionπŸ”—

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

To create a line you have to press the left mouse button determining a start point of the line. While keeping the button pressed you may β€œdrag” the line in any direction. After another mouse click in the middle of the created line you can move it. If you click on one end point of the created line, you may move this point. Pressing the right mouse button terminates the procedure.

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

AttentionπŸ”—

If used in a buffer window, mouse events have to be supplied by the application, while the draw operator must be run in another thread.

Execution informationπŸ”—

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

ParametersπŸ”—

WindowHandlewindowHandlewindow_handle (input_control) window β†’ (handle)HTuple (HHandle)HWindow, HTuple (IntPtr)HHandleHtuple (handle)

Window handle.

Row1row1row_1 (output_control) line.begin.y β†’ (real)HTuple (double)HTuple (double)floatHtuple (double)

Row index of the first point of the line.

Column1column1column_1 (output_control) line.begin.x β†’ (real)HTuple (double)HTuple (double)floatHtuple (double)

Column index of the first point of the line.

Row2row2row_2 (output_control) line.end.y β†’ (real)HTuple (double)HTuple (double)floatHtuple (double)

Row index of the second point of the line.

Column2column2column_2 (output_control) line.end.x β†’ (real)HTuple (double)HTuple (double)floatHtuple (double)

Column index of the second point of the line.

ExampleπŸ”—

(HDevelop)

draw_line(WindowHandle,Row1,Column1,Row2,Column2)
gen_contour_polygon_xld (Line, [Row1,Row2], [Column1,Column2])
dev_display (Line)
(C)
draw_line(WindowHandle,&Row1,&Column1,&Row2,&Column2)\;
disp_line(WindowHandle,Row1,Column1,Row2,Column2)\;

ResultπŸ”—

draw_lineDrawLine returns 2 (H_MSG_TRUE) if the window is valid. If necessary, an exception is raised.

Combinations with other operatorsπŸ”—

Combinations

Possible predecessors

open_windowOpenWindow

Possible successors

reduce_domainReduceDomain, disp_lineDispLine, set_coloredSetColored, set_line_widthSetLineWidth, set_drawSetDraw

See also

draw_line_modDrawLineMod, gen_rectangle1GenRectangle1, draw_circleDrawCircle, draw_ellipseDrawEllipse

ModuleπŸ”—

Foundation