record TFloatColor
Unit
PXL.Types
Declaration
type TFloatColor = record
Description
A special high-precision color value that has each individual component represented as 32-bit floating-point value in range of [0, 1]. Although components may have values outside of aforementioned range, such colors cannot be reliably displayed on the screen.
Overview
Fields
Methods
Description
Fields
Red: VectorFloat; |
|
Red value ranging from 0.0 (no intensity) to 1.0 (fully intense).
|
Green: VectorFloat; |
|
Green value ranging from 0.0 (no intensity) to 1.0 (fully intense).
|
Blue: VectorFloat; |
|
Blue value ranging from 0.0 (no intensity) to 1.0 (fully intense).
|
Alpha: VectorFloat; |
|
Alpha-channel value ranging from 0.0 (translucent) to 1.0 (opaque).
|
Values: array[0..3] of VectorFloat |
|
Values represented as an array, with indexes corresponding to red (0), green (1), blue (2) and alpha-channel (3).
|
Methods
function Average(const Color: TFloatColor): TFloatColor; |
|
Computes average between current and destination floating-point color values.
|
function Gray: VectorFloat; |
|
Returns grayscale value in range of [0..1] from the current color value. The resulting value can be considered the color's luma. The alpha-channel is ignored.
|
function Invert: TFloatColor; |
|
Inverts current color by applying formula "Xn = 1.0 - X" for each component.
|
function Lerp(const Color: TFloatColor; const Alpha: VectorFloat): TFloatColor; |
|
Computes alpha-blending between current and destination floating-point colors values. Alpha can be in [0..1] range.
|
function PremultiplyAlpha: TFloatColor; |
|
Takes current color with unpremultiplied alpha and multiplies each of red, green, and blue components by its alpha channel, resulting in premultiplied alpha color.
|
function Saturate: TFloatColor; |
|
Clamps each component of current color to [0, 1] range.
|
function ToInt: TIntColor; |
|
Converts current floating-point color to 32-bit integer representation.
|
function UnpremultiplyAlpha: TFloatColor; |
|
Takes current color with premultiplied alpha channel and divides each of its red, green, and blue components by alpha, resulting in unpremultiplied alpha color.
|
Copyright © 2000 - 2017 Yuriy Kotsarenko. Help files generated by PasDoc.
|