TintEffect Class |
Namespace: Microsoft.Graphics.Canvas.Effects
public sealed class TintEffect : ICanvasEffect, IGraphicsEffect, IGraphicsEffectSource, ICanvasImage, IDisposable
The TintEffect type exposes the following members.
Name | Description | |
---|---|---|
TintEffect | [Win10_14393] Initializes a new instance of the TintEffect class. |
Name | Description | |
---|---|---|
BufferPrecision | [Win10_14393] Specifies what precision to use for intermediate buffers when drawing this effect. | |
CacheOutput | [Win10_14393] Enables caching the output from drawing this effect. | |
ClampOutput | [Win10_14393] 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. | |
Color | [Win10_14393] Specifies the tint color to be applied. Default value white. | |
ColorHdr | [Win10_14393] Specifies the high-dynamic-range tint to be applied. | |
IsSupported | Checks whether TintEffect is supported on the current operating system version. | |
Name | [Win10_14393] Attaches a user-defined name string to the effect. | |
Source | [Win10_14393] Gets or sets the input source for Tint effect. |
Name | Description | |
---|---|---|
Dispose | [Win10_14393] Releases all resources used by the effect. | |
GetBounds(ICanvasResourceCreator) | [Win10_14393] Retrieves the bounds of this TintEffect. | |
GetBounds(ICanvasResourceCreator, Matrix3x2) | [Win10_14393] Retrieves the bounds of this TintEffect. | |
GetInvalidRectangles | [Win10_14393] Queries what regions of the effect output have changed since it was last drawn. | |
GetRequiredSourceRectangle | [Win10_14393] Queries what part of an effect source image is needed to draw an output region. | |
GetRequiredSourceRectangles | [Win10_14393] Queries what parts of the effect source images are needed to draw an output region. | |
InvalidateSourceRectangle | [Win10_14393] Notifies the effect that one of its source images has changed. |
This API is only available when running on Windows 10 build 14393 (Anniversary Update) or greater.
TintEffect multiplies its source image by the specified tint color.
If the color is white, the output is an exact copy of the source image. If the source image is white, the output is the tint color. Where a channel of the tint color is darker than white, that channel of the output image is darkened by a corresponding amount.
A common use of TintEffect is to dynamically change the color of application icons, for instance to match a chosen UI color scheme. An application could ship all its icons as pure white images with their shape determined by alpha channel, then use TintEffect to alter the icon RGB to whatever color is desired.
This Windows Runtime type corresponds to the D2D Tint effect.