SharpDX.DirectComposition

Adds a cubic polynomial segment to the animation function.

A cubic segment transitions time along a cubic polynomial. For a given time input (t), the output value is given by the following equation.

x(t) = at3 + bt2 + ct + d

This method fails if any of the parameters are NaN, positive infinity, or negative infinity.

Because animation segments must be added in increasing order, this method fails if the beginOffset parameter is less than or equal to the beginOffset parameter of the previous segment, if any.

This animation segment remains in effect until the begin time of the next segment in the animation function. If the animation function contains no more segments, this segment remains in effect indefinitely.

If all coefficients except constantCoefficient are zero, the value of this segment remains constant over time, and the animation does not cause a recomposition for the duration of the segment.

hh437385 IDCompositionAnimation IDCompositionAnimation
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Resets the animation function so that it contains no segments.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method returns the animation function to a clean state, as when the animation was first constructed. After this method is called, the next segment to be added becomes the first segment of the animation function. Because it is the first segment, it can have any non-negative beginning offset.

hh437389 HRESULT IDCompositionAnimation::Reset() IDCompositionAnimation::Reset

Sets the absolute time at which the animation function starts.

The starting time for this animation.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

By default, an animation function starts when the first frame of the animation takes effect. For example, if an application creates a simple animation function with a single primitive at offset zero, associates the animation with some property, and then calls the method, the first frame that includes the commit samples the animation at offset zero for the first primitive. This implies that the actual default start time of all animations varies depending on the time between when the application creates the animation and calls Commit, to the time it takes the composition engine to pick up the committed changes. The application can use the SetAbsoluteBeginTime method to exercise finer control over the starting time of an animation.

This method does not control when animations take effect; it only affects how animations are sampled after they start. If the application specifies the exact time of the next frame as the absolute begin time, the result is the same as not calling this method at all. If the specified begin time is different from the time of the next frame, the result is one of following:

  • If the specified time is later than the next frame time, the animation start is delayed until the specified begin time.
  • If the specified time is earlier than the next frame time, the beginning of the animation is dropped and sampling starts into the animation function.
hh437390 HRESULT IDCompositionAnimation::SetAbsoluteBeginTime([In] LARGE_INTEGER beginTime) IDCompositionAnimation::SetAbsoluteBeginTime

Adds a cubic polynomial segment to the animation function.

The offset, in seconds, from the beginning of the animation function to the point when this segment should take effect.

The constant coefficient of the polynomial.

The linear coefficient of the polynomial.

The quadratic coefficient of the polynomial.

The cubic coefficient of the polynomial.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

A cubic segment transitions time along a cubic polynomial. For a given time input (t), the output value is given by the following equation.

x(t) = at3 + bt2 + ct + d

This method fails if any of the parameters are NaN, positive infinity, or negative infinity.

Because animation segments must be added in increasing order, this method fails if the beginOffset parameter is less than or equal to the beginOffset parameter of the previous segment, if any.

This animation segment remains in effect until the begin time of the next segment in the animation function. If the animation function contains no more segments, this segment remains in effect indefinitely.

If all coefficients except constantCoefficient are zero, the value of this segment remains constant over time, and the animation does not cause a recomposition for the duration of the segment.

hh437385 HRESULT IDCompositionAnimation::AddCubic([In] double beginOffset,[In] float constantCoefficient,[In] float linearCoefficient,[In] float quadraticCoefficient,[In] float cubicCoefficient) IDCompositionAnimation::AddCubic

Adds a sinusoidal segment to the animation function.

The offset, in seconds, from the beginning of the animation function to the point when this segment should take effect.

A constant that is added to the sinusoidal.

A scale factor that is applied to the sinusoidal.

A scale factor that is applied to the time offset, in Hertz.

A constant that is added to the time offset, in degrees.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if any of the parameters are NaN, positive infinity, or negative infinity, or if the beginOffset parameter is negative.

Because animation segments must be added in increasing order, this method fails if the beginOffset parameter is less than or equal to the beginOffset parameter of the previous segment, if any.

This animation segment remains in effect until the begin time of the next segment in the animation function. If the animation function contains no more segments, this segment remains in effect indefinitely.

hh437387 HRESULT IDCompositionAnimation::AddSinusoidal([In] double beginOffset,[In] float bias,[In] float amplitude,[In] float frequency,[In] float phase) IDCompositionAnimation::AddSinusoidal

Adds a repeat segment that causes the specified portion of an animation function to be repeated.

The offset, in seconds, from the beginning of the animation to the point at which the repeat should begin.

The duration, in seconds, of a portion of the animation immediately preceding the begin time that is specified by beginOffset. This is the portion that will be repeated.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if any of the parameters are NaN, positive infinity, or negative infinity.

Because animation segments must be added in increasing order, this method fails if the beginOffset parameter is less than or equal to the beginOffset parameter of the previous segment. This method also fails if this is the first segment to be added to the animation function.

This animation segment remains in effect until the begin time of the next segment. If the animation function contains no more segments, this segment remains in effect indefinitely.

hh437386 HRESULT IDCompositionAnimation::AddRepeat([In] double beginOffset,[In] double durationToRepeat) IDCompositionAnimation::AddRepeat

Adds an end segment that marks the end of an animation function.

The offset, in seconds, from the beginning of the animation function to the point when the function ends.

The final value of the animation.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

When the specified offset is reached, the property or properties affected by this animation are set to the specified final value, and then the animation stops. If no end segment is added, the final segment of the animation function runs indefinitely. Calling this method is semantically identical to making the last segment of the animation function a cubic polynomial where the cubic, quadratic, and linear coefficients are all zeros, and the constant coefficient is the desired final value.

Because animation segments must be added in increasing order, this method fails if the endOffset parameter is less than or equal to the beginOffset parameter of the previous segment. This method also fails if this is the first segment to be added to the animation function.

After this method is called, all methods on this animation object fail except the method.

hh437388 HRESULT IDCompositionAnimation::End([In] double endOffset,[In] float endValue) IDCompositionAnimation::End

Sets the absolute time at which the animation function starts.

By default, an animation function starts when the first frame of the animation takes effect. For example, if an application creates a simple animation function with a single primitive at offset zero, associates the animation with some property, and then calls the method, the first frame that includes the commit samples the animation at offset zero for the first primitive. This implies that the actual default start time of all animations varies depending on the time between when the application creates the animation and calls Commit, to the time it takes the composition engine to pick up the committed changes. The application can use the SetAbsoluteBeginTime method to exercise finer control over the starting time of an animation.

This method does not control when animations take effect; it only affects how animations are sampled after they start. If the application specifies the exact time of the next frame as the absolute begin time, the result is the same as not calling this method at all. If the specified begin time is different from the time of the next frame, the result is one of following:

  • If the specified time is later than the next frame time, the animation start is delayed until the specified begin time.
  • If the specified time is earlier than the next frame time, the beginning of the animation is dropped and sampling starts into the animation function.
hh437390 SetAbsoluteBeginTime SetAbsoluteBeginTime HRESULT IDCompositionAnimation::SetAbsoluteBeginTime([In] LARGE_INTEGER beginTime)

An application must use the interface in order to use DirectComposition in a Win32 desktop application. This interface allows the application to connect a visual tree to a window and to host layered child windows for composition

dn280350 IDCompositionDesktopDevice IDCompositionDesktopDevice

Serves as a factory for all other Microsoft DirectComposition objects and provides methods to control transactional composition.

dn280354 IDCompositionDevice2 IDCompositionDevice2
Creates a new device object that can be used to create other Microsoft DirectComposition objects. An optional reference to a DirectX device to be used to create DirectComposition surface objects. Must be a reference to an object implementing the or interfaces. Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Commits all DirectComposition commands that are pending on this device.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

Calls to DirectComposition methods are always batched and executed atomically as a single transaction. Calls take effect only when is called, at which time all pending method calls for a device are executed at once.

An application that uses multiple devices must call Commit for each device separately. However, because the composition engine processes the calls individually, the batch of commands might not take effect at the same time.

dn280355 HRESULT IDCompositionDevice2::Commit() IDCompositionDevice2::Commit

Waits for the composition engine to finish processing the previous call to the method.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

dn280376 HRESULT IDCompositionDevice2::WaitForCommitCompletion() IDCompositionDevice2::WaitForCommitCompletion

Retrieves information from the composition engine about composition times and the frame rate.

A structure that receives composition times and frame rate information.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method retrieves timing information about the composition engine that an application can use to synchronize the rasterization of bitmaps with independent animations.

dn280375 HRESULT IDCompositionDevice2::GetFrameStatistics([Out] DCOMPOSITION_FRAME_STATISTICS* statistics) IDCompositionDevice2::GetFrameStatistics

Creates a new visual object.

The new visual object. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

A new visual object has a static value of zero for the OffsetX and OffsetY properties, and null for the Transform, Clip, and Content properties. Initially, the visual does not cause the contents of a window to change. The visual must be added as a child of another visual, or as the root of a composition target, before it can affect the appearance of a window.

dn280373 HRESULT IDCompositionDevice2::CreateVisual([Out, Fast] IDCompositionVisual2** visual) IDCompositionDevice2::CreateVisual

Creates a Microsoft DirectComposition surface factory object, which can be used to create other DirectComposition surface or virtual surface objects

A reference to a DirectX device to be used to create DirectComposition surface objects. Must be a reference to an object implementing the or interfaces. This parameter must not be null.

The newly created surface factory object. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

A surface factory allows an application to simultaneously use more than one single DXGI or Direct2D device with DirectComposition. Each surface factory has a permanent association with one DXGI or Direct2D device, but a DirectComposition device may have any number of surface factories.

Each surface factory manages resources independently from the others. In particular, DirectComposition pools surface allocations to mitigate surface allocation and deallocation costs. This pool is done on a per-surface factory basis.

If the function is called with a non-null renderingDevice parameter, the returned DirectComposition device object has an implicit surface factory under the covers associated with the given rendering device. This implicit surface factory is used to service the , , and methods.

A surface object remains alive as long as any of the surfaces or virtual surfaces that it created remain alive, either directly because the application holds a direct reference, or indirectly because one or more such surfaces are associated with one or more visual objects.

dn280367 HRESULT IDCompositionDevice2::CreateSurfaceFactory([In] IUnknown* renderingDevice,[Out, Fast] IDCompositionSurfaceFactory** surfaceFactory) IDCompositionDevice2::CreateSurfaceFactory

Creates an updateable surface object that can be associated with one or more visuals for composition.

The width of the surface, in pixels. Constrained by the feature level of the rendering device that was passed in at the time the DirectComposition device was created.

The height of the surface, in pixels. Constrained by the feature level of the rendering device that was passed in at the time the DirectComposition device was created.

The pixel format of the surface.

The format of the alpha channel, if an alpha channel is included in the pixel format. It can be one of the following values:

ValueMeaning

The alpha channel is not specified. This value has the same effect as .

The color channels contain values that are premultiplied with the alpha channel.

The alpha channel should be ignored and the bitmap should be rendered opaquely.

?

The newly created surface object. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

A Microsoft DirectComposition surface is a rectangular array of pixels that can be associated with a visual for composition.

A newly created surface object is in an uninitialized state. While it is uninitialized, the surface has no effect on the composition of the visual tree. It behaves exactly like a surface that has 100% transparent pixels.

To initialize the surface with pixel data, use the and methods. The first call to this method must cover the entire surface area to provide an initial value for every pixel. Subsequent calls may specify smaller sub-rectangles of the surface to update.

DirectComposition surfaces support the following pixel formats:

dn280366 HRESULT IDCompositionDevice2::CreateSurface([In] unsigned int width,[In] unsigned int height,[In] DXGI_FORMAT pixelFormat,[In] DXGI_ALPHA_MODE alphaMode,[Out, Fast] IDCompositionSurface** surface) IDCompositionDevice2::CreateSurface

Creates a sparsely populated surface that can be associated with one or more visuals for composition.

The width of the surface, in pixels. The maximum width is 16,777,216 pixels.

The height of the surface, in pixels. The maximum height is 16,777,216 pixels.

The pixel format of the surface.

The meaning of the alpha channel, if the pixel format contains an alpha channel. It can be one of the following values:

ValueMeaning

The alpha channel is not specified. This value has the same effect as .

The color channels contain values that are premultiplied with the alpha channel.

The alpha channel should be ignored and the bitmap should be rendered opaquely.

?

The newly created surface object. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

A Microsoft DirectComposition sparse surface is a logical object that behaves like a rectangular array of pixels that can be associated with a visual for composition. The surface is not necessarily backed by any physical video or system memory for every one of its pixels. The application can realize or virtualize parts of the logical surface at different times.

A newly created surface object is in an uninitialized state. While it is uninitialized, the surface has no effect on the composition of the visual tree. It behaves exactly like a surface that is initialized with 100% transparent pixels.

To initialize the surface with pixel data, use the and methods. This method not only provides pixels for the surface, but it also allocates actual storage space for those pixels. The memory allocation persists until the application returns some of the memory to the system. The application can free part or all of the allocated memory by calling the method.

DirectComposition surfaces support the following pixel formats:

This method fails if initialWidth or initialHeight exceeds 16,777,216 pixels.

dn280372 HRESULT IDCompositionDevice2::CreateVirtualSurface([In] unsigned int initialWidth,[In] unsigned int initialHeight,[In] DXGI_FORMAT pixelFormat,[In] DXGI_ALPHA_MODE alphaMode,[Out, Fast] IDCompositionVirtualSurface** virtualSurface) IDCompositionDevice2::CreateVirtualSurface

Creates a 2D translation transform object.

The new 2D translation transform object. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

A new 2D translation transform object has a static value of zero for the OffsetX and OffsetY properties.

dn280370 HRESULT IDCompositionDevice2::CreateTranslateTransform([Out, Fast] IDCompositionTranslateTransform** translateTransform) IDCompositionDevice2::CreateTranslateTransform

Creates a 2D scale transform object.

The new 2D scale transform object. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

A new 2D scale transform object has a static value of zero for the ScaleX, ScaleY, CenterX, and CenterY properties.

dn280363 HRESULT IDCompositionDevice2::CreateScaleTransform([Out, Fast] IDCompositionScaleTransform** scaleTransform) IDCompositionDevice2::CreateScaleTransform

Creates a 2D rotation transform object.

The new rotation transform object. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

A new 2D rotation transform object has a static value of zero for the Angle, CenterX, and CenterY properties.

dn280361 HRESULT IDCompositionDevice2::CreateRotateTransform([Out, Fast] IDCompositionRotateTransform** rotateTransform) IDCompositionDevice2::CreateRotateTransform

Creates a 2D skew transform object.

The new 2D skew transform object. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

A new 2D skew transform object has a static value of zero for the AngleX, AngleY, CenterX, and CenterY properties.

dn280365 HRESULT IDCompositionDevice2::CreateSkewTransform([Out, Fast] IDCompositionSkewTransform** skewTransform) IDCompositionDevice2::CreateSkewTransform

Creates a 2D 3-by-2 matrix transform object.

The new matrix transform object. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

A new matrix transform object has the identity matrix as its initial value. The identity matrix is the 3x2 matrix with ones on the main diagonal and zeros elsewhere, as shown in the following illustration.

When an identity transform is applied to an object, it does not change the position, shape, or size of the object. It is similar to the way that multiplying a number by one does not change the number. Any transform other than the identity transform will modify the position, shape, and/or size of objects.

dn280358 HRESULT IDCompositionDevice2::CreateMatrixTransform([Out, Fast] IDCompositionMatrixTransform** matrixTransform) IDCompositionDevice2::CreateMatrixTransform

Creates a 2D transform group object that holds an array of 2D transform objects.

An array of 2D transform objects that make up this transform group.

The number of elements in the transforms array.

The new transform group object. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

The array entries in a transform group cannot be changed. However, each transform in the array can be modified through its own property setting methods. If a transform in the array is modified, the change is reflected in the computed matrix of the transform group.

dn280369 HRESULT IDCompositionDevice2::CreateTransformGroup([In, Buffer] IDCompositionTransform** transforms,[In] unsigned int elements,[Out, Fast] IDCompositionTransform** transformGroup) IDCompositionDevice2::CreateTransformGroup

Creates a 2D transform group object that holds an array of 2D transform objects.

An array of 2D transform objects that make up this transform group.

The number of elements in the transforms array.

The new transform group object. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

The array entries in a transform group cannot be changed. However, each transform in the array can be modified through its own property setting methods. If a transform in the array is modified, the change is reflected in the computed matrix of the transform group.

dn280369 HRESULT IDCompositionDevice2::CreateTransformGroup([In, Buffer] IDCompositionTransform** transforms,[In] unsigned int elements,[Out, Fast] IDCompositionTransform** transformGroup) IDCompositionDevice2::CreateTransformGroup

Creates a 3D translation transform object.

The new 3D translation transform object. This parameter must not be null.

If this method succeeds, it returns . Otherwise, it returns an error code.

A newly created 3D translation transform has a static value of 0 for the OffsetX, OffsetY, and OffsetZ properties.

dn280371 HRESULT IDCompositionDevice2::CreateTranslateTransform3D([Out, Fast] IDCompositionTranslateTransform3D** translateTransform3D) IDCompositionDevice2::CreateTranslateTransform3D

Creates a 3D scale transform object.

The new 3D scale transform object. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

A new 3D scale transform object has a static value of 1.0 for the ScaleX, ScaleY, and ScaleZ properties.

dn280364 HRESULT IDCompositionDevice2::CreateScaleTransform3D([Out, Fast] IDCompositionScaleTransform3D** scaleTransform3D) IDCompositionDevice2::CreateScaleTransform3D

Creates a 3D rotation transform object.

The new 3D rotation transform object. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

A new 3D rotation transform object has a default static value of zero for the Angle, CenterX, CenterY, CenterZ, AxisX, and AxisY properties, and a default static value of 1.0 for the AxisZ property.

dn280362 HRESULT IDCompositionDevice2::CreateRotateTransform3D([Out, Fast] IDCompositionRotateTransform3D** rotateTransform3D) IDCompositionDevice2::CreateRotateTransform3D

Creates a 3D 4-by-4 matrix transform object.

The new 3D matrix transform object. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

The new 3D matrix transform has the identity matrix as its value. The identity matrix is the 4-by-4 matrix with ones on the main diagonal and zeros elsewhere, as shown in the following illustration.

When an identity transform is applied to an object, it does not change the position, shape, or size of the object. It is similar to the way that multiplying a number by one does not change the number. Any transform other than the identity transform will modify the position, shape, and/or size of objects.

dn280359 HRESULT IDCompositionDevice2::CreateMatrixTransform3D([Out, Fast] IDCompositionMatrixTransform3D** matrixTransform3D) IDCompositionDevice2::CreateMatrixTransform3D

Creates a 3D transform group object that holds an array of 3D transform objects.

An array of 3D transform objects that make up this transform group.

The number of elements in the transforms array.

The new 3D transform group object. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

The array entries in a 3D transform group cannot be changed. However, each transform in the array can be modified through its own property setting methods. If a transform in the array is modified, the change is reflected in the computed matrix of the transform group.

dn280368 HRESULT IDCompositionDevice2::CreateTransform3DGroup([In, Buffer] IDCompositionTransform3D** transforms3D,[In] unsigned int elements,[Out, Fast] IDCompositionTransform3D** transform3DGroup) IDCompositionDevice2::CreateTransform3DGroup

Creates a 3D transform group object that holds an array of 3D transform objects.

