Cicode Programming Reference > Cicode Function Categories > Display Functions > DspAnInRgn

DspAnInRgn

Checks if an AN is within a region bounded by two ANs.

Will return False if any of the specified ANs are completely clipped. A partially clipped AN is treated as being fully visible.

Syntax

pAnInRgn(nAN, One, Two)

nAN:

The animation-point number.

One, Two:

One - the AN at a corner of the region; two - the AN at the opposite corner of the region.

Return Value

1 if the AN is within the region, or 0 (zero) if it is not.

Example

DspGetMouse(X,Y);
DspAnMove(250,X,Y);
IF DspAnInRgn(250,20,30) THEN
Prompt("Mouse in region bounded by AN20 and AN30");
ELSE
Prompt("Mouse not in region");
END

See Also

Display Functions

Published June 2018