Class TPixelSurfaces

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TPixelSurfaces = class(TObject)

Description

List of TPixelSurface elements with a function of quickly finding by unique name.

Hierarchy

  • TObject
  • TPixelSurfaces

Overview

Methods

Public function Add(const SurfaceName: StdString = ''): Integer;
Public function IndexOf(const SurfaceName: StdString): Integer;
Public function Insert(const Surface: TPixelSurface): Integer;
Protected function CreatePixelSurface(const SurfaceName: StdString): TPixelSurface; virtual;
Public procedure Clear;
Public procedure Remove(const Index: Integer);

Properties

Public property Count: Integer read GetCount write SetCount;
Public property Items[constIndex:Integer]: TPixelSurface read GetItem;
Public property Surface[constName:StdString]: TPixelSurface read GetSurface;

Description

Methods

Public function Add(const SurfaceName: StdString = ''): Integer;

Inserts a new surface with given name to the list and returns its index.

Public function IndexOf(const SurfaceName: StdString): Integer;

Returns index of the surface with given name if such exists or -1 otherwise.

Public function Insert(const Surface: TPixelSurface): Integer;

Inserts given surface element to the list and returns its index.

Protected function CreatePixelSurface(const SurfaceName: StdString): TPixelSurface; virtual;

Creates a new instance of TPixelSurface when called by Add method. This resembles factory pattern and provides a way to instantiate extended TPixelSurface classes, for example, in hardware-assisted implementations.

Public procedure Clear;

Removes all elements from the list.

Public procedure Remove(const Index: Integer);

Removes element with specified index from the list.

Properties

Public property Count: Integer read GetCount write SetCount;

Determines how many surfaces are in the list.

Public property Items[constIndex:Integer]: TPixelSurface read GetItem;

Provides access to individual surface elements by their index.

Public property Surface[constName:StdString]: TPixelSurface read GetSurface;

Provides reference to the surface with given name. If no surface with such name exists, Nil is returned.


Copyright © 2000 - 2017 Yuriy Kotsarenko. Help files generated by PasDoc.