[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'types' (#rtl)

PtInRect

Check whether a point is inside a rectangle.

Declaration

Source position: types.pp line 289

function PtInRect(

  const Rect: TRect;

  const p: TPoint

):Boolean;

Description

PtInRect returns True if p is located inside Rect, and False if it is located outside the rectangle.

Remark: Note that the bottom, right edges are not considered part of the rectangle, therefor a point located on one of these edges will not be considered part of the rectangle, meaning that for a record (10,10,100,100) the point (90,100) will not be considered part of the record, but 90,0 will be.

See also

IntersectRect

  

Return the intersection of 2 rectangles

UnionRect

  

Return the union of 2 rectangles.

IsRectEmpty

  

Check whether a rectangle is empty

OffsetRect

  

Offset the rectangle

InflateRect

  

Increase the rectangle in size, keeping it centered

Size

  

Return the size of the rectangle

The latest version of this document can be found at lazarus-ccr.sourceforge.net.