Class Effect
[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
DeviceContextThe device context.
effectId
GuidThe 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
EffectContextThe effect context.
effectId
GuidThe 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
AlphaMask
Constant AlphaMask
public static readonly Guid AlphaMask
Field Value
ArithmeticComposite
Constant ArithmeticComposite
public static readonly Guid ArithmeticComposite
Field Value
Atlas
Constant Atlas
public static readonly Guid Atlas
Field Value
BitmapSource
Constant BitmapSource
public static readonly Guid BitmapSource
Field Value
Blend
Constant Blend
public static readonly Guid Blend
Field Value
Border
Constant Border
public static readonly Guid Border
Field Value
Brightness
Constant Brightness
public static readonly Guid Brightness
Field Value
ChromaKey
Constant ChromaKey
public static readonly Guid ChromaKey
Field Value
ColorManagement
Constant ColorManagement
public static readonly Guid ColorManagement
Field Value
ColorMatrix
Constant ColorMatrix
public static readonly Guid ColorMatrix
Field Value
Composite
Constant Composite
public static readonly Guid Composite
Field Value
Contrast
Constant Contrast
public static readonly Guid Contrast
Field Value
ConvolveMatrix
Constant ConvolveMatrix
public static readonly Guid ConvolveMatrix
Field Value
Crop
Constant Crop
public static readonly Guid Crop
Field Value
CrossFade
Constant CrossFade
public static readonly Guid CrossFade
Field Value
DirectionalBlur
Constant DirectionalBlur
public static readonly Guid DirectionalBlur
Field Value
DiscreteTransfer
Constant DiscreteTransfer
public static readonly Guid DiscreteTransfer
Field Value
DisplacementMap
Constant DisplacementMap
public static readonly Guid DisplacementMap
Field Value
DistantDiffuse
Constant DistantDiffuse
public static readonly Guid DistantDiffuse
Field Value
DistantSpecular
Constant DistantSpecular
public static readonly Guid DistantSpecular
Field Value
DpiCompensation
Constant DpiCompensation
public static readonly Guid DpiCompensation
Field Value
EdgeDetection
Constant EdgeDetection
public static readonly Guid EdgeDetection
Field Value
Emboss
Constant Emboss
public static readonly Guid Emboss
Field Value
Exposure
Constant Exposure
public static readonly Guid Exposure
Field Value
Flood
Constant Flood
public static readonly Guid Flood
Field Value
GammaTransfer
Constant GammaTransfer
public static readonly Guid GammaTransfer
Field Value
GaussianBlur
Constant GaussianBlur
public static readonly Guid GaussianBlur
Field Value
Grayscale
Constant Grayscale
public static readonly Guid Grayscale
Field Value
HighlightsShadows
Constant HighlightsShadows
public static readonly Guid HighlightsShadows
Field Value
Histogram
Constant Histogram
public static readonly Guid Histogram
Field Value
HueRotation
Constant HueRotation
public static readonly Guid HueRotation
Field Value
HueToRgb
Constant HueToRgb
public static readonly Guid HueToRgb
Field Value
Invert
Constant Invert
public static readonly Guid Invert
Field Value
LinearTransfer
Constant LinearTransfer
public static readonly Guid LinearTransfer
Field Value
LookupTable3D
Constant LookupTable3D
public static readonly Guid LookupTable3D
Field Value
LuminanceToAlpha
Constant LuminanceToAlpha
public static readonly Guid LuminanceToAlpha
Field Value
Morphology
Constant Morphology
public static readonly Guid Morphology
Field Value
Opacity
Constant Opacity
public static readonly Guid Opacity
Field Value
OpacityMetadata
Constant OpacityMetadata
public static readonly Guid OpacityMetadata
Field Value
PerspectiveTransform3D
Constant PerspectiveTransform3D
public static readonly Guid PerspectiveTransform3D
Field Value
PointDiffuse
Constant PointDiffuse
public static readonly Guid PointDiffuse
Field Value
PointSpecular
Constant PointSpecular
public static readonly Guid PointSpecular
Field Value
Posterize
Constant Posterize
public static readonly Guid Posterize
Field Value
Premultiply
Constant Premultiply
public static readonly Guid Premultiply
Field Value
RgbToHue
Constant RgbToHue
public static readonly Guid RgbToHue
Field Value
Saturation
Constant Saturation
public static readonly Guid Saturation
Field Value
Scale
Constant Scale
public static readonly Guid Scale
Field Value
Sepia
Constant Sepia
public static readonly Guid Sepia
Field Value
Shadow
Constant Shadow
public static readonly Guid Shadow
Field Value
Sharpen
Constant Sharpen
public static readonly Guid Sharpen
Field Value
SpotDiffuse
Constant SpotDiffuse
public static readonly Guid SpotDiffuse
Field Value
SpotSpecular
Constant SpotSpecular
public static readonly Guid SpotSpecular
Field Value
Straighten
Constant Straighten
public static readonly Guid Straighten
Field Value
TableTransfer
Constant TableTransfer
public static readonly Guid TableTransfer
Field Value
TemperatureTint
Constant TemperatureTint
public static readonly Guid TemperatureTint
Field Value
Tile
Constant Tile
public static readonly Guid Tile
Field Value
Tint
Constant Tint
public static readonly Guid Tint
Field Value
Transform3D
Constant Transform3D
public static readonly Guid Transform3D
Field Value
Turbulence
Constant Turbulence
public static readonly Guid Turbulence
Field Value
UnPremultiply
Constant UnPremultiply
public static readonly Guid UnPremultiply
Field Value
Vignette
Constant Vignette
public static readonly Guid Vignette
Field Value
YCbCr
Constant YCbCr
public static readonly Guid YCbCr
Field Value
Properties
InputCount
Gets or sets the number of inputs to the effect.
public int InputCount { get; set; }
Property Value
Output
Gets the output image from the effect.
public Image Output { get; }
Property Value
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
intNo documentation.
Returns
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
intThe index of the image to set.
input
ImageThe input image to set.
invalidate
RawBoolWhether 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
intIndex of the input
effect
EffectEffect output to use as input
invalidate
boolTo invalidate
Operators
explicit operator Effect(nint)
public static explicit operator Effect(nint nativePtr)
Parameters
nativePtr
nint