Unit CastleRectangles

Description

Rectangle representation (TRectangle, TFloatRectangle).

Uses

Overview

Classes, Interfaces, Objects and Records

Name Description
Record TRectangle 2D rectangle with integer coordinates.
Record TFloatRectangle 2D rectangle with float coordinates.
Class TRectangleList  

Functions and Procedures

function Rectangle(const Left, Bottom: Integer; const Width, Height: Cardinal): TRectangle; overload;
function Rectangle(const LeftBottom: TVector2Integer; const Width, Height: Cardinal): TRectangle; overload;
function FloatRectangle(const Left, Bottom, Width, Height: Single): TFloatRectangle; overload;
function FloatRectangle(const R: TRectangle): TFloatRectangle; overload;
function FloatRectangle(const LeftBottom: TVector2; const Width, Height: Single): TFloatRectangle; overload;

Types

THorizontalPosition = (...);
TVerticalPosition = (...);
PFloatRectangle = ˆTFloatRectangle;
TFloatRectangleArray = packed array [0..MaxInt div SizeOf(TFloatRectangle) - 1] of TFloatRectangle;
PFloatRectangleArray = ˆTFloatRectangleArray;
TFloatRectangleList = specialize TStructList<TFloatRectangle>;

Description

Functions and Procedures

function Rectangle(const Left, Bottom: Integer; const Width, Height: Cardinal): TRectangle; overload;
 
function Rectangle(const LeftBottom: TVector2Integer; const Width, Height: Cardinal): TRectangle; overload;
 
function FloatRectangle(const Left, Bottom, Width, Height: Single): TFloatRectangle; overload;
 
function FloatRectangle(const R: TRectangle): TFloatRectangle; overload;
 
function FloatRectangle(const LeftBottom: TVector2; const Width, Height: Single): TFloatRectangle; overload;
 

Types

THorizontalPosition = (...);

Horizontal position of one control/rectangle with respect to another.

This is used by TCastleUserInterface.Anchor, TRectangle.Align, TFloatRectangle.Align and other methods to specify the alignment of one control/rectangle with respect to another.

Note that TCastleUserInterface.Anchor has various overloaded versions. E.g. you can align the left side of the control to the left side of the parent (most common situation), or you can align left side of the control to the middle of the parent...

See also
TVerticalPosition
Vertical position of one control/rectangle with respect to another.
Values
  • hpLeft
  • hpMiddle
  • hpRight
TVerticalPosition = (...);

Vertical position of one control/rectangle with respect to another.

See also
THorizontalPosition
Horizontal position of one control/rectangle with respect to another.
Values
  • vpBottom
  • vpMiddle
  • vpTop
PFloatRectangle = ˆTFloatRectangle;
 
TFloatRectangleArray = packed array [0..MaxInt div SizeOf(TFloatRectangle) - 1] of TFloatRectangle;
 
PFloatRectangleArray = ˆTFloatRectangleArray;
 
TFloatRectangleList = specialize TStructList<TFloatRectangle>;
 

Generated by PasDoc 0.16.0.