Table of Contents

Class Effect

Namespace
SharpDX.Direct2D1
Assembly
SharpDX.Direct2D1.dll
[Guid("28211a43-7d89-476f-8181-2d6159b220ad")]
public class Effect : Properties
Inheritance
Effect
Derived
Inherited Members

Constructors

Effect(DeviceContext, Guid)

Initializes a new instance of the Effect class.

public Effect(DeviceContext deviceContext, Guid effectId)

Parameters

deviceContext DeviceContext

The device context.

effectId Guid

The class ID of the effect to create.

Remarks

The created effect does not increment the reference count for the dynamic-link library (DLL) from which the effect was created. If the application deletes an effect while that effect is loaded, the resulting behavior will be unpredictable.

Exceptions

SharpDX.SharpDXException

If no sufficient memory to complete the call, or if it does not have enough display memory to perform the operation, or if the specified effect is not registered by the system.

Effect(EffectContext, Guid)

Initializes a new instance of the Effect class.

public Effect(EffectContext effectContext, Guid effectId)

Parameters

effectContext EffectContext

The effect context.

effectId Guid

The class ID of the effect to create.

Effect(nint)

public Effect(nint nativePtr)

Parameters

nativePtr nint

Fields

AffineTransform2D

Constant AffineTransform2D

public static readonly Guid AffineTransform2D

Field Value

Guid

AlphaMask

Constant AlphaMask

public static readonly Guid AlphaMask

Field Value

Guid

ArithmeticComposite

Constant ArithmeticComposite

public static readonly Guid ArithmeticComposite

Field Value

Guid

Atlas

Constant Atlas

public static readonly Guid Atlas

Field Value

Guid

BitmapSource

Constant BitmapSource

public static readonly Guid BitmapSource

Field Value

Guid

Blend

Constant Blend

public static readonly Guid Blend

Field Value

Guid

Border

Constant Border

public static readonly Guid Border

Field Value

Guid

Brightness

Constant Brightness

public static readonly Guid Brightness

Field Value

Guid

ChromaKey

Constant ChromaKey

public static readonly Guid ChromaKey

Field Value

Guid

ColorManagement

Constant ColorManagement

public static readonly Guid ColorManagement

Field Value

Guid

ColorMatrix

Constant ColorMatrix

public static readonly Guid ColorMatrix

Field Value

Guid

Composite

Constant Composite

public static readonly Guid Composite

Field Value

Guid

Contrast

Constant Contrast

public static readonly Guid Contrast

Field Value

Guid

ConvolveMatrix

Constant ConvolveMatrix

public static readonly Guid ConvolveMatrix

Field Value

Guid

Crop

Constant Crop

public static readonly Guid Crop

Field Value

Guid

CrossFade

Constant CrossFade

public static readonly Guid CrossFade

Field Value

Guid

DirectionalBlur

Constant DirectionalBlur

public static readonly Guid DirectionalBlur

Field Value

Guid

DiscreteTransfer

Constant DiscreteTransfer

public static readonly Guid DiscreteTransfer

Field Value

Guid

DisplacementMap

Constant DisplacementMap

public static readonly Guid DisplacementMap

Field Value

Guid

DistantDiffuse

Constant DistantDiffuse

public static readonly Guid DistantDiffuse

Field Value

Guid

DistantSpecular

Constant DistantSpecular

public static readonly Guid DistantSpecular

Field Value

Guid

DpiCompensation

Constant DpiCompensation

public static readonly Guid DpiCompensation

Field Value

Guid

EdgeDetection

Constant EdgeDetection

public static readonly Guid EdgeDetection

Field Value

Guid

Emboss

Constant Emboss

public static readonly Guid Emboss

Field Value

Guid

Exposure

Constant Exposure

public static readonly Guid Exposure

Field Value

Guid

Flood

Constant Flood

public static readonly Guid Flood

Field Value

Guid

GammaTransfer

Constant GammaTransfer

public static readonly Guid GammaTransfer

Field Value

Guid

GaussianBlur

Constant GaussianBlur

public static readonly Guid GaussianBlur

Field Value

Guid

Grayscale

Constant Grayscale

public static readonly Guid Grayscale

Field Value

Guid

HighlightsShadows

Constant HighlightsShadows

public static readonly Guid HighlightsShadows

Field Value

Guid

Histogram

Constant Histogram

public static readonly Guid Histogram

Field Value

Guid

HueRotation

Constant HueRotation

public static readonly Guid HueRotation

Field Value

Guid

HueToRgb

Constant HueToRgb

