Class TAdTexture

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TAdTexture = class(TAdCustomTexture)

Description

TAdTexture extends TAdCustomTexture and contains a bitmap texture. Those textures can be loaded and saved to and from files or streams. You're also able to assign other graphic objects to this class. To support other file types or compressors, you may write your own "format" or "compressor" class.

See also
TAdBitmap
TAdBitmap is the main bitmap class
TAdGraphicCompressor
TAdGraphicCompressor is an abstract class, which allows to save bitmap data using different encoding and compressing technologies.
TAdGraphicFormat
The abstract TAdGraphicFormat class should be used to load various graphic classes into a TAdBitmap.

Hierarchy

Overview

Methods

Public constructor Create(AParent:TAdDraw); override;
Public destructor Destroy; override;
Public procedure Clear; override;
Public procedure Initialize; override;
Public procedure Finalize; override;
Public procedure LoadFromStream(AStream:TStream);
Public procedure SaveToStream(AStream:TStream);
Public procedure LoadFromFile(AFile:string);
Public procedure SaveToFile(AFile:string);
Public procedure LoadFromGraphic(AGraphic:TObject);
Public procedure SaveToGraphic(AGraphic:TObject);
Public procedure LoadGraphicFromFile(AFile: string; Transparent: boolean = true; TransparentColor: Longint = $1FFFFFFF);

Properties

Public property Compressor: TAdGraphicCompressorClass read FCompressorClass write FCompressorClass;
Public property Texture: TAd2dBitmapTexture read GetTexture write SetTexture;

Description

Methods

Public constructor Create(AParent:TAdDraw); override;

Creates a new instance of TAdTexture.

Public destructor Destroy; override;

Destroys the instance of TAdTexture.

Public procedure Clear; override;
 
Public procedure Initialize; override;
 
Public procedure Finalize; override;
 
Public procedure LoadFromStream(AStream:TStream);

Loads the texture from a stream from the Andorra 2D internal file format. The data saved can be compressed using the so called "compressors". This alows game programers to save space and to protect their game data by using their own file format.

See also
TAdGraphicCompressor
TAdGraphicCompressor is an abstract class, which allows to save bitmap data using different encoding and compressing technologies.
Public procedure SaveToStream(AStream:TStream);

Saves the texture to a stream in the Andorra 2D internal file format. The data saved can be compressed using the so called "compressors". This alows game programers to save space and to protect their game data by using their own file format.

See also
TAdGraphicCompressor
TAdGraphicCompressor is an abstract class, which allows to save bitmap data using different encoding and compressing technologies.
Compressor
Specifies the compressor class that should be used when saving the image data.
Public procedure LoadFromFile(AFile:string);

Loads the texture from a file from the Andorra 2D internal file format. The data loaded can be compressed using the so called "compressors". This alows game programers to save space and to protect their game data by using their own file format.

See also
TAdGraphicCompressor
TAdGraphicCompressor is an abstract class, which allows to save bitmap data using different encoding and compressing technologies.
Public procedure SaveToFile(AFile:string);

Saves the texture to a file in the Andorra 2D internal file format. The data saved can be compressed using the so called "compressors". This alows game programers to save space and to protect their game data by using their own file format.

See also
TAdGraphicCompressor
TAdGraphicCompressor is an abstract class, which allows to save bitmap data using different encoding and compressing technologies.
Compressor
Specifies the compressor class that should be used when saving the image data.
Public procedure LoadFromGraphic(AGraphic:TObject);

Loads the graphic of the texture from another graphic object. Which graphic objects are supported depends on the formats that are bound in. Normally you can load your graphic from all VCL/LCL graphic objects.

See also
TAdGraphicFormat
The abstract TAdGraphicFormat class should be used to load various graphic classes into a TAdBitmap.
Public procedure SaveToGraphic(AGraphic:TObject);

Saves the graphic of the texture to another graphic object. Which graphic objects are supported depends on the format classes that are bound in. Normally you can save your graphic to any VCL/LCL graphic classes.

Public procedure LoadGraphicFromFile(AFile: string; Transparent: boolean = true; TransparentColor: Longint = $1FFFFFFF);

Loads the graphic from a file.

Parameters
AFile
is the path to the file that should be loaded.
Transparent
defines whether the alpha channel should be loaded.
TransparentColor
defines which color of the graphic should be transparent. This only works with formats that don't have their own alpha channel. Transparent has to be true for this to work. The default value is clNone ($1FFFFFFF).
See also
TAdGraphicFormat
The abstract TAdGraphicFormat class should be used to load various graphic classes into a TAdBitmap.

Properties

Public property Compressor: TAdGraphicCompressorClass read FCompressorClass write FCompressorClass;

Specifies the compressor class that should be used when saving the image data. When loading an image, the compressor property is automatically set to the compressor class used in this file/stream.

See also
SaveToStream
Saves the texture to a stream in the Andorra 2D internal file format.
SaveToFile
Saves the texture to a file in the Andorra 2D internal file format.
Public property Texture: TAd2dBitmapTexture read GetTexture write SetTexture;
 

SourceForge.net Logo


Generated by PasDoc 0.11.0 on 2008-12-31 14:31:59