Record TRectFHelper

Hierarchy
Fields
Properties

Unit

Declaration

type TRectFHelper = record helper for TRectF

Description

Helper for TRectF structure providing additional functionality for rectangle manipulation

Overview

Methods

Public function Contains(const APoint: TPointF; AIncludeBottomRight: boolean = false): boolean;
Public class function Intersect(const R1: TRectF; const R2: TRectF): TRectF; overload; static;
Public function IntersectsWith(const r: TRectF): boolean;
Public function IsEmpty: boolean;
Public function Union(const r: TRectF; ADiscardEmpty: boolean): TRectF; overload;
Public class function Union(const R1: TRectF; const R2: TRectF; ADiscardEmpty: boolean): TRectF; overload; static;
Public class function Union(const R1: TRectF; const R2: TRectF): TRectF; overload; static;
Public function Union(const r: TRectF): TRectF; overload;
Public procedure Include(const APoint: TPointF);

Description

Methods

Public function Contains(const APoint: TPointF; AIncludeBottomRight: boolean = false): boolean;

Checks if the rectangle contains a specified point, with an option to include or exclude the bottom-right boundary

Public class function Intersect(const R1: TRectF; const R2: TRectF): TRectF; overload; static;

Returns the intersection of two given rectangles

Public function IntersectsWith(const r: TRectF): boolean;

Checks if the rectangle intersects with another rectangle

Public function IsEmpty: boolean;

Determines if the rectangle is empty (of zero size)

Public function Union(const r: TRectF; ADiscardEmpty: boolean): TRectF; overload;

Returns the union of itself and another rectangle, with an option to ignore empty rectangles

Public class function Union(const R1: TRectF; const R2: TRectF; ADiscardEmpty: boolean): TRectF; overload; static;

Returns the union of two given rectangles, with an option to ignore empty rectangles

Public class function Union(const R1: TRectF; const R2: TRectF): TRectF; overload; static;

Returns the union of two given rectangles

Public function Union(const r: TRectF): TRectF; overload;

Returns the union of itself and another rectangle

Public procedure Include(const APoint: TPointF);

Expands the rectangle to include a specified point (empty points are ignored)