Click or drag to resize

TranslucencyHelper Class

Contains helpful methods for working with colors and translucency.
Inheritance Hierarchy
SystemObject
  AGI.Foundation.Graphics.AdvancedTranslucencyHelper

Namespace:  AGI.Foundation.Graphics.Advanced
Assembly:  AGI.Foundation.Graphics (in AGI.Foundation.Graphics.dll) Version: 24.3.420.0 (24.3.420.0)
Syntax
public static class TranslucencyHelper

The TranslucencyHelper type exposes the following members.

Methods
  NameDescription
Public methodStatic memberAlphaToTranslucency
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.
Public methodStatic memberCreateColorFromColorAndTranslucency
Creates a color from a given color and a given translucency. The alpha channel of the color is ignored, and instead the alpha value for the returned color is computed by calling TranslucencyToAlpha(Single) on the provided translucency value.
Public methodStatic memberExtractTranslucencyFromColor
Extracts a translucency value from the alpha channel of a color. This is equivalent to calling AlphaToTranslucency(Int32) on the alpha component of the color.
Public methodStatic memberTranslucencyToAlpha
Converts a translucency value to an alpha value. When the translucency is 1.0f or greater, the alpha is 0. When the translucency is 0.0f or less, the alpha is 255. When the translucency is in between these values, the alpha is linearly ramped between 0 and 255 accordingly.
Top
See Also