The select_region_point operator can be used to obtain a complete region through a point within a region or part of a region.

Source: Internet
Author: User

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


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.