An array of 3D transform objects that make up this transform group.

The number of elements in the transforms array.

The new 3D transform group object. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

The array entries in a 3D transform group cannot be changed. However, each transform in the array can be modified through its own property setting methods. If a transform in the array is modified, the change is reflected in the computed matrix of the transform group.

dn280368 HRESULT IDCompositionDevice2::CreateTransform3DGroup([In, Buffer] IDCompositionTransform3D** transforms3D,[In] unsigned int elements,[Out, Fast] IDCompositionTransform3D** transform3DGroup) IDCompositionDevice2::CreateTransform3DGroup

Creates an object that represents multiple effects to be applied to a visual subtree.

The new effect group object. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

An effect group enables an application to apply multiple effects to a single visual subtree.

A new effect group has a default opacity value of 1.0 and no 3D transformations.

To set the opacity and transform values, use the corresponding methods on the that was created.

dn280357 HRESULT IDCompositionDevice2::CreateEffectGroup([Out, Fast] IDCompositionEffectGroup** effectGroup) IDCompositionDevice2::CreateEffectGroup

Creates a clip object that can be used to restrict the rendering of a visual subtree to a rectangular area.

The new clip object. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

A newly created clip object has a static value of FLT_MAX for the left and top properties, and a static value of ?FLT_MAX for the right and bottom properties, effectively making it a no-op clip object.

dn280360 HRESULT IDCompositionDevice2::CreateRectangleClip([Out, Fast] IDCompositionRectangleClip** clip) IDCompositionDevice2::CreateRectangleClip

Creates an animation object that is used to animate one or more scalar properties of one or more Microsoft DirectComposition objects.

The new animation object. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

A number of DirectComposition object properties can have an animation object as the value of the property. When a property has an animation object as its value, DirectComposition redraws the visual at the refresh rate to reflect the changing value of the property that is being animated.

A newly created animation object does not have any animation segments associated with it. An application must use the methods of the interface to build an animation function before setting the animation object as the property of another DirectComposition object.

dn280356 HRESULT IDCompositionDevice2::CreateAnimation([Out, Fast] IDCompositionAnimation** animation) IDCompositionDevice2::CreateAnimation

Retrieves information from the composition engine about composition times and the frame rate.

This method retrieves timing information about the composition engine that an application can use to synchronize the rasterization of bitmaps with independent animations.

dn280375 GetFrameStatistics GetFrameStatistics HRESULT IDCompositionDevice2::GetFrameStatistics([Out] DCOMPOSITION_FRAME_STATISTICS* statistics)
Creates a new device object that can be used to create other Microsoft DirectComposition objects. An optional reference to a DirectX device to be used to create DirectComposition surface objects. Must be a reference to an object implementing the or interfaces. Sets the DWM cloaking state for the given window. A window handle. True to cloak the window, false to make the window visible again. When a window is used as a source in a DirectComposition tree, by default it will still be rendered in its original position and layout. Cloaking the window causes it to disappear from its original position and render only through the DirectComposition tree. Gets the cloaking state for a given window. A window handle. True if the window is currently being cloaked, false if it is visible in its regular position. Sets or clears the WS_EX_LAYERED extended style for a window. A window handle. True to apply the layered style to the window, false to clear the style. Only windows with the WS_EX_LAYERED style can be used as Visual content. Starting in Windows 8, child windows can also be layered windows. Gets whether a given window has the WS_EX_LAYERED extended style applied. A window handle. True if the window has the layered style applied, false otherwise. Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Creates a composition target object that is bound to the window that is represented by the specified window handle.

The window to which the composition target object should be bound. This parameter must not be null.

TRUE if the visual tree should be displayed on top of the children of the window specified by the hwnd parameter; otherwise, the visual tree is displayed behind the children.

The new composition target object. This parameter must not be null.

A DirectComposition visual tree must be bound to a window before anything can be displayed on screen. The window can be a top-level window or a child window. In either case, the window can be a layered window, but in all cases the window must belong to the calling process. If the window belongs to a different process, this method returns DCOMPOSITION_ERROR_ACCESS_DENIED.

When DirectComposition content is composed to the window, the content is always composed on top of whatever is drawn directly to that window through the device context returned by the GetDC function, or by calls to DirectX Present methods. However, because window clipping rules apply to DirectComposition content, if the window has child windows, those child windows may clip the visual tree. The topmost parameter determines whether child windows clip the visual tree.

Conceptually, each window consists of four layers:

  1. The contents drawn directly to the window handle (this is the bottommost layer).
  2. An optional DirectComposition visual tree.
  3. The contents of all child windows, if any.
  4. Another optional DirectComposition visual tree (this is the topmost layer).

All four layers are clipped to the window?s visible region.

At most, only two composition targets can be created for each window in the system, one topmost and one not topmost. If a composition target is already bound to the specified window at the specified layer, this method fails. When a composition target object is destroyed, the layer it composed is available for use by a new composition target object.

dn280353 HRESULT IDCompositionDesktopDevice::CreateTargetForHwnd([In] HWND hwnd,[In] BOOL topmost,[Out] IDCompositionTarget** target) IDCompositionDesktopDevice::CreateTargetForHwnd

Creates a new composition surface object that wraps an existing composition surface.

The handle of an existing composition surface that was created by a call to the function.

The new composition surface object. This parameter must not be null.

dn280351 HRESULT IDCompositionDesktopDevice::CreateSurfaceFromHandle([In] void* handle,[Out] IUnknown** surface) IDCompositionDesktopDevice::CreateSurfaceFromHandle

Creates a wrapper object that represents the rasterization of a layered window, and that can be associated with a visual for composition.

The handle of the layered window for which to create a wrapper. A layered window is created by specifying WS_EX_LAYERED when creating the window with the CreateWindowEx function or by setting WS_EX_LAYERED via SetWindowLong after the window has been created.

The new composition surface object. This parameter must not be null.

You can use the surface reference in calls to the method to set the content of one or more visuals. After setting the content, the visuals compose the contents of the specified layered window as long as the window is layered. If the window is unlayered, the window content disappears from the output of the composition tree. If the window is later re-layered, the window content reappears as long as it is still associated with a visual. If the window is resized, the affected visuals are re-composed.

The contents of the window are not cached beyond the life of the window. That is, if the window is destroyed, the affected visuals stop composing the window.

If the window is moved off-screen or resized to zero, the system stops composing the content of those visuals. You should use the DwmSetWindowAttribute function with the DWMWA_CLOAK flag to "cloak" the layered child window when you need to hide the original window while allowing the system to continue to compose the content of the visuals.

dn280352 HRESULT IDCompositionDesktopDevice::CreateSurfaceFromHwnd([In] HWND hwnd,[Out] IUnknown** surface) IDCompositionDesktopDevice::CreateSurfaceFromHwnd

Serves as a factory for all other Microsoft DirectComposition objects and provides methods to control transactional composition.

hh437392 IDCompositionDevice IDCompositionDevice
Creates a new device object that can be used to create other Microsoft DirectComposition objects. The DXGI device to use to create DirectComposition surface objects. Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Commits all DirectComposition commands that are pending on this device.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

Calls to DirectComposition methods are always batched and executed atomically as a single transaction. Calls take effect only when is called, at which time all pending method calls for a device are executed at once.

An application that uses multiple devices must call Commit for each device separately. However, because the composition engine processes the calls individually, the batch of commands might not take effect at the same time.

hh437393 HRESULT IDCompositionDevice::Commit() IDCompositionDevice::Commit

Waits for the composition engine to finish processing the previous call to the method.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

hh920928 HRESULT IDCompositionDevice::WaitForCommitCompletion() IDCompositionDevice::WaitForCommitCompletion

Retrieves information from the composition engine about composition times and the frame rate.

A structure that receives composition times and frame rate information.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method retrieves timing information about the composition engine that an application can use to synchronize the rasterization of bitmaps with independent animations.

hh437415 HRESULT IDCompositionDevice::GetFrameStatistics([Out] DCOMPOSITION_FRAME_STATISTICS* statistics) IDCompositionDevice::GetFrameStatistics

Creates a composition target object that is bound to the window that is represented by the specified window handle ().

No documentation. No documentation. No documentation.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

A Microsoft DirectComposition visual tree must be bound to a window before anything can be displayed on screen. The window can be a top-level window or a child window. In either case, the window can be a layered window, but in all cases the window must belong to the calling process. If the window belongs to a different process, this method returns DCOMPOSITION_ERROR_ACCESS_DENIED.

When DirectComposition content is composed to the window, the content is always composed on top of whatever is drawn directly to that window through the device context () returned by the GetDC function, or by calls to Microsoft DirectX Present methods. However, because window clipping rules apply to DirectComposition content, if the window has child windows, those child windows may clip the visual tree. The topmost parameter determines whether child windows clip the visual tree.

Conceptually, each window consists of four layers:

  1. The contents drawn directly to the window handle (this is the bottommost layer).
  2. An optional DirectComposition visual tree.
  3. The contents of all child windows, if any.
  4. Another optional DirectComposition visual tree (this is the topmost layer).

All four layers are clipped to the window's visible region.

At most, only two composition targets can be created for each window in the system, one topmost and one not topmost. If a composition target is already bound to the specified window at the specified layer, this method fails. When a composition target object is destroyed, the layer it composed is available for use by a new composition target object.

hh437396 HRESULT IDCompositionDevice::CreateTargetForHwnd([In] HWND hwnd,[In] BOOL topmost,[Out] IDCompositionTarget** target) IDCompositionDevice::CreateTargetForHwnd

Creates a new visual object.

The new visual object. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

A new visual object has a static value of zero for the OffsetX and OffsetY properties, and null for the Transform, Clip, and Content properties. Initially, the visual does not cause the contents of a window to change. The visual must be added as a child of another visual, or as the root of a composition target, before it can affect the appearance of a window.

hh437414 HRESULT IDCompositionDevice::CreateVisual([Out, Fast] IDCompositionVisual** visual) IDCompositionDevice::CreateVisual

Creates an updateable surface object that can be associated with one or more visuals for composition.

The width of the surface, in pixels.

The height of the surface, in pixels.

The pixel format of the surface.

The format of the alpha channel, if an alpha channel is included in the pixel format. It can be one of the following values:

ValueMeaning

The alpha channel is not specified. This value has the same effect as .

The color channels contain values that are premultiplied with the alpha channel.

The alpha channel should be ignored and the bitmap should be rendered opaquely.

?

The newly created surface object. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

A Microsoft DirectComposition surface is a rectangular array of pixels that can be associated with a visual for composition.

A newly created surface object is in an uninitialized state. While it is uninitialized, the surface has no effect on the composition of the visual tree. It behaves exactly like a surface that has 100% transparent pixels.

To initialize the surface with pixel data, use the method. The first call to this method must cover the entire surface area to provide an initial value for every pixel. Subsequent calls may specify smaller sub-rectangles of the surface to update.

DirectComposition surfaces support the following pixel formats:

hh437405 HRESULT IDCompositionDevice::CreateSurface([In] unsigned int width,[In] unsigned int height,[In] DXGI_FORMAT pixelFormat,[In] DXGI_ALPHA_MODE alphaMode,[Out, Fast] IDCompositionSurface** surface) IDCompositionDevice::CreateSurface

Creates a sparsely populated surface that can be associated with one or more visuals for composition.

The width of the surface, in pixels. The maximum width is 16,777,216 pixels.

The height of the surface, in pixels. The maximum height is 16,777,216 pixels.

The pixel format of the surface.

The meaning of the alpha channel, if the pixel format contains an alpha channel. It can be one of the following values:

ValueMeaning

The alpha channel is not specified. This value has the same effect as .

The color channels contain values that are premultiplied with the alpha channel.

The alpha channel should be ignored and the bitmap should be rendered opaquely.

?

The newly created surface object. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

A Microsoft DirectComposition sparse surface is a logical object that behaves like a rectangular array of pixels that can be associated with a visual for composition. The surface is not necessarily backed by any physical video or system memory for every one of its pixels. The application can realize or virtualize parts of the logical surface at different times.

A newly created surface object is in an uninitialized state. While it is uninitialized, the surface has no effect on the composition of the visual tree. It behaves exactly like a surface that is initialized with 100% transparent pixels.

To initialize the surface with pixel data, use the method. This method not only provides pixels for the surface, but it also allocates actual storage space for those pixels. The memory allocation persists until the application returns some of the memory to the system. The application can free part or all of the allocated memory by calling the IDComposition::VirtualSurfaceTrim method.

DirectComposition surfaces support the following pixel formats:

This method fails if initialWidth or initialHeight exceeds 16,777,216 pixels.

hh437413 HRESULT IDCompositionDevice::CreateVirtualSurface([In] unsigned int initialWidth,[In] unsigned int initialHeight,[In] DXGI_FORMAT pixelFormat,[In] DXGI_ALPHA_MODE alphaMode,[Out, Fast] IDCompositionVirtualSurface** virtualSurface) IDCompositionDevice::CreateVirtualSurface

Creates a new composition surface object that wraps an existing composition surface.

The handle of an existing composition surface that was created by a call to the function.

The new composition surface object. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method enables an application to use a shared composition surface in a composition tree.

hh437406 HRESULT IDCompositionDevice::CreateSurfaceFromHandle([In] void* handle,[Out] IUnknown** surface) IDCompositionDevice::CreateSurfaceFromHandle

Creates a wrapper object that represents the rasterization of a layered window, and that can be associated with a visual for composition.

The handle of the layered window for which to create a wrapper. A layered window is created by specifying WS_EX_LAYERED when creating the window with the CreateWindowEx function or by setting WS_EX_LAYERED via SetWindowLong after the window has been created.

The new composition surface object. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

You can use the surface reference in calls to the method to set the content of one or more visuals. After setting the content, the visuals compose the contents of the specified layered window as long as the window is layered. If the window is unlayered, the window content disappears from the output of the composition tree. If the window is later re-layered, the window content reappears as long as it is still associated with a visual. If the window is resized, the affected visuals are re-composed.

The contents of the window are not cached beyond the life of the window. That is, if the window is destroyed, the affected visuals stop composing the window.

If the window is moved off-screen or resized to zero, the system stops composing the content of visuals. You should use the DwmSetWindowAttribute function with the DWMWA_CLOAK flag to "cloak" the layered child window when you need to hide the original window while allowing the system to continue to compose the content of the visuals. For more information, see How to animate the bitmap of a layered child window and DirectComposition layered child window sample.

hh437407 HRESULT IDCompositionDevice::CreateSurfaceFromHwnd([In] HWND hwnd,[Out] IUnknown** surface) IDCompositionDevice::CreateSurfaceFromHwnd

Creates a 2D translation transform object.

The new 2D translation transform object. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

A new 2D translation transform object has a static value of zero for the OffsetX and OffsetY properties.

hh437411 HRESULT IDCompositionDevice::CreateTranslateTransform([Out, Fast] IDCompositionTranslateTransform** translateTransform) IDCompositionDevice::CreateTranslateTransform

Creates a 2D scale transform object.

The new 2D scale transform object. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

A new 2D scale transform object has a static value of zero for the ScaleX, ScaleY, CenterX, and CenterY properties.

hh437402 HRESULT IDCompositionDevice::CreateScaleTransform([Out, Fast] IDCompositionScaleTransform** scaleTransform) IDCompositionDevice::CreateScaleTransform

Creates a 2D rotation transform object.

The new rotation transform object. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

A new 2D rotation transform object has a static value of zero for the Angle, CenterX, and CenterY properties.

hh437400 HRESULT IDCompositionDevice::CreateRotateTransform([Out, Fast] IDCompositionRotateTransform** rotateTransform) IDCompositionDevice::CreateRotateTransform

Creates a 2D skew transform object.

The new 2D skew transform object. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

A new 2D skew transform object has a static value of zero for the AngleX, AngleY, CenterX, and CenterY properties.

hh437404 HRESULT IDCompositionDevice::CreateSkewTransform([Out, Fast] IDCompositionSkewTransform** skewTransform) IDCompositionDevice::CreateSkewTransform

Creates a 2D 3-by-2 matrix transform object.

The new matrix transform object. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

A new matrix transform object has the identity matrix as its initial value. The identity matrix is the 3x2 matrix with ones on the main diagonal and zeros elsewhere, as shown in the following illustration.

When an identity transform is applied to an object, it does not change the position, shape, or size of the object. It is similar to the way that multiplying a number by one does not change the number. Any transform other than the identity transform will modify the position, shape, and/or size of objects.

hh437397 HRESULT IDCompositionDevice::CreateMatrixTransform([Out, Fast] IDCompositionMatrixTransform** matrixTransform) IDCompositionDevice::CreateMatrixTransform

Creates a 2D transform group object that holds an array of 2D transform objects.

An array of 2D transform objects that make up this transform group.

The number of elements in the transforms array.

The new transform group object. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

The array entries in a transform group cannot be changed. However, each transform in the array can be modified through its own property setting methods. If a transform in the array is modified, the change is reflected in the computed matrix of the transform group.

hh437410 HRESULT IDCompositionDevice::CreateTransformGroup([In, Buffer] IDCompositionTransform** transforms,[In] unsigned int elements,[Out, Fast] IDCompositionTransform** transformGroup) IDCompositionDevice::CreateTransformGroup

Creates a 2D transform group object that holds an array of 2D transform objects.

An array of 2D transform objects that make up this transform group.

The number of elements in the transforms array.

The new transform group object. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

The array entries in a transform group cannot be changed. However, each transform in the array can be modified through its own property setting methods. If a transform in the array is modified, the change is reflected in the computed matrix of the transform group.

hh437410 HRESULT IDCompositionDevice::CreateTransformGroup([In, Buffer] IDCompositionTransform** transforms,[In] unsigned int elements,[Out, Fast] IDCompositionTransform** transformGroup) IDCompositionDevice::CreateTransformGroup

Creates a 3D translation transform object.

The new 3D translation transform object. This parameter must not be null.

If this method succeeds, it returns . Otherwise, it returns an error code.

A newly created 3D translation transform has a static value of 0 for the OffsetX, OffsetY, and OffsetZ properties.

hh437412 HRESULT IDCompositionDevice::CreateTranslateTransform3D([Out, Fast] IDCompositionTranslateTransform3D** translateTransform3D) IDCompositionDevice::CreateTranslateTransform3D

Creates a 3D scale transform object.

The new 3D scale transform object. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

A new 3D scale transform object has a static value of 1.0 for the ScaleX, ScaleY, and ScaleZ properties.

hh437403 HRESULT IDCompositionDevice::CreateScaleTransform3D([Out, Fast] IDCompositionScaleTransform3D** scaleTransform3D) IDCompositionDevice::CreateScaleTransform3D

Creates a 3D rotation transform object.

The new 3D rotation transform object. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

A new 3D rotation transform object has a default static value of zero for the Angle, CenterX, CenterY, AxisX, and AxisY properties, and a default static value of 1.0 for the AxisZ property.

hh437401 HRESULT IDCompositionDevice::CreateRotateTransform3D([Out, Fast] IDCompositionRotateTransform3D** rotateTransform3D) IDCompositionDevice::CreateRotateTransform3D

Creates a 3D 4-by-4 matrix transform object.

The new 3D matrix transform object. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

The new 3D matrix transform has the identity matrix as its value. The identity matrix is the 4-by-4 matrix with ones on the main diagonal and zeros elsewhere, as shown in the following illustration.

