Draw a line.
::draw_line_mod returns the parameter for a line, which has been created interactively by the user in the window.
To create a line are expected the coordinates of the start point Row1In, Column1In and of the end point Row2In,Column2In. If you click on one end point of the created line, you may move this point. After another mouse click in the middle of the created line you can move it.
Pressing the right mousebutton terminates the procedure.
After terminating the procedure the line is not visible in the window any longer.
|
WindowHandle (input_control) |
window -> HTuple.long |
| Window_id. | |
|
Row1In (input_control) |
line.begin.y -> HTuple.double |
| Row index of the first point of the line. | |
|
Column1In (input_control) |
line.begin.x -> HTuple.double |
| Column index of the first point of the line. | |
|
Row2In (input_control) |
line.end.y -> HTuple.double |
| Row index of the second point of the line. | |
|
Column2In (input_control) |
line.end.x -> HTuple.double |
| Column index of the second point of the line. | |
|
Row1 (output_control) |
line.begin.y -> double * |
| Row index of the first point of the line. | |
|
Column1 (output_control) |
line.begin.x -> double * |
| Column index of the first point of the line. | |
|
Row2 (output_control) |
line.end.y -> double * |
| Row index of the second point of the line. | |
|
Column2 (output_control) |
line.end.x -> double * |
| Column index of the second point of the line. | |
get_system("width",Width) ;
get_system("height",Height) ;
set_part(WindowHandle,0,0,Width-1,Height-1) ;
read_image(&Image,"affe") ;
disp_image(Image,WindowHandle) ;
draw_line_mod(WindowHandle,10,20,55,124,&Row1,&Column1,&Row2,&Column2) ;
set_part(WindowHandle,Row1,Column1,Row2,Column2) ;
disp_image(Image,WindowHandle) ;
fwrite_string("Clipping = (") ;
fwrite_string(Row1) ;
fwrite_string(",") ;
fwrite_string(Column1) ;
fwrite_string("),(") ;
fwrite_string(Row2) ;
fwrite_string(",") ;
fwrite_string(Column2) ;
fwrite_string(")") ;
fnew_line(:::) ;
::draw_line_mod returns H_MSG_TRUE, if the window is valid and the needed drawing mode is available. If necessary, an exception handling is raised.
::reduce_domain, ::disp_line, ::set_colored, ::set_line_width, ::set_draw, ::set_insert
::draw_line, ::draw_ellipse, ::draw_region
::gen_circle, ::draw_rectangle1, ::draw_rectangle2
System