If you know a point within a region, get the full region that contains the point, instance:
Connection (Wordreg, regions) while
(1)
Get_mbutton (Windowhandle,row,col,button)
Select_region_point ( Regions, Targinregion, Row, Col)
dev_display (Image)
dev_set_draw (' Fill ')
dev_set_color (' Green '
) Dev_display (targinregion)
stop ()
Endwhile
If you know a part of a zone, you can do so by getting the area outline and then getting the first point:
while (1)
draw_rectangle1 (WindowHandle, Row1, Col1, Row2, Col2)
gen_rectangle1 (Rectangle, Row1, Col1, Row2, Col2)
get_region_contour (Rectangle, rows, Cols)
tuple_length (rows, L)
if (L > 0)
tuple_select (Rows, 0, Row)
Tuple_select (Cols, 0, Col)
endif
Connection (Wordreg, regions)
Select_region_point (regions, Targinregion, Row, Col)
dev_display (Image)
dev_set_draw (' Fill ')
dev_set_color (' green ')
dev_ Display (targinregion)
stop ()
Endwhile