When an identity transform is applied to an object, it does not change the position, shape, or size of the object. It is similar to the way that multiplying a number by one does not change the number. Any transform other than the identity transform will modify the position, shape, and/or size of objects.

hh437398 HRESULT IDCompositionDevice::CreateMatrixTransform3D([Out, Fast] IDCompositionMatrixTransform3D** matrixTransform3D) IDCompositionDevice::CreateMatrixTransform3D

Creates a 3D transform group object that holds an array of 3D transform objects.

An array of 3D transform objects that make up this transform group.

The number of elements in the transforms array.

The new 3D transform group object. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

The array entries in a 3D transform group cannot be changed. However, each transform in the array can be modified through its own property setting methods. If a transform in the array is modified, the change is reflected in the computed matrix of the transform group.

hh437409 HRESULT IDCompositionDevice::CreateTransform3DGroup([In, Buffer] IDCompositionTransform3D** transforms3D,[In] unsigned int elements,[Out, Fast] IDCompositionTransform3D** transform3DGroup) IDCompositionDevice::CreateTransform3DGroup

Creates a 3D transform group object that holds an array of 3D transform objects.

An array of 3D transform objects that make up this transform group.

The number of elements in the transforms array.

The new 3D transform group object. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

The array entries in a 3D transform group cannot be changed. However, each transform in the array can be modified through its own property setting methods. If a transform in the array is modified, the change is reflected in the computed matrix of the transform group.

hh437409 HRESULT IDCompositionDevice::CreateTransform3DGroup([In, Buffer] IDCompositionTransform3D** transforms3D,[In] unsigned int elements,[Out, Fast] IDCompositionTransform3D** transform3DGroup) IDCompositionDevice::CreateTransform3DGroup

Creates an object that represents multiple effects to be applied to a visual subtree.

The new effect group object. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

An effect group enables an application to apply multiple effects to a single visual subtree.

A new effect group has a default opacity value of 1.0 and no 3D transformations.

hh437395 HRESULT IDCompositionDevice::CreateEffectGroup([Out, Fast] IDCompositionEffectGroup** effectGroup) IDCompositionDevice::CreateEffectGroup

Creates a clip object that can be used to restrict the rendering of a visual subtree to a rectangular area.

The new clip object. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

A newly created clip object has a static value of ?FLT_MAX for the left and top properties, and a static value of ?FLT_MAX for the right and bottom properties, effectively making it a no-op clip object.

hh437399 HRESULT IDCompositionDevice::CreateRectangleClip([Out, Fast] IDCompositionRectangleClip** clip) IDCompositionDevice::CreateRectangleClip

Creates an animation object that is used to animate one or more scalar properties of one or more Microsoft DirectComposition objects.

The new animation object. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

A number of DirectComposition object properties can have an animation object as the value of the property. When a property has an animation object as its value, DirectComposition redraws the visual at the refresh rate to reflect the changing value of the property that is being animated.

A newly created animation object does not have any animation segments associated with it. An application must use the methods of the interface to build an animation function before setting the animation object as the property of another DirectComposition object.

hh437394 HRESULT IDCompositionDevice::CreateAnimation([Out, Fast] IDCompositionAnimation** animation) IDCompositionDevice::CreateAnimation

Determines whether the DirectComposition device object is still valid.

TRUE if the DirectComposition device object is still valid; otherwise .

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

If the Microsoft DirectX Graphics Infrastructure (DXGI) device is lost, the DirectComposition device associated with the DXGI device is also lost. When it detects a lost device, DirectComposition sends the WM_PAINT message to all windows that are composing DirectComposition content using the lost device. An application should call CheckDeviceState in response to each WM_PAINT message to ensure that the DirectComposition device object is still valid. The application must take steps to recover content if the device object becomes invalid. Steps include creating new DXGI and DirectComposition devices, and recreating all content. (It?s not possible to create just a new DXGI device and associate it with the existing DirectComposition device.) The system ensures that the device object remains valid between WM_PAINT messages.

Hh707428 HRESULT IDCompositionDevice::CheckDeviceState([Out] BOOL* pfValid) IDCompositionDevice::CheckDeviceState

Retrieves information from the composition engine about composition times and the frame rate.

This method retrieves timing information about the composition engine that an application can use to synchronize the rasterization of bitmaps with independent animations.

hh437415 GetFrameStatistics GetFrameStatistics HRESULT IDCompositionDevice::GetFrameStatistics([Out] DCOMPOSITION_FRAME_STATISTICS* statistics)

Represents a group of bitmap effects that are applied together to modify the rasterization of a visual's subtree.

hh437418 IDCompositionEffectGroup IDCompositionEffectGroup

Represents a bitmap effect that modifies the rasterization of a visual's subtree.

is an abstract interface that represents a bitmap effect. An effect applies to the entire visual subtree rooted at the visual that the effect is associated with. An effect object can be associated with multiple visuals. When an effect object is modified, all affected visuals are recomposed to reflect the change.

More than one effect can be simultaneously applied to a visual by using the interface.

hh437417 IDCompositionEffect IDCompositionEffect
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion. Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Animates the value of the Opacity property.

An animation that represents how the value of the Opacity property changes over time. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method makes a copy of the specified animation. If the object referenced by the animation parameter is changed after calling this method, the change does not affect the Opacity property unless this method is called again. If the Opacity property was previously animated, calling this method replaces the previous animation with the new animation.

This method fails if animation is an invalid reference or if it was not created by the same interface as the affected compostion effect group. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

hh437421 HRESULT IDCompositionEffectGroup::SetOpacity([In] IDCompositionAnimation* animation) IDCompositionEffectGroup::SetOpacity

Animates the value of the Opacity property.

An animation that represents how the value of the Opacity property changes over time. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method makes a copy of the specified animation. If the object referenced by the animation parameter is changed after calling this method, the change does not affect the Opacity property unless this method is called again. If the Opacity property was previously animated, calling this method replaces the previous animation with the new animation.

This method fails if animation is an invalid reference or if it was not created by the same interface as the affected compostion effect group. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

hh437421 HRESULT IDCompositionEffectGroup::SetOpacity([In] float opacity) IDCompositionEffectGroup::SetOpacity

Sets the 3D transformation effect object that modifies the rasterization of the visuals that this effect group is applied to.

Pointer to an interface or one of its derived interfaces. This parameter can be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if transform3D is an invalid reference, or if the reference was not created by the same interface as this effect group. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

If the transform3D parameter is null, the effect group does not apply any perspective transformations to the visuals. Setting the transform to null is equivalent to setting the transform to an object where the specified matrix is the identity matrix. However, an application should use a null transform whenever possible because it is slightly faster.

hh437423 HRESULT IDCompositionEffectGroup::SetTransform3D([In, Optional] IDCompositionTransform3D* transform3D) IDCompositionEffectGroup::SetTransform3D

Sets the 3D transformation effect object that modifies the rasterization of the visuals that this effect group is applied to.

This method fails if transform3D is an invalid reference, or if the reference was not created by the same interface as this effect group. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

If the transform3D parameter is null, the effect group does not apply any perspective transformations to the visuals. Setting the transform to null is equivalent to setting the transform to an object where the specified matrix is the identity matrix. However, an application should use a null transform whenever possible because it is slightly faster.

hh437423 SetTransform3D SetTransform3D HRESULT IDCompositionEffectGroup::SetTransform3D([In, Optional] IDCompositionTransform3D* transform3D)

Represents an arbitrary affine 2D transformation defined by a 3-by-2 matrix.

hh437424 IDCompositionMatrixTransform IDCompositionMatrixTransform

Represents a 2D transformation that can be used to modify the coordinate space of a visual subtree.

The interface is an abstract interface that represents a 2D affine transformation. Transformations affect the entire visual subtree that is rooted at the visual that the transform is associated with. A transform object can be associated with multiple visuals. When a transform object is modified, all affected visuals are recomposed to reflect the change.

Transforms operate by modifying the coordinate system for all rendering operations on a visual. For example, ordinarily a bitmap that is associated with a visual draws at position (0,0) and extends the full width and height of the bitmap. If a translation transform is applied, the bitmap draws at a position that is offset by that transform. If a scale transform is applied, the extent covered by the bitmap is affected by the scale transform. More than one transform can be simultaneously applied to a visual by using the interface.

hh449110 IDCompositionTransform IDCompositionTransform

Represents a 3D transformation effect that can be used to modify the rasterization of a visual subtree.

The interface is an abstract interface that represents a 3D perspective transformation effect. A 3D transform object can be associated with multiple visuals and multiple effect groups. When a 3D transform object is modified, all affected visuals are recomposed to reflect the change.

hh449112 IDCompositionTransform3D IDCompositionTransform3D
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion. Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion. Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Changes all values of the matrix of this 2D transform.

The new matrix for this 2D transform.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if any of the matrix values are NaN, positive infinity, or negative infinity.

If any of the matrix elements were previously animated, this method removes the animations and sets the elements to the specified static value.

hh437430 HRESULT IDCompositionMatrixTransform::SetMatrix([In] const D2D_MATRIX_3X2_F& matrix) IDCompositionMatrixTransform::SetMatrix
Changes or animates the value of one element of the matrix of this 2D transform. No documentation. No documentation. No documentation. No documentation. hh437433 HRESULT IDCompositionMatrixTransform::SetMatrixElement([In] int row,[In] int column,[In] IDCompositionAnimation* animation) IDCompositionMatrixTransform::SetMatrixElement Changes or animates the value of one element of the matrix of this 2D transform. No documentation. No documentation. No documentation. No documentation. hh437433 HRESULT IDCompositionMatrixTransform::SetMatrixElement([In] int row,[In] int column,[In] float value) IDCompositionMatrixTransform::SetMatrixElement

Represents an arbitrary 3D transformation defined by a 4-by-4 matrix.

A 3D matrix transform represents the following 4-by-4 matrix:

The application can set any of the values in the first three columns. Note that the fourth column is padded to allow for matrix concatenation.

hh437425 IDCompositionMatrixTransform3D IDCompositionMatrixTransform3D
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Changes all values of the matrix of this 3D transformation effect.

The new matrix for this 3D transformation effect.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if any of the matrix values are NaN, positive infinity, or negative infinity.

If any of the matrix elements were previously animated, this method removes the animations and sets the elements to the specified static value.

hh437426 HRESULT IDCompositionMatrixTransform3D::SetMatrix([In] const D3DMATRIX& matrix) IDCompositionMatrixTransform3D::SetMatrix

Animates the value of one element of the matrix of this 3D transform.

The row index of the element to change. This value must be between 0 and 3, inclusive.

The column index of the element to change. This value must be between 0 and 3, inclusive.

An animation that represents how the value of the specified element changes over time. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method makes a copy of the specified animation. If the object referenced by the animation parameter is changed after calling this method, the change does not affect the specified element unless this method is called again. If the specified element was previously animated, calling this method replaces the previous animation with the new animation.

This method fails if animation is an invalid reference or if it was not created by the same interface as the affected transform. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

hh437428 HRESULT IDCompositionMatrixTransform3D::SetMatrixElement([In] int row,[In] int column,[In] IDCompositionAnimation* animation) IDCompositionMatrixTransform3D::SetMatrixElement

Animates the value of one element of the matrix of this 3D transform.

The row index of the element to change. This value must be between 0 and 3, inclusive.

The column index of the element to change. This value must be between 0 and 3, inclusive.

An animation that represents how the value of the specified element changes over time. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method makes a copy of the specified animation. If the object referenced by the animation parameter is changed after calling this method, the change does not affect the specified element unless this method is called again. If the specified element was previously animated, calling this method replaces the previous animation with the new animation.

This method fails if animation is an invalid reference or if it was not created by the same interface as the affected transform. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

hh437428 HRESULT IDCompositionMatrixTransform3D::SetMatrixElement([In] int row,[In] int column,[In] float value) IDCompositionMatrixTransform3D::SetMatrixElement

Specifies the backface visibility to be applied to a visual.

dn280348 DCOMPOSITION_BACKFACE_VISIBILITY DCOMPOSITION_BACKFACE_VISIBILITY

Surfaces in this visual's sub-tree are visible regardless of transformation.

dn280348 DCOMPOSITION_BACKFACE_VISIBILITY_VISIBLE DCOMPOSITION_BACKFACE_VISIBILITY_VISIBLE

Surfaces in this visual's sub-tree are only visible when facing the observer.

dn280348 DCOMPOSITION_BACKFACE_VISIBILITY_HIDDEN DCOMPOSITION_BACKFACE_VISIBILITY_HIDDEN

The back face visibility is the same as that of the target visual's parent visual.

dn280348 DCOMPOSITION_BACKFACE_VISIBILITY_INHERIT DCOMPOSITION_BACKFACE_VISIBILITY_INHERIT

Specifies the interpolation mode to be used when a bitmap is composed with any transform where the pixels in the bitmap don't line up exactly one-to-one with pixels on screen.

The default interpolation mode for a visual is . If all visuals in a visual tree specify this mode, the default for all visuals is nearest neighbor sampling, which is the fastest mode.

A single visual can have any combination of visual properties. However, if a visual has the following combination of properties, the borders of the visual will default to .

  • SetCompositeMode()
  • SetBorderMode()
  • SetBitmapInterpolationMode()

If you want a visual to be drawn with antialiasing, use for the content of the visual, and for the edges.

hh437364 DCOMPOSITION_BITMAP_INTERPOLATION_MODE DCOMPOSITION_BITMAP_INTERPOLATION_MODE

Bitmaps are interpolated by using nearest-neighbor sampling.

hh437364 DCOMPOSITION_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR DCOMPOSITION_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR

Bitmaps are interpolated by using linear sampling.

hh437364 DCOMPOSITION_BITMAP_INTERPOLATION_MODE_LINEAR DCOMPOSITION_BITMAP_INTERPOLATION_MODE_LINEAR

Bitmaps are interpolated according to the mode established by the parent visual.

hh437364 DCOMPOSITION_BITMAP_INTERPOLATION_MODE_INHERIT DCOMPOSITION_BITMAP_INTERPOLATION_MODE_INHERIT

Specifies the border mode to use when composing a bitmap or applying a clip with any transform such that the edges of the bitmap or clip are not axis-aligned with integer coordinates.

The default border mode for any given visual is , which delegates the determination of the border mode to the parent visual. If all visuals in a visual tree specify this mode, the default for all visuals is aliased rendering, which is the fastest mode.

A single visual can have any combination of visual properties. However, if a visual has the following combination of properties, the borders of the visual will default to .

  • SetCompositeMode()
  • SetBorderMode()
  • SetBitmapInterpolationMode()

If you want a visual to be drawn with antialiasing, use for the content of the visual, and for the edges.

hh437365 DCOMPOSITION_BORDER_MODE DCOMPOSITION_BORDER_MODE

Bitmap and clip edges are antialiased.

hh437365 DCOMPOSITION_BORDER_MODE_SOFT DCOMPOSITION_BORDER_MODE_SOFT

Bitmap and clip edges are aliased. See Remarks.

hh437365 DCOMPOSITION_BORDER_MODE_HARD DCOMPOSITION_BORDER_MODE_HARD

Bitmap and clip edges are drawn according to the mode established by the parent visual.

hh437365 DCOMPOSITION_BORDER_MODE_INHERIT DCOMPOSITION_BORDER_MODE_INHERIT

The mode to use to blend the bitmap content of a visual with the render target.

A single visual can have any combination of visual properties. However, if a visual has the following combination of properties, the borders of the visual will default to .

  • SetCompositeMode()
  • SetBorderMode()
  • SetBitmapInterpolationMode()

If you want a visual to be drawn with antialiasing, use for the content of the visual, and for the edges.

Hh802900 DCOMPOSITION_COMPOSITE_MODE DCOMPOSITION_COMPOSITE_MODE

The standard source-over-destination blend mode.

Hh802900 DCOMPOSITION_COMPOSITE_MODE_SOURCE_OVER DCOMPOSITION_COMPOSITE_MODE_SOURCE_OVER

The bitmap colors are inverted.

Hh802900 DCOMPOSITION_COMPOSITE_MODE_DESTINATION_INVERT DCOMPOSITION_COMPOSITE_MODE_DESTINATION_INVERT

Bitmap colors subtract for color channels in the background.

Hh802900 DCOMPOSITION_COMPOSITE_MODE_MIN_BLEND DCOMPOSITION_COMPOSITE_MODE_MIN_BLEND

Bitmaps are blended according to the mode established by the parent visual.

Hh802900 DCOMPOSITION_COMPOSITE_MODE_INHERIT DCOMPOSITION_COMPOSITE_MODE_INHERIT

Specifies how the effective opacity value of a visual is applied to that visual?s content and children.

dn280349 DCOMPOSITION_OPACITY_MODE DCOMPOSITION_OPACITY_MODE

The target visual defines a logical layer into which its entire sub-tree is composed with a starting effective opacity of 1.0. The original opacity value is then used to blend the layer onto the visual?s background.

dn280349 DCOMPOSITION_OPACITY_MODE_LAYER DCOMPOSITION_OPACITY_MODE_LAYER

The opacity value is multiplied with the effective opacity of the parent visual and the result is then individually applied to each piece of content in this visual?s sub-tree.

dn280349 DCOMPOSITION_OPACITY_MODE_MULTIPLY DCOMPOSITION_OPACITY_MODE_MULTIPLY

The opacity mode is the same as that of the target visual?s parent visual.

dn280349 DCOMPOSITION_OPACITY_MODE_INHERIT DCOMPOSITION_OPACITY_MODE_INHERIT
Functions

Creates a new composition surface object that can be bound to a Microsoft DirectX swap chain or swap buffer and associated with a visual.

The requested access to the composition surface object. It can be one of the following values:

ValueMeaning
0x0000L

No access.

COMPOSITIONSURFACE_READ
0x0001L

Read access. For internal use only.

COMPOSITIONSURFACE_WRITE
0x0002L

Write access. For internal use only.

COMPOSITIONSURFACE_ALL_ACCESS
0x0003L

Read/write access. Always specify this flag except when duplicating a surface in another process, in which case set desiredAccess to 0.

?

Contains the security descriptor for the composition surface object, and specifies whether the handle of the composition surface object is inheritable when a child process is created. If this parameter is null, the composition surface object is created with default security attributes that grant read and write access to the current process, but do not enable child processes to inherit the handle.

The handle of the new composition surface object. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

hh437360 HRESULT DCompositionCreateSurfaceHandle([In] unsigned int desiredAccess,[In, Optional] SECURITY_ATTRIBUTES* securityAttributes,[Out] void** surfaceHandle) DCompositionCreateSurfaceHandle

Creates a new device object that can be used to create other Microsoft DirectComposition objects.

An optional reference to a DirectX device to be used to create DirectComposition surface objects. Must be a reference to an object implementing the or interfaces.

The identifier of the interface to retrieve. This must be one of __uuidof() or __uuidof().

Receives an interface reference to the newly created device object. The reference is of the type specified by the iid parameter. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

A device object serves as the factory for all other DirectComposition objects. It also controls transactional composition through the method.

The renderingDevice parameter may point to a DXGI, Direct3D, Direct2D device object, or it may be null. This parameter affects the behavior of the , and methods.

If the renderingDevice parameter is null then the returned DirectComposition device cannot directly create DirectComposition surface objects. In particular, and methods return E_INVALIDARG, regardless of the supplied parameters. However, such a DirectComposition device object can still be used to indirectly create surfaces if the application creates a surface factory object via the method.

