Table of Contents

Class TransformGraph

Namespace
SharpDX.Direct2D1
Assembly
SharpDX.Direct2D1.dll
[Guid("13d29038-c3e6-4034-9081-13b53a417992")]
public class TransformGraph : ComObject
Inheritance
TransformGraph

Constructors

TransformGraph(nint)

public TransformGraph(nint nativePtr)

Parameters

nativePtr nint

Properties

InputCount

Returns the number of inputs to the transform graph.

public int InputCount { get; }

Property Value

int

Methods

AddNode(TransformNode)

Adds the provided node to the transform graph.

public void AddNode(TransformNode node)

Parameters

node TransformNode

The node that will be added to the transform graph.

Remarks

This adds a transform node to the transform graph. A node must be added to the transform graph before it can be interconnected in any way.

A transform graph cannot be directly added to another transform graph. Only interfaces derived from TransformNode can be added to the transform graph.

Clear()

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

public void Clear()

Remarks

Used when enough changes to transfoms would make editing of the transform graph inefficient.

ConnectNode(TransformNode, TransformNode, int)

Connects two nodes inside the transform graph.

public void ConnectNode(TransformNode fromNode, TransformNode toNode, int toNodeInputIndex)

Parameters

fromNode TransformNode

The node from which the connection will be made.

toNode TransformNode

The node to which the connection will be made.

toNodeInputIndex int

The node input that will be connected.

Remarks

Both nodes must already exist in the graph; otherwise, the call fails with D2DERR_NOT_FOUND.

ConnectToEffectInput(int, TransformNode, int)

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

public void ConnectToEffectInput(int toEffectInputIndex, TransformNode node, int toNodeInputIndex)

Parameters

toEffectInputIndex int

The effect input to which the transform node will be bound.

node TransformNode

The node to which the connection will be made.

toNodeInputIndex int

The node input that will be connected.

RemoveNode(TransformNode)

Removes the provided node from the transform graph.

public void RemoveNode(TransformNode node)

Parameters

node TransformNode

The node that will be removed from the transform graph.

Remarks

The node must already exist in the graph; otherwise, the call fails with D2DERR_NOT_FOUND.

Any connections to this node will be removed when the node is removed.

After the node is removed, it cannot be used by the interface until it has been added to the graph by AddNode.

SetOutputNode(TransformNode)

Sets the output node for the transform graph.

public void SetOutputNode(TransformNode node)

Parameters

node TransformNode

The node that will be considered the output of the transform node.

Remarks

The node must already exist in the graph; otherwise, the call fails with D2DERR_NOT_FOUND.

SetPassthroughGraph(int)

Uses the specified input as the effect output.

public void SetPassthroughGraph(int effectInputIndex)

Parameters

effectInputIndex int

The index of the input to the effect.

SetSingleTransformNode(TransformNode)

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

public void SetSingleTransformNode(TransformNode node)

Parameters

node TransformNode

The node to be set.

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.

Operators

explicit operator TransformGraph(nint)

public static explicit operator TransformGraph(nint nativePtr)

Parameters

nativePtr nint

Returns

TransformGraph