REBOL Document

Within? - Function Summary


Summary:

Return TRUE if the point is within the rectangle bounds.

Usage:

within? point offset size

Arguments:

point - XY position (must be: pair)

offset - Offset of area (must be: pair)

size - Size of area (must be: pair)

Description:

This function is used to determine if a point is within a graphical area. You provide the position of the point, the upper left corner of the area, and the area's size. The function will return TRUE if the point is within that area, or FALSE otherwise.

For example, this returns TRUE because the point 50x50 is within the bounds of the area:


    print within? 50x50 20x30 200x300
    true


<Back | Index | Next>

Copyright 2004 REBOL Technologies