public static readonly Guid HueToRgb

Field Value

Guid

Invert

Constant Invert

public static readonly Guid Invert

Field Value

Guid

LinearTransfer

Constant LinearTransfer

public static readonly Guid LinearTransfer

Field Value

Guid

LookupTable3D

Constant LookupTable3D

public static readonly Guid LookupTable3D

Field Value

Guid

LuminanceToAlpha

Constant LuminanceToAlpha

public static readonly Guid LuminanceToAlpha

Field Value

Guid

Morphology

Constant Morphology

public static readonly Guid Morphology

Field Value

Guid

Opacity

Constant Opacity

public static readonly Guid Opacity

Field Value

Guid

OpacityMetadata

Constant OpacityMetadata

public static readonly Guid OpacityMetadata

Field Value

Guid

PerspectiveTransform3D

Constant PerspectiveTransform3D

public static readonly Guid PerspectiveTransform3D

Field Value

Guid

PointDiffuse

Constant PointDiffuse

public static readonly Guid PointDiffuse

Field Value

Guid

PointSpecular

Constant PointSpecular

public static readonly Guid PointSpecular

Field Value

Guid

Posterize

Constant Posterize

public static readonly Guid Posterize

Field Value

Guid

Premultiply

Constant Premultiply

public static readonly Guid Premultiply

Field Value

Guid

RgbToHue

Constant RgbToHue

public static readonly Guid RgbToHue

Field Value

Guid

Saturation

Constant Saturation

public static readonly Guid Saturation

Field Value

Guid

Scale

Constant Scale

public static readonly Guid Scale

Field Value

Guid

Sepia

Constant Sepia

public static readonly Guid Sepia

Field Value

Guid

Shadow

Constant Shadow

public static readonly Guid Shadow

Field Value

Guid

Sharpen

Constant Sharpen

public static readonly Guid Sharpen

Field Value

Guid

SpotDiffuse

Constant SpotDiffuse

public static readonly Guid SpotDiffuse

Field Value

Guid

SpotSpecular

Constant SpotSpecular

public static readonly Guid SpotSpecular

Field Value

Guid

Straighten

Constant Straighten

public static readonly Guid Straighten

Field Value

Guid

TableTransfer

Constant TableTransfer

public static readonly Guid TableTransfer

Field Value

Guid

TemperatureTint

Constant TemperatureTint

public static readonly Guid TemperatureTint

Field Value

Guid

Tile

Constant Tile

public static readonly Guid Tile

Field Value

Guid

Tint

Constant Tint

public static readonly Guid Tint

Field Value

Guid

Transform3D

Constant Transform3D

public static readonly Guid Transform3D

Field Value

Guid

Turbulence

Constant Turbulence

public static readonly Guid Turbulence

Field Value

Guid

UnPremultiply

Constant UnPremultiply

public static readonly Guid UnPremultiply

Field Value

Guid

Vignette

Constant Vignette

public static readonly Guid Vignette

Field Value

Guid

YCbCr

Constant YCbCr

public static readonly Guid YCbCr

Field Value

Guid

Properties

InputCount

Gets or sets the number of inputs to the effect.

public int InputCount { get; set; }

Property Value

int

Output

Gets the output image from the effect.

public Image Output { get; }

Property Value

Image

Remarks

The output image can be set as an input to another effect, or can be directly passed into the DeviceContext in order to render the effect.

It is also possible to use QueryInterface to retrieve the same output image.

Methods

GetInput(int)

Represents a basic image-processing construct in Direct2D.

public Image GetInput(int index)

Parameters

index int

No documentation.

Returns

Image

Remarks

An effect takes zero or more input images, and has an output image. The images that are input into and output from an effect are lazily evaluated. This definition is sufficient to allow an arbitrary graph of effects to be created from the application by feeding output images into the input image of the next effect in the chain.

SetInput(int, Image, RawBool)

Sets the given input image by index.

public void SetInput(int index, Image input, RawBool invalidate)

Parameters

index int

The index of the image to set.

input Image

The input image to set.

invalidate RawBool

Whether to invalidate the graph at the location of the effect input

Remarks

If the input index is out of range, the input image is ignored.

SetInputEffect(int, Effect, bool)

Sets the input by using the output of a given effect.

public void SetInputEffect(int index, Effect effect, bool invalidate = true)

Parameters

index int

Index of the input

effect Effect

Effect output to use as input

invalidate bool

To invalidate

Operators

explicit operator Effect(nint)

public static explicit operator Effect(nint nativePtr)

Parameters

nativePtr nint

Returns

Effect