Xui.Core.Canvas.Filter
Assembly: Xui.Core · C# declarations · Assembly overview
Types
readonly struct Brightness
Multiplies paint RGB channels, preserving alpha. One is unchanged; zero is black.
public readonly struct Brightness
{
public nfloat Amount { get; }
public Brightness(nfloat amount);
}
Brightness.Brightness(NFloat amount)
public Brightness(nfloat amount);
Creates a brightness adjustment.
NFloat Brightness.Amount
public nfloat Amount { get; }
The nonnegative, finite RGB multiplier.
enum FilterKind
The paint color adjustment stored in a canvas state.
public enum FilterKind
{
None,
Brightness,
}
FilterKind.Brightness
Brightness
Multiply RGB channels by the brightness amount.
FilterKind.None
None
No color adjustment.
readonly struct FilterState
Owned, allocation-free filter state. The default value leaves colors unchanged.
public readonly struct FilterState
{
public FilterKind Kind { get; }
public nfloat Amount { get; }
public FilterState(Brightness brightness);
public Color Apply(Color color);
}
FilterState.FilterState(Brightness brightness)
public FilterState(Brightness brightness);
Creates state for a brightness adjustment.
NFloat FilterState.Amount
public nfloat Amount { get; }
The brightness multiplier, or one when no adjustment is active.
Color FilterState.Apply(Color color)
public Color Apply(Color color);
Adjusts RGB, clamps each channel to [0,1], and preserves alpha.
FilterKind FilterState.Kind
public FilterKind Kind { get; }
The active adjustment.