If the renderingDevice parameter points to a DXGI device, that device is used to allocate all video memory needed by the and methods. Moreover, the method returns an interface reference to a DXGI surface that belongs to that same DXGI device.

If the renderingDevice parameter points to a Direct2D device object, DirectComposition extracts from it the underlying DXGI device object and uses it as if that DXGI device object had been passed in as the renderingDevice parameter. However, passing in a Direct2D object further causes to accept __uuidof() for its iid parameter for any objects created with the or methods. In that case, the Direct2D device context object returned by will belong to the same Direct2D device passed as the renderingDevice parameter.

If the iid parameter is __uuidof(), then the dcompositionDevice parameter receives a reference to a Version 1 interface, but the underlying object is a Version 2 desktop device object. The application can later obtain a reference to either the or interfaces by calling the QueryInterface method on that device. Similarly, all DirectComposition objects created from such a device are Version 2 objects under the covers. For example, the method will return an interface to the created visual, but the application can obtain a reference to the interface via the QueryInterface method. This behavior allows an application written to the DirectComposition V1 API to incrementally adopt DirectComposition V2 features by changing the device creation method from to , while still requesting the interface. This allows the rest of the code to remain unchanged, while allowing the application to use QueryInterface in just the places where new functionality is needed.

dn280347 HRESULT DCompositionCreateDevice2([In, Optional] IUnknown* renderingDevice,[In] const GUID& iid,[Out] void** dcompositionDevice) DCompositionCreateDevice2

Creates a new device object that can be used to create other Microsoft DirectComposition objects.

The DXGI device to use to create DirectComposition surface objects.

The identifier of the interface to retrieve.

Receives an interface reference to the newly created device object. The reference is of the type specified by the iid parameter. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

A device object serves as the factory for all other DirectComposition objects. It also controls transactional composition through the method.

The DXGI device specified by dxgiDevice is used to create all DirectComposition surface objects. In particular, the method returns an interface reference to a DXGI surface that belongs to the device specified by the dxgiDevice parameter.

When creating the DXGI device, developers must specify the D3D11_CREATE_DEVICE BGRA_SUPPORT or flag for Direct2D interoperability with Microsoft Direct3D resources.

The iid parameter must be __uuidof(), and the dcompositionDevice parameter receives a reference to an interface.

hh437359 HRESULT DCompositionCreateDevice([In, Optional] IDXGIDevice* dxgiDevice,[In] const GUID& iid,[Out] void** dcompositionDevice) DCompositionCreateDevice
Functions Constant SurfaceNotBeingRendered. DCOMPOSITION_ERROR_SURFACE_NOT_BEING_RENDERED Constant WindowAlreadyComposed. DCOMPOSITION_ERROR_WINDOW_ALREADY_COMPOSED Constant SurfaceBeingRendered. DCOMPOSITION_ERROR_SURFACE_BEING_RENDERED

Represents a clip object that is used to restrict the rendering of a visual subtree to a rectangular area.

hh437391 IDCompositionClip IDCompositionClip
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Provides access to rendering features that help with application debugging and performance tuning. This interface can be queried from the DirectComposition device interface.

dn280378 IDCompositionDeviceDebug IDCompositionDeviceDebug
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Enables display of performance debugging counters.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

Performance counters are displayed on the top-right corner of the screen. From left to right, Microsoft DirectComposition displays the following information:

  • The composition engine frame rate, in frames per second, averaged over the last 60 composition frames
  • The overall CPU usage of the composition thread, in milliseconds

The DirectComposition composition engine operates on the entire desktop all at once, so the performance counters measure the total cost of desktop composition, not just the cost of any one particular application. If the application occupies the entire screen, however, it is reasonable to assume that all of the composition cost is due to that one application.

dn280380 HRESULT IDCompositionDeviceDebug::EnableDebugCounters() IDCompositionDeviceDebug::EnableDebugCounters

Disables display of performance debugging counters.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

Microsoft DirectComposition keeps a count of how many DirectComposition devices have performance counters enabled, for the entire desktop session. If the count is non-zero, the performance counters are displayed. Therefore, disabling the counters may not make them go away if another device is also requesting display of the counters.

dn280379 HRESULT IDCompositionDeviceDebug::DisableDebugCounters() IDCompositionDeviceDebug::DisableDebugCounters

Represents a clip object that restricts the rendering of a visual subtree to the specified rectangular region. Optionally, the clip object may have rounded corners specified.

hh437434 IDCompositionRectangleClip IDCompositionRectangleClip
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Changes the value of the Left property of a clip rectangle. The Left property specifies the x-coordinate of the upper-left corner of the clip rectangle.

The new value of the Left property, in pixels.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the left parameter is NaN, positive infinity, or negative infinity.

If the Left property was previously animated, this method removes the animation and sets the Left property to the specified static value.

hh448899 HRESULT IDCompositionRectangleClip::SetLeft([In] IDCompositionAnimation* animation) IDCompositionRectangleClip::SetLeft

Changes the value of the Left property of a clip rectangle. The Left property specifies the x-coordinate of the upper-left corner of the clip rectangle.

The new value of the Left property, in pixels.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the left parameter is NaN, positive infinity, or negative infinity.

If the Left property was previously animated, this method removes the animation and sets the Left property to the specified static value.

hh448899 HRESULT IDCompositionRectangleClip::SetLeft([In] float left) IDCompositionRectangleClip::SetLeft

Changes the value of the Top property of a clip rectangle. The Top property specifies the y-coordinate of the upper-left corner of the clip rectangle.

The new value of the Top property, in pixels.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the top parameter is NaN, positive infinity, or negative infinity.

If the Top property was previously animated, this method removes the animation and sets the Top property to the specified static value.

hh448921 HRESULT IDCompositionRectangleClip::SetTop([In] IDCompositionAnimation* animation) IDCompositionRectangleClip::SetTop

Changes the value of the Top property of a clip rectangle. The Top property specifies the y-coordinate of the upper-left corner of the clip rectangle.

The new value of the Top property, in pixels.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the top parameter is NaN, positive infinity, or negative infinity.

If the Top property was previously animated, this method removes the animation and sets the Top property to the specified static value.

hh448921 HRESULT IDCompositionRectangleClip::SetTop([In] float top) IDCompositionRectangleClip::SetTop

Animates the value of the Right property of a clip rectangle. The Right property specifies the x-coordinate of the lower-right corner of the clip rectangle.

An animation object that determines how the value of the Right property changes over time. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method makes a copy of the specified animation. If the object referenced by the animation parameter is changed after calling this method, the change does not affect the Right property unless this method is called again. If the Right property was previously animated, calling this method replaces the previous animation with the new animation.

This method fails if animation is an invalid reference or if it was not created by the same interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

hh448907 HRESULT IDCompositionRectangleClip::SetRight([In] IDCompositionAnimation* animation) IDCompositionRectangleClip::SetRight

Animates the value of the Right property of a clip rectangle. The Right property specifies the x-coordinate of the lower-right corner of the clip rectangle.

An animation object that determines how the value of the Right property changes over time. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method makes a copy of the specified animation. If the object referenced by the animation parameter is changed after calling this method, the change does not affect the Right property unless this method is called again. If the Right property was previously animated, calling this method replaces the previous animation with the new animation.

This method fails if animation is an invalid reference or if it was not created by the same interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

hh448907 HRESULT IDCompositionRectangleClip::SetRight([In] float right) IDCompositionRectangleClip::SetRight

Changes the value of the Bottom property of a clip object. The Bottom property specifies the y-coordinate of the lower-right corner of the clip rectangle.

The new value of the Bottom property, in pixels.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the bottom parameter is NaN, positive infinity, or negative infinity.

If the Bottom property was previously animated, this method removes the animation and sets the Bottom property to the specified static value.

hh448860 HRESULT IDCompositionRectangleClip::SetBottom([In] IDCompositionAnimation* animation) IDCompositionRectangleClip::SetBottom

Changes the value of the Bottom property of a clip object. The Bottom property specifies the y-coordinate of the lower-right corner of the clip rectangle.

The new value of the Bottom property, in pixels.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the bottom parameter is NaN, positive infinity, or negative infinity.

If the Bottom property was previously animated, this method removes the animation and sets the Bottom property to the specified static value.

hh448860 HRESULT IDCompositionRectangleClip::SetBottom([In] float bottom) IDCompositionRectangleClip::SetBottom

Animates the value of the TopLeftRadiusX property of this clip. The TopLeftRadiusX property specifies the x radius of the ellipse that rounds the top-left corner of the clip.

An animation object that determines how the value of the x radius changes over time. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method makes a copy of the specified animation. If the object referenced by the animation parameter is changed after calling this method, the change does not affect the x radius unless this method is called again. If the x radius was previously animated, calling this method replaces the previous animation with the new animation.

This method fails if animation is an invalid reference or if it was not created by the same interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

hh448911 HRESULT IDCompositionRectangleClip::SetTopLeftRadiusX([In] IDCompositionAnimation* animation) IDCompositionRectangleClip::SetTopLeftRadiusX

Animates the value of the TopLeftRadiusX property of this clip. The TopLeftRadiusX property specifies the x radius of the ellipse that rounds the top-left corner of the clip.

An animation object that determines how the value of the x radius changes over time. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method makes a copy of the specified animation. If the object referenced by the animation parameter is changed after calling this method, the change does not affect the x radius unless this method is called again. If the x radius was previously animated, calling this method replaces the previous animation with the new animation.

This method fails if animation is an invalid reference or if it was not created by the same interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

hh448911 HRESULT IDCompositionRectangleClip::SetTopLeftRadiusX([In] float radius) IDCompositionRectangleClip::SetTopLeftRadiusX

Animates the value of the TopLeftRadiusY property of this clip. The TopLeftRadiusY property specifies the y radius of the ellipse that rounds the top-left corner of the clip.

An animation object that determines how the value of the y radius changes over time. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method makes a copy of the specified animation. If the object referenced by the animation parameter is changed after calling this method, the change does not affect the y radius unless this method is called again. If the y radius was previously animated, calling this method replaces the previous animation with the new animation.

This method fails if animation is an invalid reference or if it was not created by the same interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

hh448914 HRESULT IDCompositionRectangleClip::SetTopLeftRadiusY([In] IDCompositionAnimation* animation) IDCompositionRectangleClip::SetTopLeftRadiusY

Animates the value of the TopLeftRadiusY property of this clip. The TopLeftRadiusY property specifies the y radius of the ellipse that rounds the top-left corner of the clip.

An animation object that determines how the value of the y radius changes over time. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method makes a copy of the specified animation. If the object referenced by the animation parameter is changed after calling this method, the change does not affect the y radius unless this method is called again. If the y radius was previously animated, calling this method replaces the previous animation with the new animation.

This method fails if animation is an invalid reference or if it was not created by the same interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

hh448914 HRESULT IDCompositionRectangleClip::SetTopLeftRadiusY([In] float radius) IDCompositionRectangleClip::SetTopLeftRadiusY

Animates the value of the TopRightRadiusX property of this clip. The TopRightRadiusX property specifies the x radius of the ellipse that rounds the top-right corner of the clip.

An animation object that determines how the value of the x radius changes over time. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method makes a copy of the specified animation. If the object referenced by the animation parameter is changed after calling this method, the change does not affect the x radius unless this method is called again. If the x radius was previously animated, calling this method replaces the previous animation with the new animation.

This method fails if animation is an invalid reference or if it was not created by the same interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

hh448917 HRESULT IDCompositionRectangleClip::SetTopRightRadiusX([In] IDCompositionAnimation* animation) IDCompositionRectangleClip::SetTopRightRadiusX

Animates the value of the TopRightRadiusX property of this clip. The TopRightRadiusX property specifies the x radius of the ellipse that rounds the top-right corner of the clip.

An animation object that determines how the value of the x radius changes over time. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method makes a copy of the specified animation. If the object referenced by the animation parameter is changed after calling this method, the change does not affect the x radius unless this method is called again. If the x radius was previously animated, calling this method replaces the previous animation with the new animation.

This method fails if animation is an invalid reference or if it was not created by the same interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

hh448917 HRESULT IDCompositionRectangleClip::SetTopRightRadiusX([In] float radius) IDCompositionRectangleClip::SetTopRightRadiusX

Animates the value of the TopRightRadiusY property of this clip. The TopRightRadiusY property specifies the y radius of the ellipse that rounds the top-right corner of the clip.

An animation object that determines how the value of the y radius changes over time. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method makes a copy of the specified animation. If the object referenced by the animation parameter is changed after calling this method, the change does not affect the y radius unless this method is called again. If the y radius was previously animated, calling this method replaces the previous animation with the new animation.

This method fails if animation is an invalid reference or if it was not created by the same interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

hh448920 HRESULT IDCompositionRectangleClip::SetTopRightRadiusY([In] IDCompositionAnimation* animation) IDCompositionRectangleClip::SetTopRightRadiusY

Animates the value of the TopRightRadiusY property of this clip. The TopRightRadiusY property specifies the y radius of the ellipse that rounds the top-right corner of the clip.

An animation object that determines how the value of the y radius changes over time. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method makes a copy of the specified animation. If the object referenced by the animation parameter is changed after calling this method, the change does not affect the y radius unless this method is called again. If the y radius was previously animated, calling this method replaces the previous animation with the new animation.

This method fails if animation is an invalid reference or if it was not created by the same interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

hh448920 HRESULT IDCompositionRectangleClip::SetTopRightRadiusY([In] float radius) IDCompositionRectangleClip::SetTopRightRadiusY

Animates the value of the BottomLeftRadiusX property of this clip. The BottomLeftRadiusX property specifies the x radius of the ellipse that rounds the lower-left corner of the clip.

An animation object that determines how the value of the x radius changes over time. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method makes a copy of the specified animation. If the object referenced by the animation parameter is changed after calling this method, the change does not affect the x radius unless this method is called again. If the x radius was previously animated, calling this method replaces the previous animation with the new animation.

This method fails if animation is an invalid reference or if it was not created by the same interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

hh437438 HRESULT IDCompositionRectangleClip::SetBottomLeftRadiusX([In] IDCompositionAnimation* animation) IDCompositionRectangleClip::SetBottomLeftRadiusX

Animates the value of the BottomLeftRadiusX property of this clip. The BottomLeftRadiusX property specifies the x radius of the ellipse that rounds the lower-left corner of the clip.

An animation object that determines how the value of the x radius changes over time. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method makes a copy of the specified animation. If the object referenced by the animation parameter is changed after calling this method, the change does not affect the x radius unless this method is called again. If the x radius was previously animated, calling this method replaces the previous animation with the new animation.

This method fails if animation is an invalid reference or if it was not created by the same interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

hh437438 HRESULT IDCompositionRectangleClip::SetBottomLeftRadiusX([In] float radius) IDCompositionRectangleClip::SetBottomLeftRadiusX

Animates the value of the BottomLeftRadiusY property of this clip. The BottomLeftRadiusY property specifies the y radius of the ellipse that rounds the lower-left corner of the clip.

An animation object that determines how the value of the y radius changes over time. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method makes a copy of the specified animation. If the object referenced by the animation parameter is changed after calling this method, the change does not affect the y radius unless this method is called again. If the y radius was previously animated, calling this method replaces the previous animation with the new animation.

This method fails if animation is an invalid reference or if it was not created by the same interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

hh437445 HRESULT IDCompositionRectangleClip::SetBottomLeftRadiusY([In] IDCompositionAnimation* animation) IDCompositionRectangleClip::SetBottomLeftRadiusY

Animates the value of the BottomLeftRadiusY property of this clip. The BottomLeftRadiusY property specifies the y radius of the ellipse that rounds the lower-left corner of the clip.

An animation object that determines how the value of the y radius changes over time. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method makes a copy of the specified animation. If the object referenced by the animation parameter is changed after calling this method, the change does not affect the y radius unless this method is called again. If the y radius was previously animated, calling this method replaces the previous animation with the new animation.

This method fails if animation is an invalid reference or if it was not created by the same interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

hh437445 HRESULT IDCompositionRectangleClip::SetBottomLeftRadiusY([In] float radius) IDCompositionRectangleClip::SetBottomLeftRadiusY

Animates the value of the BottomRightRadiusX property of this clip. The BottomRightRadiusX property specifies the x radius of the ellipse that rounds the lower-right corner of the clip.

An animation object that determines how the value of the x radius changes over time. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method makes a copy of the specified animation. If the object referenced by the animation parameter is changed after calling this method, the change does not affect the x radius unless this method is called again. If the x radius was previously animated, calling this method replaces the previous animation with the new animation.

This method fails if animation is an invalid reference or if it was not created by the same interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

hh448853 HRESULT IDCompositionRectangleClip::SetBottomRightRadiusX([In] IDCompositionAnimation* animation) IDCompositionRectangleClip::SetBottomRightRadiusX

Animates the value of the BottomRightRadiusX property of this clip. The BottomRightRadiusX property specifies the x radius of the ellipse that rounds the lower-right corner of the clip.

An animation object that determines how the value of the x radius changes over time. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method makes a copy of the specified animation. If the object referenced by the animation parameter is changed after calling this method, the change does not affect the x radius unless this method is called again. If the x radius was previously animated, calling this method replaces the previous animation with the new animation.

This method fails if animation is an invalid reference or if it was not created by the same interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

hh448853 HRESULT IDCompositionRectangleClip::SetBottomRightRadiusX([In] float radius) IDCompositionRectangleClip::SetBottomRightRadiusX

Animates the value of the BottomRightRadiusY property of this clip. The BottomRightRadiusY property specifies the y radius of the ellipse that rounds the lower-right corner of the clip.

An animation object that determines how the value of the y radius changes over time. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method makes a copy of the specified animation. If the object referenced by the animation parameter is changed after calling this method, the change does not affect the y radius unless this method is called again. If the y radius was previously animated, calling this method replaces the previous animation with the new animation.

This method fails if animation is an invalid reference or if it was not created by the same interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

hh448858 HRESULT IDCompositionRectangleClip::SetBottomRightRadiusY([In] IDCompositionAnimation* animation) IDCompositionRectangleClip::SetBottomRightRadiusY

Animates the value of the BottomRightRadiusY property of this clip. The BottomRightRadiusY property specifies the y radius of the ellipse that rounds the lower-right corner of the clip.

An animation object that determines how the value of the y radius changes over time. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method makes a copy of the specified animation. If the object referenced by the animation parameter is changed after calling this method, the change does not affect the y radius unless this method is called again. If the y radius was previously animated, calling this method replaces the previous animation with the new animation.

This method fails if animation is an invalid reference or if it was not created by the same interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

hh448858 HRESULT IDCompositionRectangleClip::SetBottomRightRadiusY([In] float radius) IDCompositionRectangleClip::SetBottomRightRadiusY

Represents a 2D transformation that affects the rotation of a visual around the z-axis. The coordinate system is rotated around the specified center point.

A rotate transform represents the following 3-by-3 matrix:

The effect is to rotate the coordinate system clockwise or counter-clockwise, and to apply the corresponding translation such that the center point does not move.

hh448924 IDCompositionRotateTransform IDCompositionRotateTransform
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Animates the value of the Angle property of a 2D rotation transform. The Angle property specifies the rotation angle.

An animation object that determines how the value of the Angle property changes over time. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method makes a copy of the specified animation. If the object referenced by the animation parameter is changed after calling this method, the change does not affect the Angle property unless this method is called again. If the Angle property was previously animated, calling this method replaces the previous animation with the new animation.

This method fails if animation is an invalid reference or if it was not created by the same interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

