Description | Hierarchy | Fields | Methods | Properties |
type TAdCustomImage = class(TAdRenderingObject)
TAdCustomImage is the base image class. Images are objects, that manage drawing operations of texturized planes. TAdCustomImage doesn't generate its own texture object. If you want to use a bitmap texture, use TAdImage instead. TAdCustomImage is able to draw the image stretched, rotated, blended. You are also able to draw an excerpt of the image.
AdMesh:TAd2DMesh; |
constructor Create(AAdDraw:TAdDraw); virtual; |
|
destructor Destroy; override; |
|
procedure Draw(Dest:TAdSurface;X,Y,PatternIndex:integer); |
|
procedure StretchDraw(Dest:TAdSurface; const DestRect:TAdRect; PatternIndex:integer); |
|
procedure DrawAdd(Dest: TAdSurface; const DestRect: TAdRect; PatternIndex: Integer; Alpha: Integer); |
|
procedure DrawAlpha(Dest: TAdSurface; const DestRect: TAdRect; PatternIndex: Integer; Alpha: Integer); |
|
procedure DrawMask(Dest: TAdSurface; const DestRect: TAdRect; PatternIndex: Integer; Alpha: Integer); |
|
procedure DrawRotate(Dest: TAdSurface; X, Y, Width, Height: Integer; PatternIndex: Integer; CenterX, CenterY: Double; Angle: Integer); |
|
procedure DrawRotateAdd(Dest: TAdSurface; X, Y, Width, Height: Integer; PatternIndex: Integer; CenterX, CenterY: Double; Angle: Integer; Alpha: Integer); |
|
procedure DrawRotateAlpha(Dest: TAdSurface; X, Y, Width, Height: integer; PatternIndex: integer; CenterX, CenterY: double; Angle: integer; Alpha: integer); |
|
procedure DrawRotateMask(Dest: TAdSurface; X, Y, Width, Height: integer; PatternIndex: integer; CenterX, CenterY: double; Angle: integer; Alpha: integer); |
|
procedure DrawEx(Dest: TAdSurface; SourceRect, DestRect: TAdRect; CenterX, CenterY: double; Angle: integer; Alpha: integer; BlendMode: TAd2dBlendMode); |
|
procedure Restore; |
|
procedure Finalize; |
|
procedure Initialize; |
|
function GetPatternRect(ANr: integer):TAdRect; |
property Parent: TAdDraw read FParent write FParent; |
|
property Width: integer read GetWidth; |
|
property Height: integer read GetHeight; |
|
property PatternWidth: integer read FPatternWidth write SetPatternWidth; |
|
property PatternHeight: integer read FPatternHeight write SetPatternHeight; |
|
property SkipWidth: integer read FSkipWidth write SetSkipWidth; |
|
property SkipHeight: integer read FSkipHeight write SetSkipHeight; |
|
property Texture: TAdCustomTexture read FTexture write SetTexture; |
|
property PatternCount: integer read GetPatternCount; |
|
property PatternStop: integer read FPatternStop write FPatternStop; |
|
property Color: longint read FColor write FColor; |
|
property Details: integer read FDetails write SetDetails; |
|
property Filter: TAd2dTextureFilter read GetFilter write SetFilter; |
AdMesh:TAd2DMesh; |
|
The underlying mesh object used to display the image. |
constructor Create(AAdDraw:TAdDraw); virtual; |
|
Creates a new instance of TAdCustomImage. Parameters
|
destructor Destroy; override; |
|
Destroys the instance of TAdCustomImage. |
procedure Draw(Dest:TAdSurface;X,Y,PatternIndex:integer); |
|
Draws the image at a specified position. All positions are relative to the coordinate system of the scene of the surface. Parameters
See also
|
procedure StretchDraw(Dest:TAdSurface; const DestRect:TAdRect; PatternIndex:integer); |
|
Draws the image to the specified rectangular region. All positions are relative to the coordinate system of the scene of the surface. Parameters
See also
|
procedure DrawAdd(Dest: TAdSurface; const DestRect: TAdRect; PatternIndex: Integer; Alpha: Integer); |
|
Draws the image to the specified rectangular region using additive blending. All positions are relative to the coordinate system of the scene of the surface. Parameters
See also
|
procedure DrawAlpha(Dest: TAdSurface; const DestRect: TAdRect; PatternIndex: Integer; Alpha: Integer); |
|
Draws the image to the specified rectangular region using alpha blending. All positions are relative to the coordinate system of the scene of the surface. Parameters
See also
|
procedure DrawMask(Dest: TAdSurface; const DestRect: TAdRect; PatternIndex: Integer; Alpha: Integer); |
|
Draws the image to the specified rectangular region. This special blend mode draws the alpha channel only. So this blend mode can be used for drawing shadows. All positions are relative to the coordinate system of the scene of the surface. Parameters
See also
|
procedure DrawRotate(Dest: TAdSurface; X, Y, Width, Height: Integer; PatternIndex: Integer; CenterX, CenterY: Double; Angle: Integer); |
|
Draws the image to the specified rectangular region. The image can be rotated around a user defined rotation center. All positions are relative to the coordinate system of the scene of the surface. Parameters
See also
|
procedure DrawRotateAdd(Dest: TAdSurface; X, Y, Width, Height: Integer; PatternIndex: Integer; CenterX, CenterY: Double; Angle: Integer; Alpha: Integer); |
|
Draws the image to the specified rectangular region. The image can be rotated around a user defined rotation center. The image is drawn using additive blending. All positions are relative to the coordinate system of the scene of the surface. Parameters
See also
|
procedure DrawRotateAlpha(Dest: TAdSurface; X, Y, Width, Height: integer; PatternIndex: integer; CenterX, CenterY: double; Angle: integer; Alpha: integer); |
|
Draws the image to the specified rectangular region. The image can be rotated around a user defined rotation center. The image is drawn using aplha blending. All positions are relative to the coordinate system of the scene of the surface. Parameters
See also
|
procedure DrawRotateMask(Dest: TAdSurface; X, Y, Width, Height: integer; PatternIndex: integer; CenterX, CenterY: double; Angle: integer; Alpha: integer); |
|
Draws the image to the specified rectangular region. The image can be rotated around a user defined rotation center. The image is drawn using the so called "mask" mode. This special blend mode draws the alpha channel only. So this blend mode can be used for drawing shadows. All positions are relative to the coordinate system of the scene of the surface. Parameters
See also
|
procedure DrawEx(Dest: TAdSurface; SourceRect, DestRect: TAdRect; CenterX, CenterY: double; Angle: integer; Alpha: integer; BlendMode: TAd2dBlendMode); |
|
The DrawEx function can be used to draw a specific part of an image with a user definded rotation and in every available blendmode. All other drawing functions can be done using this function. If you want to do animations you can use the "GetPatternRect" function of TAdCustomImage and pass it to SourceRect. Parameters
See also
|
procedure Restore; |
|
If you make any changes to the texture or set a new one, call restore to assing the new texture to the mesh and recalculates the pattern rects and the vertex grid. |
procedure Finalize; |
|
Frees the mesh object. Finalize is normally automatically called when the main TAdDraw is finalized. See also
|
procedure Initialize; |
|
Initialize creates a new mesh object. |
function GetPatternRect(ANr: integer):TAdRect; |
|
Returns the texture rectangle of a pattern. ANr is clamped to [0;PatternCount] |
property Parent: TAdDraw read FParent write FParent; |
|
Returns the parent TAdDraw you've set in the constructor. |
property Width: integer read GetWidth; |
|
Returns the width of the image. If pattern width and pattern height is set, this size is returned. |
property Height: integer read GetHeight; |
|
Returns the height of the image. If pattern width and pattern height is set, this size is returned. |
property PatternWidth: integer read FPatternWidth write SetPatternWidth; |
|
Set the width of one animation pattern. |
property PatternHeight: integer read FPatternHeight write SetPatternHeight; |
|
Set the height of one animation pattern. |
property SkipWidth: integer read FSkipWidth write SetSkipWidth; |
|
The horizontal space between the animation patterns. |
property SkipHeight: integer read FSkipHeight write SetSkipHeight; |
|
The vertical space between the animation patterns. |
property Texture: TAdCustomTexture read FTexture write SetTexture; |
|
The texture assigned to the image. Call restore after you've set a new texture. See also
|
property PatternCount: integer read GetPatternCount; |
|
Returns the count of animation patterns. See also
|
property PatternStop: integer read FPatternStop write FPatternStop; |
|
If you have empty patterns, you may set PatternStop. PatternCount will be decrased by PatternStop. See also
|
property Color: longint read FColor write FColor; |
|
Defines the color the image is drawn in. The color is in BGR order and compatible to the color constants in the VCL/LCL. |
property Details: integer read FDetails write SetDetails; |
|
Important for using lights: How many grid cols and rows does the image have. Grid count is Details*Details. |
property Filter: TAd2dTextureFilter read GetFilter write SetFilter; |
|
The filter that should be used when a texture is mini- or magnified. Setting this property will cause in overriding the filter of the texture. See also
|