ShadowEffect Class |
Namespace: Microsoft.Graphics.Canvas.Effects
public sealed class ShadowEffect : ICanvasEffect, IGraphicsEffect, IGraphicsEffectSource, ICanvasImage, IDisposable
The ShadowEffect type exposes the following members.
Name | Description | |
---|---|---|
ShadowEffect | Initializes a new instance of the ShadowEffect class. |
Name | Description | |
---|---|---|
BlurAmount | The amount of blur to be applied to the alpha channel of the image. Default value 3. | |
BufferPrecision | Specifies what precision to use for intermediate buffers when drawing this effect. | |
CacheOutput | Enables caching the output from drawing this effect. | |
Name | Attaches a user-defined name string to the effect. | |
Optimization | Level of performance optimization.
Default value Balanced. | |
ShadowColor | Color of the shadow. Default black. | |
ShadowColorHdr | High-dynaimc-range color of the shadow. Default black. | |
Source | Gets or sets the input source for Shadow effect. |
Name | Description | |
---|---|---|
Dispose | Releases all resources used by the effect. | |
GetBounds(ICanvasResourceCreator) | Retrieves the bounds of this ShadowEffect. | |
GetBounds(ICanvasResourceCreator, Matrix3x2) | Retrieves the bounds of this ShadowEffect. | |
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.
To add a drop shadow to an image, use the shadow effect, translate it by the desired shadow offset, then composite the original image over the top.
This Windows Runtime type corresponds to the D2D Shadow effect.