Dela via


CompositionVirtualDrawingSurface Class

Definition

Represents sparsely allocated bitmaps that can be associated with visuals for composition in a visual tree.

public ref class CompositionVirtualDrawingSurface : CompositionDrawingSurface
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 262144)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class CompositionVirtualDrawingSurface : CompositionDrawingSurface
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 262144)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public class CompositionVirtualDrawingSurface : CompositionDrawingSurface
Public Class CompositionVirtualDrawingSurface
Inherits CompositionDrawingSurface
Inheritance
Object Platform::Object IInspectable CompositionObject CompositionDrawingSurface CompositionVirtualDrawingSurface
Attributes

Windows requirements

Device family
Windows 10 Creators Update (introduced in 10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v4.0)

Remarks

CompositionVirtualDrawingSurface is similar to CompositionDrawingSurface, except the surface is sparsely allocated. The content can be rendered using Win2D (or D2D).

The virtual drawing surface is designed for use in scenarios where an application needs to define a large amount of content but only expects a small portion of content to be visible to a user at a given time. For example, think of a long scrolling document or webpage. In such cases, the app only needs to draw the part of the surface that is currently visible to the user, and can defer drawing portions that are not visible until later when they become visible.

The maximum size of a virtual surface is 2^24(16M) pixels. This limit has been imposed because of floating point precision limits, that come into play beyond that size, which prevents guaranteed accurate pixel alignment of drawn patches.

Properties

AlphaMode

The alpha mode of the drawing surface.

(Inherited from CompositionDrawingSurface)
Comment

A string to associate with the CompositionObject.

(Inherited from CompositionObject)
Compositor

The Compositor used to create this CompositionObject.

(Inherited from CompositionObject)
Dispatcher

The dispatcher for the CompositionObject.

(Inherited from CompositionObject)
DispatcherQueue

Gets the DispatcherQueue for the CompostionObject.

(Inherited from CompositionObject)
ImplicitAnimations

The collection of implicit animations attached to this object.

(Inherited from CompositionObject)
PixelFormat

The pixel format of the drawing surface.

(Inherited from CompositionDrawingSurface)
Properties

The collection of properties associated with the CompositionObject.

(Inherited from CompositionObject)
Size

The size of the drawing surface.

(Inherited from CompositionDrawingSurface)
SizeInt32

The size of the drawing surface.

(Inherited from CompositionDrawingSurface)

Methods

Close()

Closes the CompositionObject and releases system resources.

(Inherited from CompositionObject)
ConnectAnimation(String, CompositionAnimation)

Connects and animation.

(Inherited from CompositionObject)
DisconnectAnimation(String)

Disconnects an animation.

(Inherited from CompositionObject)
Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

(Inherited from CompositionObject)
PopulatePropertyInfo(String, AnimationPropertyInfo)

Defines a property that can be animated.

(Inherited from CompositionObject)
Resize(SizeInt32)

Resizes the drawing surface to the specified size.

(Inherited from CompositionDrawingSurface)
Scroll(PointInt32, RectInt32)

Scrolls the drawing surface.

(Inherited from CompositionDrawingSurface)
Scroll(PointInt32)

Scrolls the drawing surface.

(Inherited from CompositionDrawingSurface)
ScrollWithClip(PointInt32, RectInt32, RectInt32)

Scrolls the drawing surface with the specified clip rectangle.

(Inherited from CompositionDrawingSurface)
ScrollWithClip(PointInt32, RectInt32)

Scrolls the drawing surface using the specified clip rectangle.

(Inherited from CompositionDrawingSurface)
StartAnimation(String, CompositionAnimation, AnimationController)

Connects an animation with the specified property of the object and starts the animation.

(Inherited from CompositionObject)
StartAnimation(String, CompositionAnimation)

Connects an animation with the specified property of the object and starts the animation.

(Inherited from CompositionObject)
StartAnimationGroup(ICompositionAnimationBase)

Starts an animation group.

The StartAnimationGroup method on CompositionObject lets you start CompositionAnimationGroup. All the animations in the group will be started at the same time on the object.

(Inherited from CompositionObject)
StopAnimation(String)

Disconnects an animation from the specified property and stops the animation.

(Inherited from CompositionObject)
StopAnimationGroup(ICompositionAnimationBase)

Stops an animation group.

(Inherited from CompositionObject)
Trim(RectInt32[])

Clears portions of a virtual drawing surface that were previously defined. Areas that are cleared will be treated as empty once again, and video memory that was previously backing them will be reclaimed.

TryGetAnimationController(String)

Returns an AnimationController for the animation running on the specified property.

(Inherited from CompositionObject)

Applies to