JCL Help:RectIntersectRect

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Tests if two rectangles intersect.


Pascal

 function RectIntersectRect(const R1: TRect; const R2: TRect): Boolean;


Parameters

Parameters Description
const R1: TRect The first rectangle.
const R2: TRect The second rectangle.


Return Value

If the two rectangles intersect the function returns True, otherwise it returns False.


Description

RectIntersectRect tests whether the two rectangles intersect. Note that the function performs the test by actually calculating the intersection. Therefore, don't write code like this: if RectIntersectRect then R := RectIntersection(...). Instead use RectIntersection directly and compare the result against the null rectangle.


See Also

RectIntersection


About

Unit

JclGraphUtils


Donator

Pelle F. S. Liljendal


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page