XMConvertFloatToHalfStream
XMConvertHalfToFloatStream
XMMatrixDecompose
XMPlaneTransformStream
XMVector2TransformCoordStream
XMVector2TransformNormalStream
XMVector2TransformStream
XMVector3ProjectStream
XMVector3TransformCoordStream
XMVector3TransformNormalStream
XMVector3TransformStream
XMVector3UnprojectStream
XMVector4TransformStream
Expand Minimize

ID2D1TransformGraph interface

Represents a graph of transform nodes.

When to implement

Custom implementations are not supported.

Members

The ID2D1TransformGraph interface inherits from the IUnknown interface. ID2D1TransformGraph also has these types of members:

Methods

The ID2D1TransformGraph interface has these methods.

MethodDescription
AddNode

Adds the provided node to the transform graph.

Clear

Clears the transform nodes and all connections from the transform graph.

ConnectNode

Connects two nodes inside the transform graph.

ConnectToEffectInput

Connects a transform node inside the graph to the corresponding effect input of the encapsulating effect.

GetInputCount

Returns the number of inputs to the transform graph.

RemoveNode

Removes the provided node from the transform graph.

SetOutputNode

Sets the output node for the transform graph.

SetPassthroughGraph

Uses the specified input as the effect output.

SetSingleTransformNode

Sets a single transform node as being equivalent to the whole graph.

 

Remarks

This interface allows a graph of transform nodes to be specified. This interface is passed to ID2D1EffectImpl::Initialize to allow an effect implementation to specify a graph of transforms or a single transform.

Examples

This example shows how many of the methods on the ID2D1TransformGraph can be used.



class CMyEffect : public ID2D1EffectImpl
{
public:

    IFACEMETHODIMP SetGraph(
       __in ID2D1TransformGraph *pGraph
       )
    {
        HRESULT hr = S_OK;

        hr = pGraph->Clear();

        if (SUCEEDED(hr))
        {
            hr = pGraph->AddNode(_pTransform1);
        }
   
        if (SUCCEEDED(hr))
        {
            hr = pGraph->AddNode(_pTransform2);
        }
 
        if (SUCCEEDED(hr))
        {
            hr = pGraph->SetOuputNode(_pTransform2);
        }

        if (SUCCEEDED(hr))
        {
            hr = pGraph->ConnectNode(_pTransform1, _pTransform2, 0);
        }

        if (SUCCEEDED(hr))
        {
            hr = pGraph->ConnectToEffectInput(0, _pTransform1, 0);
        }

        return hr;
    }

private:

    class CMyTransform1 : public ID2D1DrawTransform
    {
        // <Snip> The transform implementation, one node input</Snip>
    };

    class CMyTransform2 : public ID2D1DrawTransform
    {
 	   // <Snip> A second transform implementation one node input</Snip>
    };

    CMyTransform1 *_pTransform1;
    CMyTransform2 *_pTransform2;
};


Requirements

Minimum supported client

Windows 8 and Platform Update for Windows 7 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | Windows Store apps]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Header

D2d1effectauthor.h

Library

D2d1.lib

See also

ID2D1EffectImpl

 

 

Community Additions

ADD
Show:
© 2014 Microsoft