Class TBGRAAvgLvlPalette

Unit

Declaration

type TBGRAAvgLvlPalette = class(TBGRACustomPalette)

Description

Abstract implementation of a BGRA palette using a binary tree.

It ensures relatively fast and average access time even with many entries.

Hierarchy

Overview

Fields

Protected FArray: array of PBGRAPixel;
Protected FLastAddedColorCount: integer;
Protected FLastAddedColors: packed[0..MaxLastAddedColors-1] of PBGRAPixel;
Protected FTree: TAVLTree;

Methods

Public constructor Create; overload;
Public destructor Destroy; override;
Public function ContainsColor(AValue: TBGRAPixel): boolean; override;
Public function GetAsArrayOfColor: ArrayOfTBGRAPixel; override;
Public function GetAsArrayOfWeightedColor: ArrayOfWeightedColor; override;
Public function IndexOfColor(AValue: TBGRAPixel): integer; override;
Protected function GetColorByIndex(AIndex: integer): TBGRAPixel; override;
Protected function GetCount: integer; override;
Protected function GetLastColor(AValue: TBGRAPixel): PBGRAPixel;
Public procedure Clear; virtual;
Protected procedure AddLastColor(AColor: PBGRAPixel);
Protected procedure ClearArray; virtual;
Protected procedure ClearLastColors;
Protected procedure FreeEntry(AEntry: PBGRAPixel); virtual; abstract;
Protected procedure NeedArray; virtual;

Description

Fields

Protected FArray: array of PBGRAPixel;

This item has no description.

Protected FLastAddedColorCount: integer;

This item has no description.

Protected FLastAddedColors: packed[0..MaxLastAddedColors-1] of PBGRAPixel;

This item has no description.

Protected FTree: TAVLTree;

This item has no description.

Methods

Public constructor Create; overload;

This item has no description.

Public destructor Destroy; override;

This item has no description.

Public function ContainsColor(AValue: TBGRAPixel): boolean; override;

This item has no description.

Public function GetAsArrayOfColor: ArrayOfTBGRAPixel; override;

This item has no description.

Public function GetAsArrayOfWeightedColor: ArrayOfWeightedColor; override;

This item has no description.

Public function IndexOfColor(AValue: TBGRAPixel): integer; override;

This item has no description.

Protected function GetColorByIndex(AIndex: integer): TBGRAPixel; override;

This item has no description.

Protected function GetCount: integer; override;

This item has no description.

Protected function GetLastColor(AValue: TBGRAPixel): PBGRAPixel;

This item has no description.

Public procedure Clear; virtual;

This item has no description.

Protected procedure AddLastColor(AColor: PBGRAPixel);

This item has no description.

Protected procedure ClearArray; virtual;

This item has no description.

Protected procedure ClearLastColors;

This item has no description.

Protected procedure FreeEntry(AEntry: PBGRAPixel); virtual; abstract;

This item has no description.

Protected procedure NeedArray; virtual;

This item has no description.