TableTransferEffect Class |
Namespace: Microsoft.Graphics.Canvas.Effects
public sealed class TableTransferEffect : ICanvasEffect, IGraphicsEffect, IGraphicsEffectSource, ICanvasImage, IDisposable
The TableTransferEffect type exposes the following members.
Name | Description | |
---|---|---|
TableTransferEffect | Initializes a new instance of the TableTransferEffect class. |
Name | Description | |
---|---|---|
AlphaDisable | Disables the alpha channel transfer table. Default value false. | |
AlphaTable | List of values defining the transfer function for the alpha channel. Default value {0,1}. | |
BlueDisable | Disables the blue channel transfer table. Default value false. | |
BlueTable | List of values defining the transfer function for the blue channel. Default value {0,1}. | |
BufferPrecision | Specifies what precision to use for intermediate buffers when drawing this effect. | |
CacheOutput | Enables caching the output from drawing this effect. | |
ClampOutput | If set, the effect clamps color values to between 0 and 1 before passing
them on to the next effect in the graph. If false, the effect will not clamp
values, although subsequent effects or the output surface may later clamp if
they are not of high enough precision. Default value false. | |
GreenDisable | Disables the green channel transfer table. Default value false. | |
GreenTable | List of values defining the transfer function for the green channel. Default value {0,1}. | |
Name | Attaches a user-defined name string to the effect. | |
RedDisable | Disables the red channel transfer table. Default value false. | |
RedTable | List of values defining the transfer function for the red channel. Default value {0,1}. | |
Source | Gets or sets the input source for TableTransfer effect. |
Name | Description | |
---|---|---|
Dispose | Releases all resources used by the effect. | |
GetBounds(ICanvasResourceCreator) | Retrieves the bounds of this TableTransferEffect. | |
GetBounds(ICanvasResourceCreator, Matrix3x2) | Retrieves the bounds of this TableTransferEffect. | |
GetInvalidRectangles | Queries what regions of the effect output have changed since it was last drawn. | |
GetRequiredSourceRectangle | Queries what part of an effect source image is needed to draw an output region. | |
GetRequiredSourceRectangles | Queries what parts of the effect source images are needed to draw an output region. | |
InvalidateSourceRectangle | Notifies the effect that one of its source images has changed. |
Supported by Win2D but not Windows.UI.Composition.
TableTransferEffect effect is similar to DiscreteTransferEffect. The difference is that TableTransferEffect interpolates between entries in the transfer table, which produces a smooth rather than stepped result.
The transfer function is based on the list of inputs: V=(V0,V1,V2,V3,Vk...,VN) where N is the number of elements - 1.
The input pixel intensity is represented as C. The output pixel intensity, C' is calculated as follows:
For a value C, pick a value k, such that: k/N <= C < (k+1)/N
The output C' is calculated using the equation: C' = Vk + (C - k/N) * N * (V(k+1) - Vk)
Effect inputs and outputs are assumed to be in premultiplied alpha format, but this effect operates internally on straight alpha data, so its input values will be unpremultiplied, then the transfer function applied, and finally the result converted back to premultiplied format.
This Windows Runtime type corresponds to the D2D Table transfer effect.