Object TAffineBox

Unit

Declaration

type TAffineBox = object(TObject)

Description

Object representing an affine box.

Box is defined by three corner points (top-left, top-tight, bottom-left).

Hierarchy

Overview

Fields

Public BottomLeft: TPointF;
Public TopLeft: TPointF;
Public TopRight: TPointF;

Methods

Public class function AffineBox(ARectF: TRectF): TAffineBox; overload; static;
Public class function AffineBox(ATopLeft, ATopRight, ABottomLeft: TPointF): TAffineBox; overload; static;
Public function Contains(APoint: TPointF): boolean;
Public class function EmptyBox: TAffineBox; static;
Public procedure Inflate(AHoriz, AVert: single);
Public procedure Offset(AOfsX, AOfsY: single); overload;
Public procedure Offset(AOfs: TPointF); overload;

Properties

Public property AsPolygon: ArrayOfTPointF read GetAsPolygon;
Public property BottomRight: TPointF read GetBottomRight;
Public property Center: TPointF read GetCenter;
Public property Height: single read GetHeight;
Public property IsEmpty: boolean read GetIsEmpty;
Public property RectBounds: TRect read GetRectBounds;
Public property RectBoundsF: TRectF read GetRectBoundsF;
Public property Surface: single read GetSurface;
Public property Width: single read GetWidth;

Description

Fields

Public BottomLeft: TPointF;

Bottom-left corner of the affine box

Public TopLeft: TPointF;

Top-left corner of the affine box

Public TopRight: TPointF;

Top-right corner of the affine box

Methods

Public class function AffineBox(ARectF: TRectF): TAffineBox; overload; static;

Creates an affine box from a TRectF structure

Public class function AffineBox(ATopLeft, ATopRight, ABottomLeft: TPointF): TAffineBox; overload; static;

Creates an affine box defined by three corner points

Public function Contains(APoint: TPointF): boolean;

Checks if a point is contained within the affine box

Public class function EmptyBox: TAffineBox; static;

Creates an empty affine box

Public procedure Inflate(AHoriz, AVert: single);

Inflates the affine box along its axes by specified horizontal and vertical amounts

Public procedure Offset(AOfsX, AOfsY: single); overload;

Offsets the affine box by specified X and Y amounts

Public procedure Offset(AOfs: TPointF); overload;

Offsets the affine box by a specified point

Properties

Public property AsPolygon: ArrayOfTPointF read GetAsPolygon;

Affine box as an array of points (polygon)

Public property BottomRight: TPointF read GetBottomRight;

Bottom-right corner of the affine box

Public property Center: TPointF read GetCenter;

Center point of the affine box

Public property Height: single read GetHeight;

Height of the affine box along its axes

Public property IsEmpty: boolean read GetIsEmpty;

Check if the affine box is empty (containing empty points, not just of zero size)

Public property RectBounds: TRect read GetRectBounds;

Bounding rectangle as TRect

Public property RectBoundsF: TRectF read GetRectBoundsF;

Bounding rectangle as TRectF

Public property Surface: single read GetSurface;

Surface area of the affine box

Public property Width: single read GetWidth;

Width of the affine box along its axes