FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Moderately revised from 8.1.
8.1 version

on-line-segment-p

Arguments: position end1 end2 &key (margin 4)

Returns true if position is on the line segment that extends from end1 to end2, within a margin of error specified by the margin keyword argument, and otherwise returns nil. position, end1, and end2 must all be position objects (see make-position).

The margin keyword argument must be a non-negative real number, and is typically a small positive value to allow the user to click on a line that is drawn in a window without having to click precisely on the line. The default value of 4 allows the user to miss the line by up to 4 pixels on either side; then if a call to this function with the clicked position and the endpoints of the drawn line returns true, then an application can decide that the user clicked on the line and take appropriate action. When the line is more nearly horizontal than vertical, this margin is measured vertically from the line, and otherwise it is measured horizontally from the line.

An error is signaled if end1 and end2 are position= to each other.

See also on-line-segment-x-y-p.


Copyright (c) 1998-2016, Franz Inc. Oakland, CA., USA. All rights reserved.
This page has had moderate revisions compared to the 8.1 page.
Created 2016.6.21.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Moderately revised from 8.1.
8.1 version