Class TAdImageList

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TAdImageList = class(TAdList)

Description

A list of TAdImage objects. The whole image list can be saved and loaded from a single file. To create such an imagelist file you can use the tool "imgedit".

Hierarchy

Overview

Methods

Public constructor Create(AAdDraw:TAdDraw);
Public destructor Destroy; override;
Public function Add(AName: AnsiString):TAdImage; overload;
Public function IndexOf(AName: AnsiString):integer;
Public function Find(AName: AnsiString):TAdImage;
Public function FindEx(ASubStr: AnsiString):TAdImageList;
Public procedure Restore;
Public procedure SaveToStream(AStream:TStream);
Public procedure LoadFromStream(AStream:TStream);
Public procedure SaveToFile(AFile:string);
Public procedure LoadFromFile(AFile:string);

Properties

Public property Items[AIndex:integer]: TAdImage read GetItem write SetItem;
Public property Parent: TAdDraw read FParent;
Public property Compressor: TAdGraphicCompressorClass read FCompressor write SetCompressor;
Public property Filter: TAd2dTextureFilter read FFilter write SetFilter;

Description

Methods

Public constructor Create(AAdDraw:TAdDraw);

Creates a new instance of TAdImageList.

Public destructor Destroy; override;

Frees the instance of TAdImageList. Images that were created by the imagelist are freed too.

See also
TAdImage.FreeByList
Contains a pointer to the image list which created the image.
Public function Add(AName: AnsiString):TAdImage; overload;

Creates and adds a new image item to the list. This item will automatically freed by the list.

See also
TAdImage.FreeByList
Contains a pointer to the image list which created the image.
Public function IndexOf(AName: AnsiString):integer;

Searches for an item by name and returns its index.

Public function Find(AName: AnsiString):TAdImage;

Finds an image in the list by its name.

Public function FindEx(ASubStr: AnsiString):TAdImageList;

Returns a new imagelist, that contains all images containing the given substring. The returned imagelist has to be freed manually.

Public procedure Restore;

Calls the restore function of every item in the list.

Public procedure SaveToStream(AStream:TStream);

Save the whole list to a stream.

Public procedure LoadFromStream(AStream:TStream);

Load a whole list from a stream.

Public procedure SaveToFile(AFile:string);

Saves the whole list to a file.

Public procedure LoadFromFile(AFile:string);

Loads a whole list from a file.

Properties

Public property Items[AIndex:integer]: TAdImage read GetItem write SetItem;

Returns an image item to you.

Public property Parent: TAdDraw read FParent;

The parent TAdDraw you've specified in the constructor.

Public property Compressor: TAdGraphicCompressorClass read FCompressor write SetCompressor;

Apply the same graphic compressor class to each item in the list.

Public property Filter: TAd2dTextureFilter read FFilter write SetFilter;

Texture filter that should be applied to all images in the list. By setting this property, the filter property of all image items is overwritten.

SourceForge.net Logo


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