hh448974 HRESULT IDCompositionRotateTransform::SetAngle([In] IDCompositionAnimation* animation) IDCompositionRotateTransform::SetAngle

Animates the value of the Angle property of a 2D rotation transform. The Angle property specifies the rotation angle.

An animation object that determines how the value of the Angle property changes over time. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method makes a copy of the specified animation. If the object referenced by the animation parameter is changed after calling this method, the change does not affect the Angle property unless this method is called again. If the Angle property was previously animated, calling this method replaces the previous animation with the new animation.

This method fails if animation is an invalid reference or if it was not created by the same interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

hh448974 HRESULT IDCompositionRotateTransform::SetAngle([In] float angle) IDCompositionRotateTransform::SetAngle

Changes the value of the CenterX property of a 2D rotation transform. The CenterX property specifies the x-coordinate of the point about which the rotation is performed.

The new x-coordinate of the center point.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the centerX parameter is NaN, positive infinity, or negative infinity.

If the CenterX property was previously animated, this method removes the animation and sets the CenterX property to the specified static value.

hh448978 HRESULT IDCompositionRotateTransform::SetCenterX([In] IDCompositionAnimation* animation) IDCompositionRotateTransform::SetCenterX

Changes the value of the CenterX property of a 2D rotation transform. The CenterX property specifies the x-coordinate of the point about which the rotation is performed.

The new x-coordinate of the center point.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the centerX parameter is NaN, positive infinity, or negative infinity.

If the CenterX property was previously animated, this method removes the animation and sets the CenterX property to the specified static value.

hh448978 HRESULT IDCompositionRotateTransform::SetCenterX([In] float centerX) IDCompositionRotateTransform::SetCenterX

Changes the value of the CenterY property of a 2D rotation transform. The CenterY property specifies the y-coordinate of the point about which the rotation is performed.

The new y-coordinate of the center point.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the centerY parameter is NaN, positive infinity, or negative infinity.

If the CenterY property was previously animated, this method removes the animation and sets the CenterY property to the specified static value.

hh448984 HRESULT IDCompositionRotateTransform::SetCenterY([In] IDCompositionAnimation* animation) IDCompositionRotateTransform::SetCenterY

Changes the value of the CenterY property of a 2D rotation transform. The CenterY property specifies the y-coordinate of the point about which the rotation is performed.

The new y-coordinate of the center point.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the centerY parameter is NaN, positive infinity, or negative infinity.

If the CenterY property was previously animated, this method removes the animation and sets the CenterY property to the specified static value.

hh448984 HRESULT IDCompositionRotateTransform::SetCenterY([In] float centerY) IDCompositionRotateTransform::SetCenterY

Represents a 3D transformation that affects the rotation of a visual along an arbitrary axis in 3D space. The coordinate system is rotated around the specified center point.

A 3D rotate transform represents the following 4-by-4 matrix:

where the offsetX, offsetY, and offsetZ values of the matrix are the following:

The effect is to rotate the coordinate system clockwise or counter-clockwise around the specified axis, and to apply the corresponding translation such that the center point does not move.

A new 3D rotation transform object has a default static value of zero for the Angle, CenterX, CenterY, AxisX, and AxisY properties, and a default static value of 1.0 for the AxisZ property.

When setting the axis to a non-default value, you should always set all three axis properties (AxisX, AxisY, and AxisZ).

hh448927 IDCompositionRotateTransform3D IDCompositionRotateTransform3D
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Animates the value of the Angle property of a 3D rotation transform. The Angle property specifies the rotation angle. The default value is zero.

An animation object that determines how the value of the Angle property changes over time. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method makes a copy of the specified animation. If the object referenced by the animation parameter is changed after calling this method, the change does not affect the Angle property unless this method is called again. If the Angle property was previously animated, calling this method replaces the previous animation with the new animation.

This method fails if animation is an invalid reference or if it was not created by the same interface as the affected 3D transform. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

hh448931 HRESULT IDCompositionRotateTransform3D::SetAngle([In] IDCompositionAnimation* animation) IDCompositionRotateTransform3D::SetAngle

Animates the value of the Angle property of a 3D rotation transform. The Angle property specifies the rotation angle. The default value is zero.

An animation object that determines how the value of the Angle property changes over time. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method makes a copy of the specified animation. If the object referenced by the animation parameter is changed after calling this method, the change does not affect the Angle property unless this method is called again. If the Angle property was previously animated, calling this method replaces the previous animation with the new animation.

This method fails if animation is an invalid reference or if it was not created by the same interface as the affected 3D transform. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

hh448931 HRESULT IDCompositionRotateTransform3D::SetAngle([In] float angle) IDCompositionRotateTransform3D::SetAngle

Changes the value of the AxisX property of a 3D rotation transform. The AxisX property specifies the x-coordinate for the axis vector of rotation. The default value is zero.

The new x-coordinate for the axis vector of rotation.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

When setting the axis to a non-default value, you should always set all three axis properties (AxisX, AxisY, and AxisZ).

This method fails if the axisX parameter is NaN, positive infinity, or negative infinity.

If the AxisX property was previously animated, this method removes the animation and sets the AxisX property to the specified static value.

hh448935 HRESULT IDCompositionRotateTransform3D::SetAxisX([In] IDCompositionAnimation* animation) IDCompositionRotateTransform3D::SetAxisX

Changes the value of the AxisX property of a 3D rotation transform. The AxisX property specifies the x-coordinate for the axis vector of rotation. The default value is zero.

The new x-coordinate for the axis vector of rotation.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

When setting the axis to a non-default value, you should always set all three axis properties (AxisX, AxisY, and AxisZ).

This method fails if the axisX parameter is NaN, positive infinity, or negative infinity.

If the AxisX property was previously animated, this method removes the animation and sets the AxisX property to the specified static value.

hh448935 HRESULT IDCompositionRotateTransform3D::SetAxisX([In] float axisX) IDCompositionRotateTransform3D::SetAxisX

Changes the value of the AxisY property of a 3D rotation transform. The AxisY property specifies the y-coordinate for the axis vector of rotation. The default value is zero.

The new y-coordinate for the axis vector of rotation.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

When setting the axis to a non-default value, you should always set all three axis properties (AxisX, AxisY, and AxisZ).

This method fails if the axisY parameter is NaN, positive infinity, or negative infinity.

If the AxisY property was previously animated, this method removes the animation and sets the AxisY property to the specified static value.

hh448941 HRESULT IDCompositionRotateTransform3D::SetAxisY([In] IDCompositionAnimation* animation) IDCompositionRotateTransform3D::SetAxisY

Changes the value of the AxisY property of a 3D rotation transform. The AxisY property specifies the y-coordinate for the axis vector of rotation. The default value is zero.

The new y-coordinate for the axis vector of rotation.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

When setting the axis to a non-default value, you should always set all three axis properties (AxisX, AxisY, and AxisZ).

This method fails if the axisY parameter is NaN, positive infinity, or negative infinity.

If the AxisY property was previously animated, this method removes the animation and sets the AxisY property to the specified static value.

hh448941 HRESULT IDCompositionRotateTransform3D::SetAxisY([In] float axisY) IDCompositionRotateTransform3D::SetAxisY

Changes the value of the AxisZ property of a 3D rotation transform. The AxisZ property specifies the z-coordinate for the axis vector of rotation. The default value is 1.0.

The new z-coordinate for the axis vector of rotation.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

When setting the axis to a non-default value, you should always set all three axis properties (AxisX, AxisY, and AxisZ).

This method fails if the axisZ parameter is NaN, positive infinity, or negative infinity.

If the AxisZ property was previously animated, this method removes the animation and sets the AxisX property to the specified static value.

hh448947 HRESULT IDCompositionRotateTransform3D::SetAxisZ([In] IDCompositionAnimation* animation) IDCompositionRotateTransform3D::SetAxisZ

Changes the value of the AxisZ property of a 3D rotation transform. The AxisZ property specifies the z-coordinate for the axis vector of rotation. The default value is 1.0.

The new z-coordinate for the axis vector of rotation.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

When setting the axis to a non-default value, you should always set all three axis properties (AxisX, AxisY, and AxisZ).

This method fails if the axisZ parameter is NaN, positive infinity, or negative infinity.

If the AxisZ property was previously animated, this method removes the animation and sets the AxisX property to the specified static value.

hh448947 HRESULT IDCompositionRotateTransform3D::SetAxisZ([In] float axisZ) IDCompositionRotateTransform3D::SetAxisZ

Animates the value of the CenterX property of a 3D rotation transform. The CenterX property specifies the x-coordinate of the point about which the rotation is performed. The default value is zero.

An animation object that determines how the value of the CenterX property changes over time. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method makes a copy of the specified animation. If the object referenced by the animation parameter is changed after calling this method, the change does not affect the CenterX property unless this method is called again. If the CenterX property was previously animated, calling this method replaces the previous animation with the new animation.

This method fails if animation is an invalid reference or if it was not created by the same interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

hh448955 HRESULT IDCompositionRotateTransform3D::SetCenterX([In] IDCompositionAnimation* animation) IDCompositionRotateTransform3D::SetCenterX

Animates the value of the CenterX property of a 3D rotation transform. The CenterX property specifies the x-coordinate of the point about which the rotation is performed. The default value is zero.

An animation object that determines how the value of the CenterX property changes over time. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method makes a copy of the specified animation. If the object referenced by the animation parameter is changed after calling this method, the change does not affect the CenterX property unless this method is called again. If the CenterX property was previously animated, calling this method replaces the previous animation with the new animation.

This method fails if animation is an invalid reference or if it was not created by the same interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

hh448955 HRESULT IDCompositionRotateTransform3D::SetCenterX([In] float centerX) IDCompositionRotateTransform3D::SetCenterX

Changes the value of the CenterY property of a 3D rotation transform. The CenterY property specifies the y-coordinate of the point about which the rotation is performed. The default value is zero.

The new y-coordinate of the center point.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the centerY parameter is NaN, positive infinity, or negative infinity.

If the CenterY property was previously animated, this method removes the animation and sets the CenterY property to the specified static value.

hh448959 HRESULT IDCompositionRotateTransform3D::SetCenterY([In] IDCompositionAnimation* animation) IDCompositionRotateTransform3D::SetCenterY

Changes the value of the CenterY property of a 3D rotation transform. The CenterY property specifies the y-coordinate of the point about which the rotation is performed. The default value is zero.

The new y-coordinate of the center point.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the centerY parameter is NaN, positive infinity, or negative infinity.

If the CenterY property was previously animated, this method removes the animation and sets the CenterY property to the specified static value.

hh448959 HRESULT IDCompositionRotateTransform3D::SetCenterY([In] float centerY) IDCompositionRotateTransform3D::SetCenterY

Changes the value of the CenterZ property of a 3D rotation transform. The CenterZ property specifies the z-coordinate of the point about which the rotation is performed. The default value is zero.

The new z-coordinate of the center point.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the centerZ parameter is NaN, positive infinity, or negative infinity.

If the CenterZ property was previously animated, this method removes the animation and sets the CenterZ property to the specified static value.

hh448965 HRESULT IDCompositionRotateTransform3D::SetCenterZ([In] IDCompositionAnimation* animation) IDCompositionRotateTransform3D::SetCenterZ

Changes the value of the CenterZ property of a 3D rotation transform. The CenterZ property specifies the z-coordinate of the point about which the rotation is performed. The default value is zero.

The new z-coordinate of the center point.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the centerZ parameter is NaN, positive infinity, or negative infinity.

If the CenterZ property was previously animated, this method removes the animation and sets the CenterZ property to the specified static value.

hh448965 HRESULT IDCompositionRotateTransform3D::SetCenterZ([In] float centerZ) IDCompositionRotateTransform3D::SetCenterZ

Represents a 2D transformation that affects the scale of a visual along the x-axis and y-axis. The coordinate system is scaled from the specified center point.

A scale transform represents the following 3-by-3 matrix:

The effect is to scale the coordinate system up or down and apply the corresponding translation such that the center point does not move.

hh448990 IDCompositionScaleTransform IDCompositionScaleTransform
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Animates the value of the ScaleX property of a 2D scale transform. The ScaleX property specifies the scale factor along the x-axis.

An animation object that determines how the value of the ScaleX property changes over time. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method makes a copy of the specified animation. If the object referenced by the animation parameter is changed after calling this method, the change does not affect the ScaleX property unless this method is called again. If the ScaleX property was previously animated, calling this method replaces the previous animation with the new animation.

This method fails if animation is an invalid reference or if it was not created by the same interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

hh449046 HRESULT IDCompositionScaleTransform::SetScaleX([In] IDCompositionAnimation* animation) IDCompositionScaleTransform::SetScaleX

Animates the value of the ScaleX property of a 2D scale transform. The ScaleX property specifies the scale factor along the x-axis.

An animation object that determines how the value of the ScaleX property changes over time. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method makes a copy of the specified animation. If the object referenced by the animation parameter is changed after calling this method, the change does not affect the ScaleX property unless this method is called again. If the ScaleX property was previously animated, calling this method replaces the previous animation with the new animation.

This method fails if animation is an invalid reference or if it was not created by the same interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

hh449046 HRESULT IDCompositionScaleTransform::SetScaleX([In] float scaleX) IDCompositionScaleTransform::SetScaleX

Changes the value of the ScaleY property of a 2D scale transform. The ScaleY property specifies the scale factor along the y-axis.

The new y-axis scale factor.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the scaleY parameter is NaN, positive infinity, or negative infinity.

If the ScaleY property was previously animated, this method removes the animation and sets the ScaleY property to the specified static value.

hh449050 HRESULT IDCompositionScaleTransform::SetScaleY([In] IDCompositionAnimation* animation) IDCompositionScaleTransform::SetScaleY

Changes the value of the ScaleY property of a 2D scale transform. The ScaleY property specifies the scale factor along the y-axis.

The new y-axis scale factor.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the scaleY parameter is NaN, positive infinity, or negative infinity.

If the ScaleY property was previously animated, this method removes the animation and sets the ScaleY property to the specified static value.

hh449050 HRESULT IDCompositionScaleTransform::SetScaleY([In] float scaleY) IDCompositionScaleTransform::SetScaleY

Changes the value of the CenterX property of a 2D scale transform. The CenterX property specifies the x-coordinate of the point about which scaling is performed.

The new x-coordinate of the center point.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the centerX parameter is NaN, positive infinity, or negative infinity.

If the CenterX property was previously animated, this method removes the animation and sets the CenterX property to the specified static value.

hh449032 HRESULT IDCompositionScaleTransform::SetCenterX([In] IDCompositionAnimation* animation) IDCompositionScaleTransform::SetCenterX

Changes the value of the CenterX property of a 2D scale transform. The CenterX property specifies the x-coordinate of the point about which scaling is performed.

The new x-coordinate of the center point.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the centerX parameter is NaN, positive infinity, or negative infinity.

If the CenterX property was previously animated, this method removes the animation and sets the CenterX property to the specified static value.

hh449032 HRESULT IDCompositionScaleTransform::SetCenterX([In] float centerX) IDCompositionScaleTransform::SetCenterX

Changes the value of the CenterY property of a 2D scale transform. The CenterY property specifies the y-coordinate of the point about which scaling is performed.

The new y-coordinate of the center point.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the centerY parameter is NaN, positive infinity, or negative infinity.

If the CenterY property was previously animated, this method removes the animation and sets the CenterY property to the specified static value.

hh449038 HRESULT IDCompositionScaleTransform::SetCenterY([In] IDCompositionAnimation* animation) IDCompositionScaleTransform::SetCenterY

Changes the value of the CenterY property of a 2D scale transform. The CenterY property specifies the y-coordinate of the point about which scaling is performed.

The new y-coordinate of the center point.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the centerY parameter is NaN, positive infinity, or negative infinity.

If the CenterY property was previously animated, this method removes the animation and sets the CenterY property to the specified static value.

hh449038 HRESULT IDCompositionScaleTransform::SetCenterY([In] float centerY) IDCompositionScaleTransform::SetCenterY

Represents a 3D transformation effect that affects the scale of a visual along the x-axis, y-axis, and z-axis. The coordinate system is scaled from the specified center point.

A 3D scale transform represents the following 4-by-4 matrix:

The effect is to scale the blending of the visual's subtree up or down, and apply the corresponding translation such that the center point does not move.

hh448992 IDCompositionScaleTransform3D IDCompositionScaleTransform3D
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Changes the value of the ScaleX property of a 3D scale transform. The ScaleX property specifies the scale factor along the x-axis.

The new x-axis scale factor.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the scaleX parameter is NaN, positive infinity, or negative infinity.

If the ScaleX property was previously animated, this method removes the animation and sets the ScaleX property to the specified static value.

hh449014 HRESULT IDCompositionScaleTransform3D::SetScaleX([In] IDCompositionAnimation* animation) IDCompositionScaleTransform3D::SetScaleX

Changes the value of the ScaleX property of a 3D scale transform. The ScaleX property specifies the scale factor along the x-axis.

The new x-axis scale factor.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the scaleX parameter is NaN, positive infinity, or negative infinity.

If the ScaleX property was previously animated, this method removes the animation and sets the ScaleX property to the specified static value.

hh449014 HRESULT IDCompositionScaleTransform3D::SetScaleX([In] float scaleX) IDCompositionScaleTransform3D::SetScaleX

Changes the value of the ScaleY property of a 3D scale transform. The ScaleY property specifies the scale factor along the y-axis.

The new y-axis scale factor.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the scaleY parameter is NaN, positive infinity, or negative infinity.

If the ScaleY property was previously animated, this method removes the animation and sets the ScaleY property to the specified static value.

hh449020 HRESULT IDCompositionScaleTransform3D::SetScaleY([In] IDCompositionAnimation* animation) IDCompositionScaleTransform3D::SetScaleY

Changes the value of the ScaleY property of a 3D scale transform. The ScaleY property specifies the scale factor along the y-axis.

The new y-axis scale factor.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the scaleY parameter is NaN, positive infinity, or negative infinity.

If the ScaleY property was previously animated, this method removes the animation and sets the ScaleY property to the specified static value.

hh449020 HRESULT IDCompositionScaleTransform3D::SetScaleY([In] float scaleY) IDCompositionScaleTransform3D::SetScaleY

Changes the value of the ScaleZ property of a 3D scale transform. The ScaleZ property specifies the scale factor along the z-axis.

The new z-axis scale factor.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the scaleZ parameter is NaN, positive infinity, or negative infinity.

If the ScaleZ property was previously animated, this method removes the animation and sets the ScaleZ property to the specified static value.

hh449026 HRESULT IDCompositionScaleTransform3D::SetScaleZ([In] IDCompositionAnimation* animation) IDCompositionScaleTransform3D::SetScaleZ

Changes the value of the ScaleZ property of a 3D scale transform. The ScaleZ property specifies the scale factor along the z-axis.

The new z-axis scale factor.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the scaleZ parameter is NaN, positive infinity, or negative infinity.

If the ScaleZ property was previously animated, this method removes the animation and sets the ScaleZ property to the specified static value.

hh449026 HRESULT IDCompositionScaleTransform3D::SetScaleZ([In] float scaleZ) IDCompositionScaleTransform3D::SetScaleZ

Changes the value of the CenterX property of a 3D scale transform. The CenterX property specifies the x-coordinate of the point about which scaling is performed.

The new x-coordinate of the center point.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the centerX parameter is NaN, positive infinity, or negative infinity.

