Class TRGBAlphaImage
Unit
Declaration
type TRGBAlphaImage = class(TCastleImage)
Description
Image with each pixel stored as 4 bytes: RGB (color) and alpha (opacity).
Hierarchy
- TObject
- TEncodedImage
- TCastleImage
- TRGBAlphaImage
Overview
Methods
![]() |
procedure DrawFromCore(Source: TCastleImage; X, Y, SourceX, SourceY, SourceWidth, SourceHeight: Integer; const Mode: TDrawMode); override; |
![]() |
function GetColors(const X, Y, Z: Integer): TCastleColor; override; |
![]() |
procedure SetColors(const X, Y, Z: Integer; const C: TCastleColor); override; |
![]() |
class function PixelSize: Cardinal; override; |
![]() |
class function ColorComponentsCount: Cardinal; override; |
![]() |
function PixelPtr(const X, Y: Cardinal; const Z: Cardinal = 0): PVector4Byte; |
![]() |
function RowPtr(const Y: Cardinal; const Z: Cardinal = 0): PVector4ByteArray; |
![]() |
procedure InvertColors; override; |
![]() |
procedure Clear(const Pixel: TVector4Byte); override; |
![]() |
function IsClear(const Pixel: TVector4Byte): boolean; override; |
![]() |
procedure ClearAlpha(const Alpha: Byte); |
![]() |
procedure TransformRGB(const Matrix: TMatrix3); override; |
![]() |
procedure ModulateRGB(const ColorModulator: TColorModulatorByteFunc); override; |
![]() |
procedure AlphaDecide(const AlphaColor: TVector3Byte; Tolerance: Byte; AlphaOnColor: Byte; AlphaOnNoColor: Byte); |
![]() |
procedure Compose(RGB: TRGBImage; AGrayscale: TGrayscaleImage); |
![]() |
function HasAlpha: boolean; override; |
![]() |
function AlphaChannel( const AlphaTolerance: Byte): TAlphaChannel; override; |
![]() |
procedure LerpWith(const Value: Single; SecondImage: TCastleImage); override; |
![]() |
class procedure MixColors(const OutputColor: Pointer; const Weights: TVector4; const AColors: TVector4Pointer); override; |
![]() |
procedure Assign(const Source: TCastleImage); override; |
![]() |
function ToRGBImage: TRGBImage; deprecated 'create TRGBImage and use TRGBImage.Assign'; |
![]() |
function ToGrayscaleAlphaImage: TGrayscaleAlphaImage; deprecated 'create TGrayscaleAlphaImage and use TGrayscaleAlphaImage.Assign'; |
![]() |
function ToGrayscaleImage: TGrayscaleImage; deprecated 'create TGrayscaleImage and use TGrayscaleImage.Assign'; |
![]() |
function ToFpImage: TInternalCastleFpImage; override; |
![]() |
procedure PremultiplyAlpha; |
![]() |
procedure AlphaBleed(const ProgressTitle: string = ''); override; |
![]() |
function MakeAlphaBleed(const ProgressTitle: string = ''): TCastleImage; override; |
![]() |
procedure FillEllipse(const x, y: single; const aRadiusX, aRadiusY: single; const aColor: TCastleColor); override; |
![]() |
procedure Ellipse(const x, y: single; const aRadiusX, aRadiusY: single; const aWidth: single; const aColor: TCastleColor); override; |
![]() |
procedure FillRectangle(const x1, y1, x2, y2: single; const aColor: TCastleColor); override; |
![]() |
procedure Rectangle(const x1, y1, x2, y2: single; const aWidth: single; const aColor: TCastleColor); override; |
![]() |
procedure Line(const x1, y1, x2, y2: single; const aWidth: single; const aColor: TCastleColor); override; |
Properties
![]() |
property Pixels: PVector4Byte read GetPixels; |
![]() |
property AlphaPixels: PVector4Byte read GetPixels; deprecated 'use Pixels'; |
![]() |
property PixelsArray: PVector4ByteArray read GetPixelsArray; |
![]() |
property PremultipliedAlpha: boolean read FPremultipliedAlpha; |
Description
Methods
![]() |
procedure DrawFromCore(Source: TCastleImage; X, Y, SourceX, SourceY, SourceWidth, SourceHeight: Integer; const Mode: TDrawMode); override; |
![]() |
function GetColors(const X, Y, Z: Integer): TCastleColor; override; |
![]() |
procedure SetColors(const X, Y, Z: Integer; const C: TCastleColor); override; |
![]() |
class function PixelSize: Cardinal; override; |
![]() |
class function ColorComponentsCount: Cardinal; override; |
![]() |
function PixelPtr(const X, Y: Cardinal; const Z: Cardinal = 0): PVector4Byte; |
![]() |
function RowPtr(const Y: Cardinal; const Z: Cardinal = 0): PVector4ByteArray; |
![]() |
procedure InvertColors; override; |
![]() |
procedure Clear(const Pixel: TVector4Byte); override; |
![]() |
function IsClear(const Pixel: TVector4Byte): boolean; override; |
![]() |
procedure ClearAlpha(const Alpha: Byte); |
Set alpha channel on every pixel to the same given value. |
![]() |
procedure TransformRGB(const Matrix: TMatrix3); override; |
![]() |
procedure ModulateRGB(const ColorModulator: TColorModulatorByteFunc); override; |
![]() |
procedure AlphaDecide(const AlphaColor: TVector3Byte; Tolerance: Byte; AlphaOnColor: Byte; AlphaOnNoColor: Byte); |
Set alpha of every pixel to either AlphaOnColor (when color of pixel is equal to AlphaColor with Tolerance, see EqualRGB) or AlphaOnNoColor. |
![]() |
procedure Compose(RGB: TRGBImage; AGrayscale: TGrayscaleImage); |
Copy RGB contents from one image, and alpha contents from the other. RGB channels are copied from the RGB image, alpha channel is copied from the Grayscale image. Given RGB and Grayscale images must have the same size, and this is the resulting size of this image after Compose call. |
![]() |
function HasAlpha: boolean; override; |
![]() |
function AlphaChannel( const AlphaTolerance: Byte): TAlphaChannel; override; |
![]() |
procedure LerpWith(const Value: Single; SecondImage: TCastleImage); override; |
![]() |
class procedure MixColors(const OutputColor: Pointer; const Weights: TVector4; const AColors: TVector4Pointer); override; |
![]() |
procedure Assign(const Source: TCastleImage); override; |
![]() |
function ToRGBImage: TRGBImage; deprecated 'create TRGBImage and use TRGBImage.Assign'; |
Warning: this symbol is deprecated: create TRGBImage and use TRGBImage.Assign Remove alpha channel. |
![]() |
function ToGrayscaleAlphaImage: TGrayscaleAlphaImage; deprecated 'create TGrayscaleAlphaImage and use TGrayscaleAlphaImage.Assign'; |
Warning: this symbol is deprecated: create TGrayscaleAlphaImage and use TGrayscaleAlphaImage.Assign Flatten to grayscale. |
![]() |
function ToGrayscaleImage: TGrayscaleImage; deprecated 'create TGrayscaleImage and use TGrayscaleImage.Assign'; |
Warning: this symbol is deprecated: create TGrayscaleImage and use TGrayscaleImage.Assign Flatten to grayscale and remove alpha channel. |
![]() |
function ToFpImage: TInternalCastleFpImage; override; |
![]() |
procedure PremultiplyAlpha; |
Premultiply the RGB channel with alpha, to make it faster to use this image as source for TCastleImage.DrawTo and TCastleImage.DrawFrom operations. Changes PremultipliedAlpha from The image with premultiplied alpha can only be used with a subset of image routines that actually support premultiplied alpha. Right now, these are only TCastleImage.DrawTo and TCastleImage.DrawFrom. Image with PremultipliedAlpha can be used as a source for drawing, and the results will be the same as without premultiplying, but faster. |
![]() |
procedure AlphaBleed(const ProgressTitle: string = ''); override; |
![]() |
function MakeAlphaBleed(const ProgressTitle: string = ''): TCastleImage; override; |
![]() |
procedure FillEllipse(const x, y: single; const aRadiusX, aRadiusY: single; const aColor: TCastleColor); override; |
![]() |
procedure Ellipse(const x, y: single; const aRadiusX, aRadiusY: single; const aWidth: single; const aColor: TCastleColor); override; |
![]() |
procedure FillRectangle(const x1, y1, x2, y2: single; const aColor: TCastleColor); override; |
![]() |
procedure Rectangle(const x1, y1, x2, y2: single; const aWidth: single; const aColor: TCastleColor); override; |
![]() |
procedure Line(const x1, y1, x2, y2: single; const aWidth: single; const aColor: TCastleColor); override; |
Properties
![]() |
property Pixels: PVector4Byte read GetPixels; |
Pointer to |
![]() |
property AlphaPixels: PVector4Byte read GetPixels; deprecated 'use Pixels'; |
Warning: this symbol is deprecated: use Pixels |
![]() |
property PixelsArray: PVector4ByteArray read GetPixelsArray; |
Pointer to pixels. Same as RawPixels, only typecasted to PVector4ByteArray. |
![]() |
property PremultipliedAlpha: boolean read FPremultipliedAlpha; |
Generated by PasDoc 0.16.0.