The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



ClipBox


Unit:SDL_sline
Class:TSLine
Declaration:function ClipBox (bllx, blly, burx, bury: double; var x1, y1, x2, y2: double): boolean;

The function ClipBox calculates the intersection points [x1,y1] and [x2,y2] of the line with the rectangular box given by the parameters bllx, blly, burx, and bury. The function returns TRUE if the line cuts the boundary box, and FALSE if it lies outside the box.

Hint: Please note that the coordinates of the lower left corner always have to be smaller than the coordinates of the upper right corner.



Last Update: 2012-Oct-20