If the CenterX property was previously animated, this method removes the animation and sets the CenterX property to the specified static value.

hh448994 HRESULT IDCompositionScaleTransform3D::SetCenterX([In] IDCompositionAnimation* animation) IDCompositionScaleTransform3D::SetCenterX

Changes the value of the CenterX property of a 3D scale transform. The CenterX property specifies the x-coordinate of the point about which scaling is performed.

The new x-coordinate of the center point.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the centerX parameter is NaN, positive infinity, or negative infinity.

If the CenterX property was previously animated, this method removes the animation and sets the CenterX property to the specified static value.

hh448994 HRESULT IDCompositionScaleTransform3D::SetCenterX([In] float centerX) IDCompositionScaleTransform3D::SetCenterX

Changes the value of the CenterY property of a 3D scale transform. The CenterY property specifies the y-coordinate of the point about which scaling is performed.

The new y-coordinate of the center point.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the centerY parameter is NaN, positive infinity, or negative infinity.

If the CenterY property was previously animated, this method removes the animation and sets the CenterY property to the specified static value.

hh449002 HRESULT IDCompositionScaleTransform3D::SetCenterY([In] IDCompositionAnimation* animation) IDCompositionScaleTransform3D::SetCenterY

Changes the value of the CenterY property of a 3D scale transform. The CenterY property specifies the y-coordinate of the point about which scaling is performed.

The new y-coordinate of the center point.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the centerY parameter is NaN, positive infinity, or negative infinity.

If the CenterY property was previously animated, this method removes the animation and sets the CenterY property to the specified static value.

hh449002 HRESULT IDCompositionScaleTransform3D::SetCenterY([In] float centerY) IDCompositionScaleTransform3D::SetCenterY

Changes the value of the CenterZ property of a 3D scale transform. The CenterZ property specifies the z-coordinate of the point about which scaling is performed.

The new z-coordinate of the center point.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the centerZ parameter is NaN, positive infinity, or negative infinity.

If the CenterZ property was previously animated, this method removes the animation and sets the CenterZ property to the specified static value.

hh449008 HRESULT IDCompositionScaleTransform3D::SetCenterZ([In] IDCompositionAnimation* animation) IDCompositionScaleTransform3D::SetCenterZ

Changes the value of the CenterZ property of a 3D scale transform. The CenterZ property specifies the z-coordinate of the point about which scaling is performed.

The new z-coordinate of the center point.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the centerZ parameter is NaN, positive infinity, or negative infinity.

If the CenterZ property was previously animated, this method removes the animation and sets the CenterZ property to the specified static value.

hh449008 HRESULT IDCompositionScaleTransform3D::SetCenterZ([In] float centerZ) IDCompositionScaleTransform3D::SetCenterZ

Represents a 2D transformation that affects the skew of a visual along the x-axis and y-axis. The coordinate system is skewed around the specified center point.

A skew transform represents the following 3-by-3 matrix:

The effect is to slant the coordinate system along the x-axis and y-axis such that a rectangle becomes a parallelogram, and to apply the corresponding translation such that the center point does not move.

hh449057 IDCompositionSkewTransform IDCompositionSkewTransform
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Animates the value of the AngleX property of a 2D skew transform. The AngleX property specifies the skew angle along the x-axis.

An animation object that represents how the value of the AngleX property changes over time. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method makes a copy of the specified animation. If the object referenced by the animation parameter is changed after calling this method, the change does not affect the AngleX property unless this method is called again. If the AngleX property was previously animated, calling this method replaces the previous animation with the new animation.

This method fails if animation is an invalid reference or if it was not created by the same interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

hh449061 HRESULT IDCompositionSkewTransform::SetAngleX([In] IDCompositionAnimation* animation) IDCompositionSkewTransform::SetAngleX

Animates the value of the AngleX property of a 2D skew transform. The AngleX property specifies the skew angle along the x-axis.

An animation object that represents how the value of the AngleX property changes over time. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method makes a copy of the specified animation. If the object referenced by the animation parameter is changed after calling this method, the change does not affect the AngleX property unless this method is called again. If the AngleX property was previously animated, calling this method replaces the previous animation with the new animation.

This method fails if animation is an invalid reference or if it was not created by the same interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

hh449061 HRESULT IDCompositionSkewTransform::SetAngleX([In] float angleX) IDCompositionSkewTransform::SetAngleX

Animates the value of the AngleY property of a 2D skew transform. The AngleY property specifies the skew angle along the y-axis.

An animation object that represents how the value of the AngleY property changes over time. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method makes a copy of the specified animation. If the object referenced by the animation parameter is changed after calling this method, the change does not affect the AngleY property unless this method is called again. If the AngleY property was previously animated, calling this method replaces the previous animation with the new animation.

This method fails if animation is an invalid reference or if it was not created by the same interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

hh449067 HRESULT IDCompositionSkewTransform::SetAngleY([In] IDCompositionAnimation* animation) IDCompositionSkewTransform::SetAngleY

Animates the value of the AngleY property of a 2D skew transform. The AngleY property specifies the skew angle along the y-axis.

An animation object that represents how the value of the AngleY property changes over time. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method makes a copy of the specified animation. If the object referenced by the animation parameter is changed after calling this method, the change does not affect the AngleY property unless this method is called again. If the AngleY property was previously animated, calling this method replaces the previous animation with the new animation.

This method fails if animation is an invalid reference or if it was not created by the same interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

hh449067 HRESULT IDCompositionSkewTransform::SetAngleY([In] float angleY) IDCompositionSkewTransform::SetAngleY

Changes the value of the CenterX property of a 2D skew transform. The CenterX property specifies the x-coordinate of the point about which the skew is performed.

The new x-coordinate of the center point.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the centerX parameter is NaN, positive infinity, or negative infinity.

If the CenterX property was previously animated, this method removes the animation and sets the CenterX property to the specified static value.

hh449071 HRESULT IDCompositionSkewTransform::SetCenterX([In] IDCompositionAnimation* animation) IDCompositionSkewTransform::SetCenterX

Changes the value of the CenterX property of a 2D skew transform. The CenterX property specifies the x-coordinate of the point about which the skew is performed.

The new x-coordinate of the center point.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the centerX parameter is NaN, positive infinity, or negative infinity.

If the CenterX property was previously animated, this method removes the animation and sets the CenterX property to the specified static value.

hh449071 HRESULT IDCompositionSkewTransform::SetCenterX([In] float centerX) IDCompositionSkewTransform::SetCenterX

Changes the value of the CenterY property of a 2D skew transform. The CenterY property specifies the y-coordinate of the point about which the skew is performed.

The new y-coordinate of the center point.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the centerY parameter is NaN, positive infinity, or negative infinity.

If the CenterY property was previously animated, this method removes the animation and sets the CenterY property to the specified static value.

hh449077 HRESULT IDCompositionSkewTransform::SetCenterY([In] IDCompositionAnimation* animation) IDCompositionSkewTransform::SetCenterY

Changes the value of the CenterY property of a 2D skew transform. The CenterY property specifies the y-coordinate of the point about which the skew is performed.

The new y-coordinate of the center point.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the centerY parameter is NaN, positive infinity, or negative infinity.

If the CenterY property was previously animated, this method removes the animation and sets the CenterY property to the specified static value.

hh449077 HRESULT IDCompositionSkewTransform::SetCenterY([In] float centerY) IDCompositionSkewTransform::SetCenterY

Represents a physical bitmap that can be associated with a visual for composition in a visual tree. This interface can also be used to update the bitmap contents.

hh449083 IDCompositionSurface IDCompositionSurface
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Initiates drawing on this Microsoft DirectComposition surface object. The update rectangle must be within the boundaries of the surface; otherwise, this method fails.

The rectangle to be updated. If this parameter is null, the entire bitmap is updated.

The identifier of the interface to retrieve.

Receives an interface reference of the type specified in the iid parameter. This parameter must not be null.

Note??In Windows?8, this parameter was surface.

The offset into the surface where the application should draw updated content. This offset will reference the upper left corner of the update rectangle.

If the function succeeds, it returns . Otherwise, it returns an error code.

This method enables an application to incrementally update the contents of a DirectComposition surface object. The application must use the following sequence:

  1. Call BeginDraw to initiate the incremental update.
  2. Use the retrieved surface as a render target and draw the updated contents at the retrieved offset.
  3. Call the method to finish the update.

The update object returned by this method is either a Direct2D device context or a DXGI surface, depending on the value of the iid parameter and on how the DirectComposition surface object was created. If the iid parameter is __uuidof(), then the returned object is a Direct2D device context that already has the DirectComposition surface selected as a render target. Otherwise, it is a DXGI surface which the application may use as a render target. In either case, the returned object is associated with the Direct2D or DXGI device passed by the application to the function or the method.

The iid parameter may only be __uuidof() if the DirectComposition surface object was created from a DirectComposition device or surface factory that was, itself, created with an associated Direct2D device. In particular, the application must have called either the function or the method with a Direct2D device as the renderingDevice parameter. If the DirectComposition surface was created via a surface factory that was not associated with a Direct2D device, or if it was created directly via the interface and the device was not directly associated with a Direct2D device, then passing __uuidof() as the iid parameter causes this method to return E_INVALIDARG.

If the application successfully retrieves a Direct2D device context as the update object, then the application should not call either the ID2D1DeviceContext::BeginDraw or ID2D1DeviceContext::EndDraw methods on the returned Direct2D device context.

The retrieved offset is not necessarily the same as the top-left corner of the requested update rectangle. The application must transform its rendering primitives to draw within a rectangle of the same width and height as the input rectangle, but at the given offset. The application should not draw outside of this rectangle.

If the updateRectangle parameter is null, the entire surface is updated. In that case, because the retrieved offset still might not be (0,0), the application still needs to transform its rendering primitives accordingly.

If the surface is not a virtual surface, then the first time the application calls this method for a particular non-virtual surface, the update rectangle must cover the entire surface, either by specifying the full surface in the requested update rectangle, or by specifying null as the updateRectangle parameter. For virtual surfaces, the first call may be any sub-rectangle of the surface.

Because each call to this method might retrieve a different object in the updateObject surface, the application should not cache the retrieved surface reference. The application should release the retrieved reference as soon as it finishes drawing.

The retrieved surface rectangle does not contain the previous contents of the bitmap. The application must update every pixel in the update rectangle, either by first clearing the render target, or by issuing enough rendering primitives to fully cover the update rectangle. Because the initial contents of the update surface are undefined, failing to update every pixel leads to undefined behavior.

Only one DirectComposition surface can be updated at a time. An application must suspend drawing on one surface before beginning or resuming to draw on another surface. If the application calls BeginDraw twice, either for the same surface or for another surface belonging to the same DirectComposition device, without an intervening call to , the second call fails. If the application calls without calling EndDraw, the update remains pending. The update takes effect only after the application calls EndDraw and then calls the method.

hh449100 HRESULT IDCompositionSurface::BeginDraw([In, Optional] const RECT* updateRect,[In] const GUID& iid,[Out] void** updateObject,[Out] POINT* updateOffset) IDCompositionSurface::BeginDraw

Marks the end of drawing on this Microsoft DirectComposition surface object.

If the function succeeds, it returns . Otherwise, it returns an error code, which can include .

This method completes an update that was begun by a previous call to the method. After this method returns, the application can start another update on the same surface object or on a different one.

If the application calls before calling for a surface with a pending update, that update is not processed by that Commit call. The update only takes effect on screen after the application calls followed by the method.

hh449102 HRESULT IDCompositionSurface::EndDraw() IDCompositionSurface::EndDraw

Suspends the drawing on this Microsoft DirectComposition surface object.

If the function succeeds, it returns . Otherwise, it returns an error code, which can include and .

Because only one surface can be open for drawing at a time, calling SuspendDraw allows the user to call on a different surface. Drawing to this surface can be resumed by calling .

hh449106 HRESULT IDCompositionSurface::SuspendDraw() IDCompositionSurface::SuspendDraw

Resumes drawing on this Microsoft DirectComposition surface object.

If the function succeeds, it returns . Otherwise, it returns an error code, which can include and .

This method allows the surface update to continue unless there are other surfaces that have active, unsuspended draws.

hh449104 HRESULT IDCompositionSurface::ResumeDraw() IDCompositionSurface::ResumeDraw

Scrolls a rectangular area of a Microsoft DirectComposition logical surface.

The rectangular area of the surface to be scrolled, relative to the upper-left corner of the surface. If this parameter is null, the entire surface is scrolled.

The clipRect clips the destination (scrollRect after offset) of the scroll.The only bitmap content that will be scrolled are those that remain inside the clip rectangle after the scroll is completed.

The amount of horizontal scrolling, in pixels. Use positive values to scroll right, and negative values to scroll left.

The amount of vertical scrolling, in pixels. Use positive values to scroll down, and negative values to scroll up.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method allows an application to blt/copy a sub-rectangle of a DirectComposition surface object. This avoids re-rendering content that is already available.

The scrollRect rectangle must be contained in the boundaries of the surface. If the scrollRect rectangle goes outside the bounds of the surface, this method fails.

The bits copied by the scroll operation (source) are defined by the intersection of the scrollRect and clipRect rectangles.

The bits shown on the screen (destination) are defined by the intersection of the offset source rectangle and clipRect.

Scroll operations can only be called before calling BeginDraw or after calling EndDraw. Suspended or resumed surfaces are not candidates for scrolling because they are still being updated.

The application is responsible for ensuring that the scrollable area for an is limited to valid pixels. The behavior for invalid pixels in the scrollRect is undefined.

Virtual surface sub-rectangular areas that were discarded by a trim or a resize operation can't be scrolled even if the trim or resize is applied in the same batch. Trim and Resize are applied immediately.

Hh707486 HRESULT IDCompositionSurface::Scroll([In, Optional] const RECT* scrollRect,[In, Optional] const RECT* clipRect,[In] int offsetX,[In] int offsetY) IDCompositionSurface::Scroll

Creates surface and virtual surface objects associated with an application-provided rendering device.

dn280423 IDCompositionSurfaceFactory IDCompositionSurfaceFactory
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Creates a surface object that can be associated with one or more visuals for composition.

The width of the surface, in pixels.

The height of the surface, in pixels.

The pixel format of the surface.

The format of the alpha channel, if an alpha channel is included in the pixel format. This can be one of or . It can also be , which is interpreted as .

The newly created surface object. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

A Microsoft DirectComposition surface is a rectangular array of pixels that can be associated with a visual for composition. A newly created surface object is in an uninitialized state. While it is uninitialized, the surface has no effect on the composition of the visual tree. It behaves exactly like a surface that has 100% transparent pixels.

To initialize the surface with pixel data, use the method. The first call to this method must cover the entire surface area to provide an initial value for every pixel. Subsequent calls may specify smaller sub-rectangles of the surface to update.

This method will fail if either the width or height exceed the max texture size. If your scenario requires dimensions beyond the max texture size, use CreateVirtualSurface method.

DirectComposition surfaces support the following pixel formats:

dn280424 HRESULT IDCompositionSurfaceFactory::CreateSurface([In] unsigned int width,[In] unsigned int height,[In] DXGI_FORMAT pixelFormat,[In] DXGI_ALPHA_MODE alphaMode,[Out, Fast] IDCompositionSurface** surface) IDCompositionSurfaceFactory::CreateSurface

Creates a sparsely populated surface that can be associated with one or more visuals for composition.

The width of the surface, in pixels. The maximum width is 16,777,216 pixels.

The height of the surface, in pixels.The maximum height is 16,777,216 pixels.

The pixel format of the surface.

The format of the alpha channel, if an alpha channel is included in the pixel format. This can be one of or . It can also be , which is interpreted as .

The newly created virtual surface object. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

A newly created virtual surface object is in an uninitialized state. While it is uninitialized, the surface has no effect on the composition of the visual tree. It behaves exactly like a surface that is initialized with 100% transparent pixels.

To initialize the surface with pixel data, use the method. This method not only provides pixels for the surface, but it also allocates actual storage space for those pixels. The memory allocation persists until the application returns some of the memory to the system. The application can free part or all of the allocated memory by calling the or method.

Microsoft DirectComposition surfaces support the following pixel formats:

dn280425 HRESULT IDCompositionSurfaceFactory::CreateVirtualSurface([In] unsigned int initialWidth,[In] unsigned int initialHeight,[In] DXGI_FORMAT pixelFormat,[In] DXGI_ALPHA_MODE alphaMode,[Out, Fast] IDCompositionVirtualSurface** virtualSurface) IDCompositionSurfaceFactory::CreateVirtualSurface

Represents a binding between a Microsoft DirectComposition visual tree and a destination on top of which the visual tree should be composed.

hh449108 IDCompositionTarget IDCompositionTarget
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Sets a visual object as the new root object of a visual tree.

The visual object that is the new root of this visual tree. This parameter can be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

A visual can be either the root of a single visual tree, or a child of another visual, but it cannot be both at the same time. This method fails if the visual parameter is already the root of another visual tree, or is a child of another visual.

If visual is null, the visual tree is empty. If there was a previous non-null root visual, that visual becomes available for use as the root of another visual tree, or as a child of another visual.

hh449109 HRESULT IDCompositionTarget::SetRoot([In, Optional] IDCompositionVisual* visual) IDCompositionTarget::SetRoot
Creates a composition target object that is bound to the window that is represented by the specified window handle. A device the target is to be associated with. The window to which the composition object will be bound. This cannot be null. TRUE if the visual tree should be displayed on top of the children of the window specified by the hwnd parameter; otherwise, the visual tree is displayed behind the children.

Sets a visual object as the new root object of a visual tree.

A visual can be either the root of a single visual tree, or a child of another visual, but it cannot be both at the same time. This method fails if the visual parameter is already the root of another visual tree, or is a child of another visual.

If visual is null, the visual tree is empty. If there was a previous non-null root visual, that visual becomes available for use as the root of another visual tree, or as a child of another visual.

hh449109 SetRoot SetRoot HRESULT IDCompositionTarget::SetRoot([In, Optional] IDCompositionVisual* visual)

Represents a 2D transformation that affects only the offset of a visual along the x-axis and y-axis.

A translation transform represents the following 3-by-2 matrix:

The effect is simply to offset the coordinate system by x and y.

hh449113 IDCompositionTranslateTransform IDCompositionTranslateTransform
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Changes the value of the OffsetX property of a 2D translation transform. The OffsetX property specifies the distance to translate along the x-axis.

The distance to translate along the x-axis, in pixels.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method perfoms an affine transformation, which moves every point by a fixed distance in the same direction. It is similar to shifting the origin of the coordinate space.

This method fails if the offsetX parameter is NaN, positive infinity, or negative infinity.

If the OffsetX property was previously animated, this method removes the animation and sets the OffsetX property to the specified static value.

hh449124 HRESULT IDCompositionTranslateTransform::SetOffsetX([In] IDCompositionAnimation* animation) IDCompositionTranslateTransform::SetOffsetX

Changes the value of the OffsetX property of a 2D translation transform. The OffsetX property specifies the distance to translate along the x-axis.

The distance to translate along the x-axis, in pixels.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method perfoms an affine transformation, which moves every point by a fixed distance in the same direction. It is similar to shifting the origin of the coordinate space.

This method fails if the offsetX parameter is NaN, positive infinity, or negative infinity.

If the OffsetX property was previously animated, this method removes the animation and sets the OffsetX property to the specified static value.

