Anteckning
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
Represents a graph of transform nodes.
Inheritance
The ID2D1TransformGraph interface inherits from the IUnknown interface. ID2D1TransformGraph also has these types of members:
Methods
The ID2D1TransformGraph interface has these methods.
| ID2D1TransformGraph::AddNode Adds the provided node to the transform graph. |
| ID2D1TransformGraph::Clear Clears the transform nodes and all connections from the transform graph. |
| ID2D1TransformGraph::ConnectNode Connects two nodes inside the transform graph. |
| ID2D1TransformGraph::ConnectToEffectInput Connects a transform node inside the graph to the corresponding effect input of the encapsulating effect. |
| ID2D1TransformGraph::GetInputCount Returns the number of inputs to the transform graph. |
| ID2D1TransformGraph::RemoveNode Removes the provided node from the transform graph. |
| ID2D1TransformGraph::SetOutputNode Sets the output node for the transform graph. |
| ID2D1TransformGraph::SetPassthroughGraph Uses the specified input as the effect output. |
| ID2D1TransformGraph::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->SetOutputNode(_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
| Requirement | Value |
|---|---|
| Minimum supported client | Windows 8 and Platform Update for Windows 7 [desktop apps | UWP apps] |
| Minimum supported server | Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | UWP apps] |
| Target Platform | Windows |
| Header | d2d1effectauthor.h |