TranslucencyHelperAlphaToTranslucency Method |
Converts an alpha value to a translucency value. When the alpha is 255 or greater, the
translucency is 0.0f. When the alpha is 0 or less, the translucency is 1.0f. When the
alpha is in between these values, the translucency is linearly ramped between 0.0f and 1.0f
accordingly.
Namespace:
AGI.Foundation.Graphics.Advanced
Assembly:
AGI.Foundation.Graphics (in AGI.Foundation.Graphics.dll) Version: 24.2.419.0 (24.2.419.0)
Syntax public static float AlphaToTranslucency(
int alpha
)
Public Shared Function AlphaToTranslucency (
alpha As Integer
) As Single
public:
static float AlphaToTranslucency(
int alpha
)
static member AlphaToTranslucency :
alpha : int -> float32
Parameters
- alpha
- Type: SystemInt32
The alpha value to convert to a translucency.
Return Value
Type:
SingleThe translucency value.
See Also