AtlasEffect Class |
Namespace: Microsoft.Graphics.Canvas.Effects
public sealed class AtlasEffect : ICanvasEffect, IGraphicsEffect, IGraphicsEffectSource, ICanvasImage, IDisposable
The AtlasEffect type exposes the following members.
Name | Description | |
---|---|---|
AtlasEffect | Initializes a new instance of the AtlasEffect class. |
Name | Description | |
---|---|---|
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. | |
PaddingRectangle | The padding rectangle specifies how much padding was included when
creating the atlas bitmap. This should only be larger than SourceRectangle
if the pixels between the two rectangles are transparent black. This may
result in Direct2D executing the graph more efficiently. | |
Source | Gets or sets the input source for Atlas effect. | |
SourceRectangle | Selected region of the source image. |
Name | Description | |
---|---|---|
Dispose | Releases all resources used by the effect. | |
GetBounds(ICanvasResourceCreator) | Retrieves the bounds of this AtlasEffect. | |
GetBounds(ICanvasResourceCreator, Matrix3x2) | Retrieves the bounds of this AtlasEffect. | |
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 atlas effect is useful if you want to load a large image made up of many smaller images, such as various frames of a sprite. The effect crops the input to the given SourceRectangle, and then translates the origin of the result to (0,0).
To crop without translating, use CropEffect.
This Windows Runtime type corresponds to the D2D Atlas effect.