hh449124 HRESULT IDCompositionTranslateTransform::SetOffsetX([In] float offsetX) IDCompositionTranslateTransform::SetOffsetX

Changes the value of the OffsetY property of a 2D translation transform. The OffsetY property specifies the distance to translate along the y-axis.

The distance to translate along the y-axis, in pixels.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the offsetY parameter is NaN, positive infinity, or negative infinity.

If the OffsetY property was previously animated, this method removes the animation and sets the OffsetY property to the specified static value.

hh449127 HRESULT IDCompositionTranslateTransform::SetOffsetY([In] IDCompositionAnimation* animation) IDCompositionTranslateTransform::SetOffsetY

Changes the value of the OffsetY property of a 2D translation transform. The OffsetY property specifies the distance to translate along the y-axis.

The distance to translate along the y-axis, in pixels.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the offsetY parameter is NaN, positive infinity, or negative infinity.

If the OffsetY property was previously animated, this method removes the animation and sets the OffsetY property to the specified static value.

hh449127 HRESULT IDCompositionTranslateTransform::SetOffsetY([In] float offsetY) IDCompositionTranslateTransform::SetOffsetY

Animates the value of the OffsetZ property of a 3D translation transform effect. The OffsetZ property specifies the distance to translate along the z-axis.

This method makes a copy of the specified animation. If the object referenced by the animation parameter is changed after calling this method, the change does not affect the OffsetZ property unless this method is called again. If the OffsetZ property was previously animated, calling this method replaces the previous animation with the new animation.

This method fails if animation is an invalid reference or if it was not created by the same interface that created the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

hh449122 IDCompositionTranslateTransform3D IDCompositionTranslateTransform3D
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Changes the value of the OffsetX property of a 3D translation transform effect. The OffsetX property specifies the distance to translate along the x-axis.

The distance to translate along the x-axis, in pixels.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the offsetX parameter is NaN, positive infinity, or negative infinity.

If the OffsetX property was previously animated, this method removes the animation and sets the OffsetX property to the specified static value.

hh449115 HRESULT IDCompositionTranslateTransform3D::SetOffsetX([In] IDCompositionAnimation* animation) IDCompositionTranslateTransform3D::SetOffsetX

Changes the value of the OffsetX property of a 3D translation transform effect. The OffsetX property specifies the distance to translate along the x-axis.

The distance to translate along the x-axis, in pixels.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the offsetX parameter is NaN, positive infinity, or negative infinity.

If the OffsetX property was previously animated, this method removes the animation and sets the OffsetX property to the specified static value.

hh449115 HRESULT IDCompositionTranslateTransform3D::SetOffsetX([In] float offsetX) IDCompositionTranslateTransform3D::SetOffsetX

Changes the value of the OffsetY property of a 3D translation transform effect. The OffsetY property specifies the distance to translate along the y-axis.

The distance to translate along the y-axis, in pixels.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the offsetY parameter is NaN, positive infinity, or negative infinity.

If the OffsetY property was previously animated, this method removes the animation and sets the OffsetY property to the specified static value.

hh449118 HRESULT IDCompositionTranslateTransform3D::SetOffsetY([In] IDCompositionAnimation* animation) IDCompositionTranslateTransform3D::SetOffsetY

Changes the value of the OffsetY property of a 3D translation transform effect. The OffsetY property specifies the distance to translate along the y-axis.

The distance to translate along the y-axis, in pixels.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the offsetY parameter is NaN, positive infinity, or negative infinity.

If the OffsetY property was previously animated, this method removes the animation and sets the OffsetY property to the specified static value.

hh449118 HRESULT IDCompositionTranslateTransform3D::SetOffsetY([In] float offsetY) IDCompositionTranslateTransform3D::SetOffsetY

Changes the value of the OffsetZ property of a 3D translation transform effect. The OffsetZ property specifies the distance to translate along the z-axis.

The distance to translate along the z-axis, in pixels.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the offsetZ parameter is NaN, positive infinity, or negative infinity.

If the OffsetZ property was previously animated, this method removes the animation and sets the OffsetZ property to the specified static value.

hh449121 HRESULT IDCompositionTranslateTransform3D::SetOffsetZ([In] IDCompositionAnimation* animation) IDCompositionTranslateTransform3D::SetOffsetZ

Changes the value of the OffsetZ property of a 3D translation transform effect. The OffsetZ property specifies the distance to translate along the z-axis.

The distance to translate along the z-axis, in pixels.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the offsetZ parameter is NaN, positive infinity, or negative infinity.

If the OffsetZ property was previously animated, this method removes the animation and sets the OffsetZ property to the specified static value.

hh449121 HRESULT IDCompositionTranslateTransform3D::SetOffsetZ([In] float offsetZ) IDCompositionTranslateTransform3D::SetOffsetZ

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

hh449133 IDCompositionVirtualSurface IDCompositionVirtualSurface
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Changes the logical size of this virtual surface object.

The new width of the virtual surface, in pixels. The maximum width is 16,777,216 pixels.

The new height of the virtual surface, in pixels. The maximum height is 16,777,216 pixels.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

When a virtual surface is resized, its contents are preserved up to the new boundaries of the surface. If the surface is made smaller, any previously allocated pixels that fall outside of the new width or height are discarded.

This method fails if was called for this bitmap without a corresponding call to .

This method fails if width or height exceeds 16,777,216 pixels.

hh449135 HRESULT IDCompositionVirtualSurface::Resize([In] unsigned int width,[In] unsigned int height) IDCompositionVirtualSurface::Resize

Discards pixels that fall outside of the specified trim rectangles.

An array of rectangles to keep.

The number of rectangles in the rectangles array.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

A virtual surface might not have enough storage for every pixel in the surface. An application instructs the composition engine to allocate memory for the surface by calling the method, and to release memory for the surface by calling the method. The array of rectangles represents the regions of the virtual surface that should remain allocated after this method returns. Any pixels that are outside the specified set of rectangles are no longer used for texturing, and their memory may be reclaimed.

If the count parameter is zero, no pixels are kept, and all of the memory allocated for the virtual surface may be reclaimed. The rectangles parameter can be null only if the count parameter is zero. This method fails if was called for this bitmap without a corresponding call to .

hh449137 HRESULT IDCompositionVirtualSurface::Trim([In, Buffer, Optional] const RECT* rectangles,[In] unsigned int count) IDCompositionVirtualSurface::Trim

Represents a Microsoft DirectComposition visual.

hh449139 IDCompositionVisual IDCompositionVisual
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Changes the value of the OffsetX property of this visual. The OffsetX property specifies the new offset of the visual along the x-axis, relative to the parent visual.

The new offset of the visual along the x-axis, in pixels.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the offsetX parameter is NaN, positive infinity, or negative infinity.

Changing the OffsetX property of a visual transforms the coordinate system of the entire visual subtree that is rooted at that visual. If the Clip property of this visual is specified, the clip rectangle is also transformed.

A transformation that is specified by the Transform property is applied after the OffsetX property. In other words, the effect of setting the Transform property and the OffsetX property is the same as setting only the Transform property on a transform group object where the first member of the group is an object that has the same OffsetX value as offsetX. However, you should use whenever possible because it is slightly faster.

If the OffsetX and OffsetY properties are set to 0, and the Transform property is set to null, the coordinate system of the visual is the same as that of its parent.

If the OffsetX property was previously animated, this method removes the animation and sets the property to the specified static value.

hh449161 HRESULT IDCompositionVisual::SetOffsetX([In] IDCompositionAnimation* animation) IDCompositionVisual::SetOffsetX

Changes the value of the OffsetX property of this visual. The OffsetX property specifies the new offset of the visual along the x-axis, relative to the parent visual.

The new offset of the visual along the x-axis, in pixels.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the offsetX parameter is NaN, positive infinity, or negative infinity.

Changing the OffsetX property of a visual transforms the coordinate system of the entire visual subtree that is rooted at that visual. If the Clip property of this visual is specified, the clip rectangle is also transformed.

A transformation that is specified by the Transform property is applied after the OffsetX property. In other words, the effect of setting the Transform property and the OffsetX property is the same as setting only the Transform property on a transform group object where the first member of the group is an object that has the same OffsetX value as offsetX. However, you should use whenever possible because it is slightly faster.

If the OffsetX and OffsetY properties are set to 0, and the Transform property is set to null, the coordinate system of the visual is the same as that of its parent.

If the OffsetX property was previously animated, this method removes the animation and sets the property to the specified static value.

hh449161 HRESULT IDCompositionVisual::SetOffsetX([In] float offsetX) IDCompositionVisual::SetOffsetX

Changes the value of the OffsetY property of this visual. The OffsetY property specifies the new offset of the visual along the y-axis, relative to the parent visual.

The new offset of the visual along the y-axis, in pixels.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the offsetY parameter is NaN, positive infinity, or negative infinity.

Changing the OffsetY property transforms the coordinate system of the entire visual subtree that is rooted at this visual. If the Clip property of this visual is specified, the clip rectangle is also transformed.

A transformation that is specified by the Transform property is applied after the OffsetY property. In other words, the effect of setting the Transform property and the OffsetY property is the same as setting only the Transform property on a transform group object where the first member of the group is an object that has the same OffsetY value as offsetY. However, you should use whenever possible because it is slightly faster.

If the OffsetX and OffsetY properties are set to 0, and the Transform property is set to null, the coordinate system of the visual is the same as that of its parent.

If the OffsetY property was previously animated, this method removes the animation and sets the property to the specified static value.

hh449167 HRESULT IDCompositionVisual::SetOffsetY([In] IDCompositionAnimation* animation) IDCompositionVisual::SetOffsetY

Changes the value of the OffsetY property of this visual. The OffsetY property specifies the new offset of the visual along the y-axis, relative to the parent visual.

The new offset of the visual along the y-axis, in pixels.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method fails if the offsetY parameter is NaN, positive infinity, or negative infinity.

Changing the OffsetY property transforms the coordinate system of the entire visual subtree that is rooted at this visual. If the Clip property of this visual is specified, the clip rectangle is also transformed.

A transformation that is specified by the Transform property is applied after the OffsetY property. In other words, the effect of setting the Transform property and the OffsetY property is the same as setting only the Transform property on a transform group object where the first member of the group is an object that has the same OffsetY value as offsetY. However, you should use whenever possible because it is slightly faster.

If the OffsetX and OffsetY properties are set to 0, and the Transform property is set to null, the coordinate system of the visual is the same as that of its parent.

If the OffsetY property was previously animated, this method removes the animation and sets the property to the specified static value.

hh449167 HRESULT IDCompositionVisual::SetOffsetY([In] float offsetY) IDCompositionVisual::SetOffsetY

Sets the Transform property of this visual to the specified 2D transform object.

The transform object that is used to modify the coordinate system of this visual. This parameter can point to an interface or one of its derived interfaces. This parameter can be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

Setting the Transform property transforms the coordinate system of the entire visual subtree that is rooted at this visual. If the Clip property of this visual is specified, the clip rectangle is also transformed.

If the Transform property previously specified a transform matrix, the newly specified transform object replaces the transform matrix.

A transformation specified by the Transform property is applied after the OffsetX and OffsetY properties. In other words, the effect of setting the Transform property and the OffsetX and OffsetY properties is the same as setting only the Transform property on a transform group where the first member of the group is an object that has those same OffsetX and OffsetY values. However, you should use the and SetOffsetY methods whenever possible because they are slightly faster.

This method fails if transform is an invalid reference or if it was not created by the same interface that created this visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

If the transform parameter is null, the coordinate system of this visual is transformed only by its OffsetX and OffsetY properties. Setting the Transform property to null is equivalent to setting it to an object where the specified matrix is the identity matrix. However, an application should set the Transform property to null whenever possible because it is slightly faster.

If the OffsetX and OffsetY properties are set to 0, and the Transform property is set to null, the coordinate system of the visual is the same as that of its parent.

hh449176 HRESULT IDCompositionVisual::SetTransform([In, Optional] IDCompositionTransform* transform) IDCompositionVisual::SetTransform

Sets the Transform property of this visual to the specified 2D transform object.

The transform object that is used to modify the coordinate system of this visual. This parameter can point to an interface or one of its derived interfaces. This parameter can be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

Setting the Transform property transforms the coordinate system of the entire visual subtree that is rooted at this visual. If the Clip property of this visual is specified, the clip rectangle is also transformed.

If the Transform property previously specified a transform matrix, the newly specified transform object replaces the transform matrix.

A transformation specified by the Transform property is applied after the OffsetX and OffsetY properties. In other words, the effect of setting the Transform property and the OffsetX and OffsetY properties is the same as setting only the Transform property on a transform group where the first member of the group is an object that has those same OffsetX and OffsetY values. However, you should use the and SetOffsetY methods whenever possible because they are slightly faster.

This method fails if transform is an invalid reference or if it was not created by the same interface that created this visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

If the transform parameter is null, the coordinate system of this visual is transformed only by its OffsetX and OffsetY properties. Setting the Transform property to null is equivalent to setting it to an object where the specified matrix is the identity matrix. However, an application should set the Transform property to null whenever possible because it is slightly faster.

If the OffsetX and OffsetY properties are set to 0, and the Transform property is set to null, the coordinate system of the visual is the same as that of its parent.

hh449176 HRESULT IDCompositionVisual::SetTransform([In] const D2D_MATRIX_3X2_F& matrix) IDCompositionVisual::SetTransform

Sets the TransformParent property of this visual. The TransformParent property establishes the coordinate system relative to which this visual is composed.

The new visual that establishes the base coordinate system for this visual. This parameter can be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

The coordinate system of a visual is modified by the OffsetX, OffsetY, and Transform properties. Normally, these properties define the coordinate system of a visual relative to its immediate parent. This method specifies the visual relative to which the coordinate system for this visual is based. The specified visual must be an ancestor of the current visual. If it is not an ancestor, the coordinate system is based on this visual's immediate parent, just as if the TransformParent property were set to null. Because visuals can be reparented, this property can take effect again if the specified visual becomes an ancestor of the target visual through a reparenting operation.

If the visual parameter is null, the coordinate system is always transformed relative to the visual's immediate parent. This is the default behavior if this method is not used.

This method fails if the visual parameter is an invalid reference or if it was not created by the same interface as this visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

hh449172 HRESULT IDCompositionVisual::SetTransformParent([In, Optional] IDCompositionVisual* visual) IDCompositionVisual::SetTransformParent

Sets the Effect property of this visual. The Effect property modifies how the subtree that is rooted at this visual is blended with the background, and can apply a 3D perspective transform to the visual.

A reference to an effect object. This parameter can be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method creates an implicit off-screen surface to which the subtree that is rooted at this visual is composed. The surface is used as one of the inputs to the specified effect. The output of the effect is composed directly to the composition target. Some effects also use the composition target as another implicit input. This is typically the case for compositional or blend effects such as opacity, where the composition target is considered to be the "background." In that case, any visuals that are "behind" the current visual are included in the composition target when the current visual is rendered and are considered to be the "background" that this visual composes to.

If this visual is not the root of a visual tree and one of its ancestors also has an effect applied to it, the off-screen surface created by the closest ancestor is the composition target to which this visual's effect is composed. Otherwise, the composition target is the root composition target. As a consequence, the background for compositional and blend effects includes only the visuals up to the closest ancestor that itself has an effect. Conversely, any effects applied to visuals under the current visual use the newly created off-screen surface as the background, which may affect how those visuals ultimately compose on top of what the end user perceives as being "behind" those visuals.

If the effect parameter is null, no bitmap effect is applied to this visual. Any previous effects that were associated with this visual are removed. The off-screen surface is also removed and the visual subtree is composed directly to the parent composition target, which may also affect how compositional or blend effects under this visual are rendered.

This method fails if effect is an invalid reference or if it was not created by the same interface that created this visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

hh449159 HRESULT IDCompositionVisual::SetEffect([In, Optional] IDCompositionEffect* effect) IDCompositionVisual::SetEffect

Sets the BitmapInterpolationMode property, which specifies the mode for Microsoft DirectComposition to use when interpolating pixels from bitmaps that are not axis-aligned or drawn exactly at scale.

The interpolation mode to use.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

The interpolation mode affects how a bitmap is composed when it is transformed such that there is no one-to-one correspondence between pixels in the bitmap and pixels on the screen.

By default, a visual inherits the interpolation mode of the parent visual, which may inherit the interpolation mode of its parent visual, and so on. A visual uses the default interpolation mode if this method is never called for the visual, or if this method is called with . If no visuals set the interpolation mode, the default for the entire visual tree is nearest neighbor interpolation, which offers the lowest visual quality but the highest performance.

If the interpolationMode parameter is anything other than , this visual's bitmap is composed with the specified interpolation mode, and this mode becomes the new default mode for the children of this visual. That is, if the interpolation mode of this visual's children is unchanged or explicitly set to , the bitmaps of the child visuals are composed using the interpolation mode of this visual.

hh449147 HRESULT IDCompositionVisual::SetBitmapInterpolationMode([In] DCOMPOSITION_BITMAP_INTERPOLATION_MODE interpolationMode) IDCompositionVisual::SetBitmapInterpolationMode

Sets the BorderMode property, which specifies how to compose the edges of bitmaps and clips associated with this visual, or with visuals in the subtree rooted at this visual.

The border mode to use.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

The border mode affects how the edges of a bitmap are composed when the bitmap is transformed such that the edges are not exactly axis-aligned and at precise pixel boundaries. It also affects how content is clipped at the corners of a clip that has rounded corners, and at the edge of a clip that is transformed such that the edges are not exactly axis-aligned and at precise pixel boundaries.

By default, a visual inherits the border mode of its parent visual, which may inherit the border mode of its parent visual, and so on. A visual uses the default border mode if this method is never called for the visual, or if this method is called with . If no visuals set the border mode, the default for the entire visual tree is aliased rendering, which offers the lowest visual quality but the highest performance.

If the borderMode parameter is anything other than , this visual's bitmap and clip are composed with the specified border mode. In addition, this border mode becomes the new default for the children of the current visual. That is, if the border mode of this visual's children is unchanged or explicitly set to , the bitmaps and clips of the child visuals are composed using the border mode of this visual.

hh449149 HRESULT IDCompositionVisual::SetBorderMode([In] DCOMPOSITION_BORDER_MODE borderMode) IDCompositionVisual::SetBorderMode

Sets the Clip property of this visual to the specified clip object. The Clip property restricts the rendering of the visual subtree that is rooted at this visual to a rectangular region.

The clip object to associate with this visual. This parameter can be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

Setting the Clip property clips this visual along with all visuals in the subtree that is rooted at this visual. The clip is transformed by the OffsetX, OffsetY, and Transform properties.

If the Clip property previously specified a clip rectangle, the newly specified Clip object replaces the clip rectangle.

This method fails if clip is an invalid reference or if it was not created by the same interface that created this visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

If clip is null, the visual is not clipped relative to its parent. However, the visual is clipped by the clip object of the parent visual, or by the closest ancestor visual that has a clip object. Setting clip to null is similar to specifying a clip object whose clip rectangle has the left and top sides set to negative infinity, and the right and bottom sides set to positive infinity. Using a null clip object results in slightly better performance.

If clip specifies a clip object that has an empty rectangle, the visual is fully clipped; that is, the visual is included in the visual tree, but it does not render anything. To exclude a particular visual from a composition, remove the visual from the visual tree instead of setting an empty clip rectangle. Removing the visual results in better performance.

hh449153 HRESULT IDCompositionVisual::SetClip([In, Optional] IDCompositionClip* clip) IDCompositionVisual::SetClip

