ID2D1TransformGraph::SetSingleTransformNode method
Sets a single transform node as being equivalent to the whole graph.
Syntax
HRESULT SetSingleTransformNode( ID2D1TransformNode *node );
Parameters
- node
-
Type: ID2D1TransformNode*
The node to be set.
Return value
Type: HRESULT
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
| HRESULT | Description |
|---|---|
| S_OK | No error occurred |
| E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
Remarks
This equivalent to calling ID2D1TransformGraph::Clear, adding a single node, connecting all of the node inputs to the effect inputs in order, and setting the transform not as the graph output.
Examples
class CMySimpleEffect : public ID2D1EffectImpl { public: IFACEMETHODIMP SetGraph( __in ID2D1TransformGraph *pGraph ) { HRESULT hr = S_OK; CMyTransform *pTransform = new CMyTransform(); hr = pTransform ? S_OK : E_OUTOFMEMORY; if (SUCCEEDED(hr)) { hr = graph->SetSingleTransformNode(pTransform); pTransform->Release(); } return hr; } private: class CMyTransform : public ID2D1DrawTransform { // <Snip> Implementation of transform </Snip> }; };
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 |
|
|
Library |
|
See also