Click or drag to resize
TintEffect Class
[Win10_14393] Tints an image using a specified color value.
Inheritance Hierarchy
SystemObject
  Microsoft.Graphics.Canvas.EffectsTintEffect

Namespace:  Microsoft.Graphics.Canvas.Effects
Assembly:  Microsoft.Graphics.Canvas (in Microsoft.Graphics.Canvas.dll) Version: 0.0.0.0
Syntax
C#
public sealed class TintEffect : ICanvasEffect, 
	IGraphicsEffect, IGraphicsEffectSource, ICanvasImage, IDisposable

The TintEffect type exposes the following members.

Constructors
  NameDescription
Public methodTintEffect
[Win10_14393] Initializes a new instance of the TintEffect class.
Top
Properties
  NameDescription
Public propertyBufferPrecision
[Win10_14393] Specifies what precision to use for intermediate buffers when drawing this effect.
Public propertyCacheOutput
[Win10_14393] Enables caching the output from drawing this effect.
Public propertyClampOutput
[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.
Public propertyColor
[Win10_14393] Specifies the tint color to be applied. Default value white.
Public propertyColorHdr
[Win10_14393] Specifies the high-dynamic-range tint to be applied.
Public propertyStatic memberIsSupported
Checks whether TintEffect is supported on the current operating system version.
Public propertyName
[Win10_14393] Attaches a user-defined name string to the effect.
Public propertySource
[Win10_14393] Gets or sets the input source for Tint effect.
Top
Methods
  NameDescription
Public methodDispose
[Win10_14393] Releases all resources used by the effect.
Public methodGetBounds(ICanvasResourceCreator)
[Win10_14393] Retrieves the bounds of this TintEffect.
Public methodGetBounds(ICanvasResourceCreator, Matrix3x2)
[Win10_14393] Retrieves the bounds of this TintEffect.
Public methodGetInvalidRectangles
[Win10_14393] Queries what regions of the effect output have changed since it was last drawn.
Public methodCode exampleGetRequiredSourceRectangle
[Win10_14393] Queries what part of an effect source image is needed to draw an output region.
Public methodGetRequiredSourceRectangles
[Win10_14393] Queries what parts of the effect source images are needed to draw an output region.
Public methodInvalidateSourceRectangle
[Win10_14393] Notifies the effect that one of its source images has changed.
Top
Remarks

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.

See Also