Class TBGRACustomGradient

Unit

Declaration

type TBGRACustomGradient = class(TObject)

Description

Defines a gradient of color, not specifying its shape but only the series of colors

Hierarchy

Overview

Methods

Public function GetAverageColor: TBGRAPixel; virtual; abstract;
Public function GetAverageExpandedColor: TExpandedPixel; virtual;
Public function GetColorAt(position: integer): TBGRAPixel; virtual; abstract;
Public function GetColorAtF(position: single): TBGRAPixel; virtual;
Public function GetExpandedColorAt(position: integer): TExpandedPixel; virtual;
Public function GetExpandedColorAtF(position: single): TExpandedPixel; virtual;
Public function GetMonochrome: boolean; virtual; abstract;

Properties

Public property Monochrome: boolean read GetMonochrome;

Description

Methods

Public function GetAverageColor: TBGRAPixel; virtual; abstract;

Returns the average color of the gradient

Public function GetAverageExpandedColor: TExpandedPixel; virtual;

Returns the average expanded color of the gradient

Public function GetColorAt(position: integer): TBGRAPixel; virtual; abstract;

Returns the color at a given position. The reference range is from 0 to 65535, however values beyond are possible as well

Public function GetColorAtF(position: single): TBGRAPixel; virtual;

Returns the color at a given position. The reference range is from 0 to 1, however values beyond are possible as well

Public function GetExpandedColorAt(position: integer): TExpandedPixel; virtual;

Returns the expanded color at a given position. The reference range is from 0 to 65535, however values beyond are possible as well

Public function GetExpandedColorAtF(position: single): TExpandedPixel; virtual;

Returns the expanded color at a given position. The reference range is from 0 to 1, however values beyond are possible as well

Public function GetMonochrome: boolean; virtual; abstract;

Returns whether the gradient has only one color

Properties

Public property Monochrome: boolean read GetMonochrome;

If the gradient contains only one color and thus is not really a gradient