FunctionPackage: common-graphicsToCDocOverviewCGDocRelNotesIndexPermutedIndex
Allegro CL version 6.2
This page is new in 6.2

on-line-segment-p

Arguments: position end1 end2 &key (margin 2)

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 integer, 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 2 allows the user to miss the line by up to 2 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.


Copyright (c) 1998-2002, Franz Inc. Oakland, CA., USA. All rights reserved.
Documentation for Allegro CL version 6.2. This page is new in the 6.2 release.
Created 2002.2.26.

ToCDocOverviewCGDocRelNotesIndexPermutedIndex
Allegro CL version 6.2
This page is new in 6.2