Sets the Clip property of this visual to the specified clip object. The Clip property restricts the rendering of the visual subtree that is rooted at this visual to a rectangular region.

The clip object to associate with this visual. This parameter can be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

Setting the Clip property clips this visual along with all visuals in the subtree that is rooted at this visual. The clip is transformed by the OffsetX, OffsetY, and Transform properties.

If the Clip property previously specified a clip rectangle, the newly specified Clip object replaces the clip rectangle.

This method fails if clip is an invalid reference or if it was not created by the same interface that created this visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

If clip is null, the visual is not clipped relative to its parent. However, the visual is clipped by the clip object of the parent visual, or by the closest ancestor visual that has a clip object. Setting clip to null is similar to specifying a clip object whose clip rectangle has the left and top sides set to negative infinity, and the right and bottom sides set to positive infinity. Using a null clip object results in slightly better performance.

If clip specifies a clip object that has an empty rectangle, the visual is fully clipped; that is, the visual is included in the visual tree, but it does not render anything. To exclude a particular visual from a composition, remove the visual from the visual tree instead of setting an empty clip rectangle. Removing the visual results in better performance.

hh449153 HRESULT IDCompositionVisual::SetClip([In] const D2D_RECT_F& rect) IDCompositionVisual::SetClip

Sets the Content property of this visual to the specified bitmap or window wrapper.

The object that is the new content of this visual. This parameter can be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

The content parameter must point to one of the following:

  • An object that implements the interface.
  • An object that implements the interface.
  • A wrapper object that is returned by the CreateSurfaceFromHandle or CreateSurfaceFromHwnd method.

The new content replaces any content that was previously associated with the visual. If the content parameter is null, the visual has no associated content.

A visual can be associated with a bitmap object or a window wrapper. A bitmap is either a Microsoft DirectX swap chain or a Microsoft DirectComposition surface.

A window wrapper is created with the CreateSurfaceFromHwnd method and is a stand-in for the rasterization of another window, which must be a top-level window or a layered child window. A window wrapper is conceptually equivalent to a bitmap that is the size of the target window on which the contents of the window are drawn. The contents include the target window's child windows (layered or otherwise), and any DirectComposition content that is drawn in the child windows.

A DirectComposition surface wrapper is created with the CreateSurfaceFromHandle method and is a reference to a swap chain. An application might use a surface wrapper in a cross-process scenario where one process creates the swap chain and another process associates the bitmap with a visual.

The bitmap is always drawn at position (0,0) relative to the visual's coordinate system, although the coordinate system is directly affected by the OffsetX, OffsetY, and Transform properties, as well as indirectly by the transformations on ancestor visuals. The bitmap of a visual is always drawn behind the children of that visual.

hh449157 HRESULT IDCompositionVisual::SetContent([In, Optional] IUnknown* content) IDCompositionVisual::SetContent

Adds a new child visual to the children list of this visual.

The child visual to add. This parameter must not be null.

TRUE to place the new child visual in front of the visual specified by the referenceVisual parameter, or to place it behind referenceVisual.

The existing child visual next to which the new visual should be added.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

Child visuals are arranged in an ordered list. The contents of a child visual are drawn in front of (or above) the contents of its parent visual, but behind (or below) the contents of its children.

The referenceVisual parameter must be an existing child of the parent visual, or it must be null. The insertAbove parameter indicates whether the new child should be rendered immediately above the reference visual in the Z order, or immediately below it.

If the referenceVisual parameter is null, the specified visual is rendered above or below all children of the parent visual, depending on the value of the insertAbove parameter. If insertAbove is TRUE, the new child visual is above no sibling, therefore it is rendered below all of its siblings. Conversely, if insertAbove is , the visual is below no sibling, therefore it is rendered above all of its siblings.

The visual specified by the visual parameter cannot be either a child of a single other visual, or the root of a visual tree that is associated with a composition target. If visual is already a child of another visual, AddVisual fails. The child visual must be removed from the children list of its previous parent before adding it to the children list of the new parent. If visual is the root of a visual tree, the visual must be dissociated from that visual tree before adding it to the children list of the new parent. To dissociate the visual from a visual tree, call the method and specify either a different visual or null as the visual parameter.

A child visual need not have been created by the same interface as its parent. When visuals from different devices are combined in the same visual tree, Microsoft DirectComposition composes the tree as it normally would, except that changes to a particular visual take effect only when is called on the device object that created the visual. The ability to combine visuals from different devices enables multiple threads to create and manipulate a single visual tree while maintaining independent devices that can be used to commit changes asynchronously

This method fails if visual or referenceVisual is an invalid reference, or if the visual referenced by the referenceVisual parameter is not a child of the parent visual. These interfaces cannot be custom implementations; only interfaces created by DirectComposition can be used with this method.

hh449141 HRESULT IDCompositionVisual::AddVisual([In] IDCompositionVisual* visual,[In] BOOL insertAbove,[In, Optional] IDCompositionVisual* referenceVisual) IDCompositionVisual::AddVisual

Removes a child visual from the children list of this visual.

The child visual to remove from the children list. This parameter must not be null.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

The child visual is removed from the list of children. The order of the remaining child visuals is not changed.

This method fails if visual is not a child of the parent visual.

hh449145 HRESULT IDCompositionVisual::RemoveVisual([In] IDCompositionVisual* visual) IDCompositionVisual::RemoveVisual

Removes all visuals from the children list of this visual.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

This method can be called even if this visual has no children.

hh449143 HRESULT IDCompositionVisual::RemoveAllVisuals() IDCompositionVisual::RemoveAllVisuals

Sets the blending mode for this visual.

The blending mode to use when composing the visual to the screen.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

The composite mode determines how visual's bitmap is blended with the screen. By default, the visual is blended with "source over" semantics; that is, the colors are blended with per-pixel transparency.

Hh802902 HRESULT IDCompositionVisual::SetCompositeMode([In] DCOMPOSITION_COMPOSITE_MODE compositeMode) IDCompositionVisual::SetCompositeMode

Sets the Effect property of this visual. The Effect property modifies how the subtree that is rooted at this visual is blended with the background, and can apply a 3D perspective transform to the visual.

This method creates an implicit off-screen surface to which the subtree that is rooted at this visual is composed. The surface is used as one of the inputs to the specified effect. The output of the effect is composed directly to the composition target. Some effects also use the composition target as another implicit input. This is typically the case for compositional or blend effects such as opacity, where the composition target is considered to be the "background." In that case, any visuals that are "behind" the current visual are included in the composition target when the current visual is rendered and are considered to be the "background" that this visual composes to.

If this visual is not the root of a visual tree and one of its ancestors also has an effect applied to it, the off-screen surface created by the closest ancestor is the composition target to which this visual's effect is composed. Otherwise, the composition target is the root composition target. As a consequence, the background for compositional and blend effects includes only the visuals up to the closest ancestor that itself has an effect. Conversely, any effects applied to visuals under the current visual use the newly created off-screen surface as the background, which may affect how those visuals ultimately compose on top of what the end user perceives as being "behind" those visuals.

If the effect parameter is null, no bitmap effect is applied to this visual. Any previous effects that were associated with this visual are removed. The off-screen surface is also removed and the visual subtree is composed directly to the parent composition target, which may also affect how compositional or blend effects under this visual are rendered.

This method fails if effect is an invalid reference or if it was not created by the same interface that created this visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method.

hh449159 SetEffect SetEffect HRESULT IDCompositionVisual::SetEffect([In, Optional] IDCompositionEffect* effect)

Sets the BitmapInterpolationMode property, which specifies the mode for Microsoft DirectComposition to use when interpolating pixels from bitmaps that are not axis-aligned or drawn exactly at scale.

The interpolation mode affects how a bitmap is composed when it is transformed such that there is no one-to-one correspondence between pixels in the bitmap and pixels on the screen.

By default, a visual inherits the interpolation mode of the parent visual, which may inherit the interpolation mode of its parent visual, and so on. A visual uses the default interpolation mode if this method is never called for the visual, or if this method is called with . If no visuals set the interpolation mode, the default for the entire visual tree is nearest neighbor interpolation, which offers the lowest visual quality but the highest performance.

If the interpolationMode parameter is anything other than , this visual's bitmap is composed with the specified interpolation mode, and this mode becomes the new default mode for the children of this visual. That is, if the interpolation mode of this visual's children is unchanged or explicitly set to , the bitmaps of the child visuals are composed using the interpolation mode of this visual.

hh449147 SetBitmapInterpolationMode SetBitmapInterpolationMode HRESULT IDCompositionVisual::SetBitmapInterpolationMode([In] DCOMPOSITION_BITMAP_INTERPOLATION_MODE interpolationMode)

Sets the BorderMode property, which specifies how to compose the edges of bitmaps and clips associated with this visual, or with visuals in the subtree rooted at this visual.

The border mode affects how the edges of a bitmap are composed when the bitmap is transformed such that the edges are not exactly axis-aligned and at precise pixel boundaries. It also affects how content is clipped at the corners of a clip that has rounded corners, and at the edge of a clip that is transformed such that the edges are not exactly axis-aligned and at precise pixel boundaries.

By default, a visual inherits the border mode of its parent visual, which may inherit the border mode of its parent visual, and so on. A visual uses the default border mode if this method is never called for the visual, or if this method is called with . If no visuals set the border mode, the default for the entire visual tree is aliased rendering, which offers the lowest visual quality but the highest performance.

If the borderMode parameter is anything other than , this visual's bitmap and clip are composed with the specified border mode. In addition, this border mode becomes the new default for the children of the current visual. That is, if the border mode of this visual's children is unchanged or explicitly set to , the bitmaps and clips of the child visuals are composed using the border mode of this visual.

hh449149 SetBorderMode SetBorderMode HRESULT IDCompositionVisual::SetBorderMode([In] DCOMPOSITION_BORDER_MODE borderMode)

Sets the Content property of this visual to the specified bitmap or window wrapper.

The content parameter must point to one of the following:

  • An object that implements the interface.
  • An object that implements the interface.
  • A wrapper object that is returned by the CreateSurfaceFromHandle or CreateSurfaceFromHwnd method.

The new content replaces any content that was previously associated with the visual. If the content parameter is null, the visual has no associated content.

A visual can be associated with a bitmap object or a window wrapper. A bitmap is either a Microsoft DirectX swap chain or a Microsoft DirectComposition surface.

A window wrapper is created with the CreateSurfaceFromHwnd method and is a stand-in for the rasterization of another window, which must be a top-level window or a layered child window. A window wrapper is conceptually equivalent to a bitmap that is the size of the target window on which the contents of the window are drawn. The contents include the target window's child windows (layered or otherwise), and any DirectComposition content that is drawn in the child windows.

A DirectComposition surface wrapper is created with the CreateSurfaceFromHandle method and is a reference to a swap chain. An application might use a surface wrapper in a cross-process scenario where one process creates the swap chain and another process associates the bitmap with a visual.

The bitmap is always drawn at position (0,0) relative to the visual's coordinate system, although the coordinate system is directly affected by the OffsetX, OffsetY, and Transform properties, as well as indirectly by the transformations on ancestor visuals. The bitmap of a visual is always drawn behind the children of that visual.

hh449157 SetContent SetContent HRESULT IDCompositionVisual::SetContent([In, Optional] IUnknown* content)

Sets the blending mode for this visual.

The composite mode determines how visual's bitmap is blended with the screen. By default, the visual is blended with "source over" semantics; that is, the colors are blended with per-pixel transparency.

Hh802902 SetCompositeMode SetCompositeMode HRESULT IDCompositionVisual::SetCompositeMode([In] DCOMPOSITION_COMPOSITE_MODE compositeMode)

Represents one DirectComposition visual in a visual tree.

dn280426 IDCompositionVisual2 IDCompositionVisual2
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Sets the opacity mode for this visual.

The opacity mode to use when composing the visual to the screen.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

The opacity mode affects how the Opacity property of an effect group object affects the composition of a visual sub-tree. DirectComposition supports two opacity modes: Layer and Multiply. In Layer mode, each visual sub-tree can be logically viewed as a bitmap that contains the opaque rasterization of that entire sub-tree, to which the opacity value is then applied. In this manner, overlapping opaque surfaces blend with the sub-tree?s background, but not with each other. In contrast, in Multiply mode the opacity is applied individually to each surface as it is composed, so surfaces blend with each other. Multiply mode is faster than Layer mode and always preferred if the visual tree contains entirely non-overlapping contents. However, Multiply mode may produce undesired visual results for overlapping elements.

By default, a visual inherits the opacity mode of its parent visual, which may inherit the opacity mode of its parent visual, and so on. A visual uses the mode if this method is never called for the visual, or if this method is called with . If no visuals set the opacity mode, the default for the entire visual tree is .

If the opacityMode parameter is anything other than , this visual's surfaces are composed with the specified opacity mode. In addition, this opacity mode becomes the new default for the children of the current visual. That is, if the opacity mode of this visual's children is unchanged or explicitly set to , the surfaces the child visuals are composed using the opacity mode of this visual.

dn280428 HRESULT IDCompositionVisual2::SetOpacityMode([In] DCOMPOSITION_OPACITY_MODE mode) IDCompositionVisual2::SetOpacityMode

Specifies whether or not surfaces that have 3D transformations applied to them should be displayed when facing away from the observer.

The back face visibility to use when composing surfaces in this visual?s sub-tree to the screen.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

The back face visibility property affects how surfaces that have 3D transformations applied are rendered.

By default, a visual inherits the back face visibility property of its parent visual, which may inherit the back face visibility property of its parent visual, and so on. A visual uses the mode if this method is never called for the visual, or if this method is called with . If no visuals set the back face visibility property, the default for the entire visual tree is .

If the visibility parameter is anything other than , this visual's surfaces are composed with the specified visibility mode. In addition, this visibility mode becomes the new default for the children of the current visual. That is, if the visibility mode of this visual's children is unchanged or explicitly set to , the surfaces the child visuals are composed using the visibility mode of this visual.

dn280427 HRESULT IDCompositionVisual2::SetBackFaceVisibility([In] DCOMPOSITION_BACKFACE_VISIBILITY visibility) IDCompositionVisual2::SetBackFaceVisibility

Sets the opacity mode for this visual.

The opacity mode affects how the Opacity property of an effect group object affects the composition of a visual sub-tree. DirectComposition supports two opacity modes: Layer and Multiply. In Layer mode, each visual sub-tree can be logically viewed as a bitmap that contains the opaque rasterization of that entire sub-tree, to which the opacity value is then applied. In this manner, overlapping opaque surfaces blend with the sub-tree?s background, but not with each other. In contrast, in Multiply mode the opacity is applied individually to each surface as it is composed, so surfaces blend with each other. Multiply mode is faster than Layer mode and always preferred if the visual tree contains entirely non-overlapping contents. However, Multiply mode may produce undesired visual results for overlapping elements.

By default, a visual inherits the opacity mode of its parent visual, which may inherit the opacity mode of its parent visual, and so on. A visual uses the mode if this method is never called for the visual, or if this method is called with . If no visuals set the opacity mode, the default for the entire visual tree is .

If the opacityMode parameter is anything other than , this visual's surfaces are composed with the specified opacity mode. In addition, this opacity mode becomes the new default for the children of the current visual. That is, if the opacity mode of this visual's children is unchanged or explicitly set to , the surfaces the child visuals are composed using the opacity mode of this visual.

dn280428 SetOpacityMode SetOpacityMode HRESULT IDCompositionVisual2::SetOpacityMode([In] DCOMPOSITION_OPACITY_MODE mode)

Specifies whether or not surfaces that have 3D transformations applied to them should be displayed when facing away from the observer.

The back face visibility property affects how surfaces that have 3D transformations applied are rendered.

By default, a visual inherits the back face visibility property of its parent visual, which may inherit the back face visibility property of its parent visual, and so on. A visual uses the mode if this method is never called for the visual, or if this method is called with . If no visuals set the back face visibility property, the default for the entire visual tree is .

If the visibility parameter is anything other than , this visual's surfaces are composed with the specified visibility mode. In addition, this visibility mode becomes the new default for the children of the current visual. That is, if the visibility mode of this visual's children is unchanged or explicitly set to , the surfaces the child visuals are composed using the visibility mode of this visual.

dn280427 SetBackFaceVisibility SetBackFaceVisibility HRESULT IDCompositionVisual2::SetBackFaceVisibility([In] DCOMPOSITION_BACKFACE_VISIBILITY visibility)

Represents a debug visual.

dn280429 IDCompositionVisualDebug IDCompositionVisualDebug
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Enables a visual heatmap that represents overdraw regions.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

Heatmaps can be enabled by calling EnableHeatMap. The heatmaps are drawn on the source of the VisualDebug visual and child visuals. The heatmaps are represented in a specified color for all visual content. The heatmap color must have an transparency in order to see the overlaying overdraw regions. The colored surfaces are blended together to visually show all overdraw regions in a single view.

dn280432 HRESULT IDCompositionVisualDebug::EnableHeatMap([In] const D2D_COLOR_F& color) IDCompositionVisualDebug::EnableHeatMap

Disables visual heatmaps.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

dn280430 HRESULT IDCompositionVisualDebug::DisableHeatMap() IDCompositionVisualDebug::DisableHeatMap

Enables highlighting visuals when content is being redrawn.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

Highlighting redraw regions can be enabled by calling EnableRedrawRegions. With this function, redrawn client areas are visually highlighted every frame the visual is updated. Redraw regions are drawn on the source of the VisualDebug and child visuals. Redraw is triggered when properties of a visual are updated. The updated visusal does not neccessarly need to visually change to trigger a redraw. The highlighting will cycle through Blue, Yellow, Pink and Green to provide an order of which content is being updated. The redraw regions are only visible while the window of the VisualDebug is being updated.

dn280433 HRESULT IDCompositionVisualDebug::EnableRedrawRegions() IDCompositionVisualDebug::EnableRedrawRegions

Disables visual redraw regions.

If the function succeeds, it returns . Otherwise, it returns an error code. See DirectComposition Error Codes for a list of error codes.

dn280431 HRESULT IDCompositionVisualDebug::DisableRedrawRegions() IDCompositionVisualDebug::DisableRedrawRegions

Describes timing and composition statistics for a frame.

The method fills this structure. An application can use the information in this structure to estimate the timestamp of the next few frames that will be started by the composition engine. Note that this is only an estimate because the composition engine may or may not compose the next frame, depending on whether any active animations or other work are pending for that frame. In addition, the composition engine may change frame rates according to the cost of composing individual frames.

hh437366 DCOMPOSITION_FRAME_STATISTICS DCOMPOSITION_FRAME_STATISTICS

The time stamp of the last batch of commands to be processed by the composition engine.

hh437366 LARGE_INTEGER lastFrameTime LARGE_INTEGER lastFrameTime

The rate at which the composition engine is producing frames, in frames per second.

hh437366 DXGI_RATIONAL currentCompositionRate DXGI_RATIONAL currentCompositionRate

The current time as computed by the QueryPerformanceCounter function.

hh437366 LARGE_INTEGER currentTime LARGE_INTEGER currentTime

The units in which the lastFrameTime and currentTime members are specified, in Hertz.

hh437366 LARGE_INTEGER timeFrequency LARGE_INTEGER timeFrequency

The estimated time when the next frame will be displayed.

hh437366 LARGE_INTEGER nextEstimatedFrameTime LARGE_INTEGER nextEstimatedFrameTime