Class TGrayscaleAlphaImage

Unit

Declaration

type TGrayscaleAlphaImage = class(TCastleImage)

Description

Grayscale image with an alpha channel. Each pixel is two bytes: grayscale + alpha.

Hierarchy

Overview

Methods

Protected procedure DrawFromCore(Source: TCastleImage; X, Y, SourceX, SourceY, SourceWidth, SourceHeight: Integer; const Mode: TDrawMode); override;
Protected function GetColors(const X, Y, Z: Integer): TCastleColor; override;
Protected procedure SetColors(const X, Y, Z: Integer; const C: TCastleColor); override;
Public class function PixelSize: Cardinal; override;
Public class function ColorComponentsCount: Cardinal; override;
Public function ToGrayscaleImage: TGrayscaleImage; deprecated 'create TGrayscaleImage and use TGrayscaleImage.Assign';
Public function PixelPtr(const X, Y: Cardinal; const Z: Cardinal = 0): PVector2Byte;
Public function RowPtr(const Y: Cardinal; const Z: Cardinal = 0): PVector2ByteArray;
Public procedure InvertColors; override;
Public procedure Clear(const Pixel: TVector4Byte); override;
Public function IsClear(const Pixel: TVector4Byte): boolean; override;
Public procedure Clear(const Pixel: TVector2Byte); reintroduce; overload;
Public function IsClear(const Pixel: TVector2Byte): boolean; reintroduce; overload;
Public function HasAlpha: boolean; override;
Public function AlphaChannel( const AlphaTolerance: Byte): TAlphaChannel; override;
Public function ToFpImage: TInternalCastleFpImage; override;
Public procedure LerpWith(const Value: Single; SecondImage: TCastleImage); override;
Public class procedure MixColors(const OutputColor: Pointer; const Weights: TVector4; const AColors: TVector4Pointer); override;
Public procedure Assign(const Source: TCastleImage); override;
Public procedure FillEllipse(const x, y: single; const aRadiusX, aRadiusY: single; const aColor: TCastleColor); override;
Public procedure Ellipse(const x, y: single; const aRadiusX, aRadiusY: single; const aWidth: single; const aColor: TCastleColor); override;
Public procedure FillRectangle(const x1, y1, x2, y2: single; const aColor: TCastleColor); override;
Public procedure Rectangle(const x1, y1, x2, y2: single; const aWidth: single; const aColor: TCastleColor); override;
Public procedure Line(const x1, y1, x2, y2: single; const aWidth: single; const aColor: TCastleColor); override;

Properties

Public property Pixels: PVector2Byte read GetPixels;
Public property GrayscaleAlphaPixels: PVector2Byte read GetPixels; deprecated 'use Pixels';
Public property PixelsArray: PVector2ByteArray read GetPixelsArray;

Description

Methods

Protected procedure DrawFromCore(Source: TCastleImage; X, Y, SourceX, SourceY, SourceWidth, SourceHeight: Integer; const Mode: TDrawMode); override;
 
Protected function GetColors(const X, Y, Z: Integer): TCastleColor; override;
 
Protected procedure SetColors(const X, Y, Z: Integer; const C: TCastleColor); override;
 
Public class function PixelSize: Cardinal; override;
 
Public class function ColorComponentsCount: Cardinal; override;
 
Public function ToGrayscaleImage: TGrayscaleImage; deprecated 'create TGrayscaleImage and use TGrayscaleImage.Assign';

Warning: this symbol is deprecated: create TGrayscaleImage and use TGrayscaleImage.Assign

Remove alpha channel.

Public function PixelPtr(const X, Y: Cardinal; const Z: Cardinal = 0): PVector2Byte;
 
Public function RowPtr(const Y: Cardinal; const Z: Cardinal = 0): PVector2ByteArray;
 
Public procedure InvertColors; override;
 
Public procedure Clear(const Pixel: TVector4Byte); override;
 
Public function IsClear(const Pixel: TVector4Byte): boolean; override;
 
Public procedure Clear(const Pixel: TVector2Byte); reintroduce; overload;
 
Public function IsClear(const Pixel: TVector2Byte): boolean; reintroduce; overload;
 
Public function HasAlpha: boolean; override;
 
Public function AlphaChannel( const AlphaTolerance: Byte): TAlphaChannel; override;
 
Public function ToFpImage: TInternalCastleFpImage; override;
 
Public procedure LerpWith(const Value: Single; SecondImage: TCastleImage); override;
 
Public class procedure MixColors(const OutputColor: Pointer; const Weights: TVector4; const AColors: TVector4Pointer); override;
 
Public procedure Assign(const Source: TCastleImage); override;
 
Public procedure FillEllipse(const x, y: single; const aRadiusX, aRadiusY: single; const aColor: TCastleColor); override;

TODO: this should be implemented, just like for TRGBAlphaImage procedure AlphaBleed(const ProgressTitle: string = ''); override; function MakeAlphaBleed(const ProgressTitle: string = ''): TCastleImage; override;

Public procedure Ellipse(const x, y: single; const aRadiusX, aRadiusY: single; const aWidth: single; const aColor: TCastleColor); override;
 
Public procedure FillRectangle(const x1, y1, x2, y2: single; const aColor: TCastleColor); override;
 
Public procedure Rectangle(const x1, y1, x2, y2: single; const aWidth: single; const aColor: TCastleColor); override;
 
Public procedure Line(const x1, y1, x2, y2: single; const aWidth: single; const aColor: TCastleColor); override;
 

Properties

Public property Pixels: PVector2Byte read GetPixels;

Pointer to pixels. Same as RawPixels, only typecasted to PVector2Byte.

Public property GrayscaleAlphaPixels: PVector2Byte read GetPixels; deprecated 'use Pixels';

Warning: this symbol is deprecated: use Pixels

 
Public property PixelsArray: PVector2ByteArray read GetPixelsArray;

Pointer to pixels. Same as RawPixels, only typecasted to PVector2ByteArray.


Generated by PasDoc 0.16.0.