The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



Class TColorArray


Unit: SDL_sdlcolors
Class: none
Declaration:
TColorArray = class (TComponent)
  private
    ... (removed for brevity)
  protected
  public
    constructor Create (AOwner: TComponent); override;
    destructor  Destroy; override;
    property  ColorElem[ix: longint]: TColor;
    procedure Changed;
    procedure FillByInterpolation (DiscreteLevels: integer;
                  Colors: array of TColor);
    procedure CopyFrom (ColArraySource: TColorArray;
                  SourceElemLo, SourceElemHi, DestElem: integer);
    function  LoadFromFile (FileName: string;
                  AdjustSize: boolean): boolean;
    function  StoreOnFile (FirstElem, LastElem: integer;
                  FileName:string): boolean;
  published
    property  Size: integer read FNColors write SetSize;
    property  OnChange: TNotifyEvent read FOnChange write FOnChange;
  end;

The TColorArray class allows to handle arrays of colors. The class TColorArray is an abstraction of a vector of n colors which can be indexed by a pointer between 1 and the size of the color array.



Last Update: 2012-Oct-20