draw_lineπ
Short descriptionπ
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 )
Descriptionπ
draw_line 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π
WindowHandle (input_control) window β (handle)
Window handle.
Row1 (output_control) line.begin.y β (real)
Row index of the first point of the line.
Column1 (output_control) line.begin.x β (real)
Column index of the first point of the line.
Row2 (output_control) line.end.y β (real)
Row index of the second point of the line.
Column2 (output_control) line.end.x β (real)
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)
draw_line(WindowHandle,&Row1,&Column1,&Row2,&Column2)\;
disp_line(WindowHandle,Row1,Column1,Row2,Column2)\;
Resultπ
draw_line returns 2 (H_MSG_TRUE) if the window is valid.
If necessary, an exception is raised.
Combinations with other operatorsπ
Combinations
Possible predecessors
Possible successors
reduce_domain, disp_line, set_colored, set_line_width, set_draw
See also
Moduleπ
Foundation