Class TPHXImageList

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TPHXImageList = class(TObject)

Description

Contains a list of images

Hierarchy

  • TObject
  • TPHXImageList

Overview

Methods

Protected procedure LoadList(const Stream: TStream; const Count: Integer);
Protected procedure SaveList(const Stream: TStream; const Count: Integer);
Protected function GetCount: Integer;
Public constructor Create(ADevice: TPHXDevice; ACanvas: TPHXCanvas);
Public constructor CreateEx;
Public destructor Destroy; override;
Public procedure Clear;
Public function Add: TPHXImage; overload; virtual;
Public function Add(const Name : string): TPHXImage; overload;
Public function Add(const Image: TPHXImage): TPHXImage; overload;
Public procedure Delete(const Index: Integer);
Public procedure Remove(const Image: TPHXImage);
Public function LoadImage(const FileName: String): TPHXImage; overload;
Public function LoadImage(const FileName: String; const Name: string): TPHXImage; overload;
Public function LoadImage(const FileName: String; const Stream: TStream): TPHXImage; overload;
Public procedure LoadImages(const Path: String; const Filter: String = '*.phximg');
Public function IndexOf(const Name: string): Integer;
Public function Find(const Name: string): TPHXImage; overload;
Public function Find(const Name: string; out Image: TPHXImage): Boolean; overload;
Public function Find(const Image: String; const Pattern: String): Integer; overload;

Properties

Public property Device: TPHXDevice read FDevice;
Public property Canvas: TPHXCanvas read FCanvas;
Public property Count: Integer read GetCount;
Public property List: PPointerList read GetList;
Public property Items[Index:Integer]: TPHXImage read GetItem;

Description

Methods

Protected procedure LoadList(const Stream: TStream; const Count: Integer);
 
Protected procedure SaveList(const Stream: TStream; const Count: Integer);
 
Protected function GetCount: Integer;
 
Public constructor Create(ADevice: TPHXDevice; ACanvas: TPHXCanvas);

Creates a new imagelist

Public constructor CreateEx;

Creates a new imagelist without a device or canvas

Public destructor Destroy; override;

Default destructor

Public procedure Clear;

Removes all images from the list.

Public function Add: TPHXImage; overload; virtual;

Add a new image to the imagelist

Public function Add(const Name : string): TPHXImage; overload;

Add a new image to the imagelist with the name

Public function Add(const Image: TPHXImage): TPHXImage; overload;

Add the supplied image to the imagelist

Public procedure Delete(const Index: Integer);

Delete and free a image at a index

Public procedure Remove(const Image: TPHXImage);

Remove and free a image

Public function LoadImage(const FileName: String): TPHXImage; overload;

Add and load a image from a file .

Public function LoadImage(const FileName: String; const Name: string): TPHXImage; overload;

Add and load a image from a file .

Public function LoadImage(const FileName: String; const Stream: TStream): TPHXImage; overload;

Add and load a image from a stream

Public procedure LoadImages(const Path: String; const Filter: String = '*.phximg');

Load all images in a folder

Public function IndexOf(const Name: string): Integer;

Returns the index of a image or -1 if not found.

Public function Find(const Name: string): TPHXImage; overload;

Returns the image with the name if found else nil

Public function Find(const Name: string; out Image: TPHXImage): Boolean; overload;

Find a image in the list, returns true if the image was found.

Public function Find(const Image: String; const Pattern: String): Integer; overload;

Find the index of a pattern in a image, returns -1 if not found

Properties

Public property Device: TPHXDevice read FDevice;

Owning device

Public property Canvas: TPHXCanvas read FCanvas;

Owning canvas

Public property Count: Integer read GetCount;

Number of images in the imagelist.

Public property List: PPointerList read GetList;

Returns the pointer to the internal list

Public property Items[Index:Integer]: TPHXImage read GetItem;

The images.


Generated by PasDoc 0.13.0 on 2013-08-26 11:02:38