Unit CastleRectangles

DescriptionUsesClasses, Interfaces, Objects and RecordsFunctions and ProceduresTypesConstantsVariables

Description

Rectangle representation (TRectangle).

Uses

Overview

Classes, Interfaces, Objects and Records

Name Description
Object TRectangle 2D rectangle with integer coordinates.
Class TRectangleList  

Functions and Procedures

function Rectangle(const Left, Bottom: Integer; const Width, Height: Cardinal): TRectangle;
function Rectangle(const LeftBottom: TVector2Integer; const Width, Height: Cardinal): TRectangle;

Types

THorizontalPosition = (...);
TVerticalPosition = (...);

Description

Functions and Procedures

function Rectangle(const Left, Bottom: Integer; const Width, Height: Cardinal): TRectangle;
 
function Rectangle(const LeftBottom: TVector2Integer; const Width, Height: Cardinal): TRectangle;
 

Types

THorizontalPosition = (...);

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

This is used by TUIRectangularControl.Align and TRectangle.Align to specify the alignment of one control/rectangle with respect to another. In case of TUIRectangularControl.Align, this specifies the align of control with respect to the container (TCastleWindow or TCastleControl).

This is used to talk about position of the control and the container.

  1. When we talk about the position of the control (for example ControlPosition for TUIRectangularControl.Align), it determines which border of the control to align.

  2. When we talk about the position of the container (for example ContainerPosition for TUIRectangularControl.Align), this specifies the container border.

In most cases you use equal both control and container borders. For example, both ControlPosition and ContainerPosition are usually equal for TUIControlPos.Align call. This allows to align left control edge to left container edge, or right control edge to right container edge, or to center control within the container — which is the most common usage.

  • If both are prLeft, then X specifies position of left control border relative to left container border. X should be >= 0 if you want to see the control completely within the container.

  • If both are prMiddle, then X (most often just 0) specifies the shift between container middle to control middle. If X is zero, then control is just in the middle of the container.

  • If both are prRight, then X specifies position of right control border relative to right container border. X should be <= 0 if you want to see the control completely within the container.

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:  

Generated by PasDoc 0.14.0.