Class TCastleImageTransform
Unit
Declaration
type TCastleImageTransform = class(TCastleTransform)
Description
Image (that you can place within TCastleViewport) with configurable size and repeat. Positioned in XY plane by defalut, so most suitable for 2D games.
Hierarchy
- TObject
- TPersistent
- TComponent
- TCastleComponent
- TCastleTransform
- TCastleImageTransform
Overview
Methods
constructor Create(AOwner: TComponent); override; |
|
destructor Destroy; override; |
|
function PropertySections(const PropertyName: String): TPropertySections; override; |
Properties
property Pivot: TVector2 read FPivot write SetPivot; |
|
property Size: TVector2 read FSize write SetSize; |
|
property RepeatImage: TVector2 read FRepeatImage write SetRepeatImage; |
|
property Shift: TVector2 read FShift write SetShift; |
|
property Color: TCastleColor read FColor write SetColor; |
|
property SmoothScaling: Boolean read FSmoothScaling write SetSmoothScaling default true; |
|
property AlphaChannel: TAutoAlphaChannel read FAlphaChannel write SetAlphaChannel default acAuto; |
|
property Url: String read FUrl write SetUrl; |
|
property Mipmaps: Boolean read FMipmaps write SetMipmaps default false; |
|
property PivotPersistent: TCastleVector2Persistent read FPivotPersistent ; |
|
property SizePersistent: TCastleVector2Persistent read FSizePersistent ; |
|
property RepeatImagePersistent: TCastleVector2Persistent read FRepeatImagePersistent ; |
|
property ShiftPersistent: TCastleVector2Persistent read FShiftPersistent ; |
|
property ColorPersistent: TCastleColorPersistent read FColorPersistent ; |
Description
Methods
constructor Create(AOwner: TComponent); override; |
|
destructor Destroy; override; |
|
function PropertySections(const PropertyName: String): TPropertySections; override; |
|
Properties
property Pivot: TVector2 read FPivot write SetPivot; |
|
How is the image placed within its own coordinate system. Default value (0.5, 0.5) means that the middle of the image is at (0,0,0). Value (0, 0) means that the left-bottom corner of the image is at (0,0,0). |
property Size: TVector2 read FSize write SetSize; |
|
Optionally resize the image. This is equivalent o using TCastleTransform.Scale to scale the image, except you can specify a value in terms of image size (in image pixels).
The size determines the size assuming that RepeatImage is (1,1). When RepeatImage is different – the size is actually multiplied by the RepeatImage. This makes it easy to create a continuous block of images by just increasing RepeatImage. |
property RepeatImage: TVector2 read FRepeatImage write SetRepeatImage; |
|
How many times to repeat the image, along X and Y. By default this is (1,1). |
property Shift: TVector2 read FShift write SetShift; |
|
How is the image shifted. This just shifts the texture coordinates, not moving the geometry. By default this is (0,0). |
property Color: TCastleColor read FColor write SetColor; |
|
Color to multiply by image. By default, opaque white. |
property SmoothScaling: Boolean read FSmoothScaling write SetSmoothScaling default true; |
|
How is the image scaled. Determines scaling done both by Size and TCastleTransform.Scale. |
property AlphaChannel: TAutoAlphaChannel read FAlphaChannel write SetAlphaChannel default acAuto; |
|
How to treat alpha channel of the image. By default, this is acAuto, which means that image contents together with current Color determine how the alpha of image is treated (opaque, alpha test, alpha blending). Set this property force specific treatment. |
property Url: String read FUrl write SetUrl; |
|
|
property PivotPersistent: TCastleVector2Persistent read FPivotPersistent ; |
|
Pivot that can be visually edited in Castle Game Engine Editor, Lazarus and Delphi. Normal user code does not need to deal with this, instead read or write Pivot directly. See also
|
property SizePersistent: TCastleVector2Persistent read FSizePersistent ; |
|
Size that can be visually edited in Castle Game Engine Editor, Lazarus and Delphi. Normal user code does not need to deal with this, instead read or write Size directly. See also
|
property RepeatImagePersistent: TCastleVector2Persistent read FRepeatImagePersistent ; |
|
RepeatImage that can be visually edited in Castle Game Engine Editor, Lazarus and Delphi. Normal user code does not need to deal with this, instead read or write RepeatImage directly. See also
|
property ShiftPersistent: TCastleVector2Persistent read FShiftPersistent ; |
|
Shift that can be visually edited in Castle Game Engine Editor, Lazarus and Delphi. Normal user code does not need to deal with this, instead read or write Shift directly. See also
|
property ColorPersistent: TCastleColorPersistent read FColorPersistent ; |
|
Color that can be visually edited in Castle Game Engine Editor, Lazarus and Delphi. Normal user code does not need to deal with this, instead read or write Color directly. See also
|
Generated by PasDoc 0.16.0.