LinearTransferEffect Class |
Namespace: Microsoft.Graphics.Canvas.Effects
public sealed class LinearTransferEffect : ICanvasEffect, IGraphicsEffect, IGraphicsEffectSource, ICanvasImage, IDisposable
The LinearTransferEffect type exposes the following members.
Name | Description | |
---|---|---|
LinearTransferEffect | Initializes a new instance of the LinearTransferEffect class. |
Name | Description | |
---|---|---|
AlphaDisable | Disables the alpha channel transfer function. Default value false. | |
AlphaOffset | Offsets the alpha channel. Default value 0. | |
AlphaSlope | Controls the slope of the alpha channel. Default value 1. | |
BlueDisable | Disables the blue channel transfer function. Default value false. | |
BlueOffset | Offsets the blue channel. Default value 0. | |
BlueSlope | Controls the slope of the blue channel. Default value 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 function. Default value false. | |
GreenOffset | Offsets the green channel. Default value 0. | |
GreenSlope | Controls the slope of the green channel. Default value 1. | |
Name | Attaches a user-defined name string to the effect. | |
RedDisable | Disables the red channel transfer function. Default value false. | |
RedOffset | Offsets the red channel. Default value 0. | |
RedSlope | Controls the slope of the red channel. Default value 1. | |
Source | Gets or sets the input source for LinearTransfer effect. |
Name | Description | |
---|---|---|
Dispose | Releases all resources used by the effect. | |
GetBounds(ICanvasResourceCreator) | Retrieves the bounds of this LinearTransferEffect. | |
GetBounds(ICanvasResourceCreator, Matrix3x2) | Retrieves the bounds of this LinearTransferEffect. | |
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.
The linear transfer function is evaluated separately for each color channel:
result = (input * slope) + offset
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 Linear transfer effect.