[]
        
(Showing Draft Content)

GrapeCity.Documents.DX.Direct2D.Effects.SpotDiffuse

Class SpotDiffuse

Namespace
GrapeCity.Documents.DX.Direct2D.Effects
Assembly
GcDocs.DX.Windows.dll

Builtin SpotDiffuse effect.

public class SpotDiffuse : Effect, IDisposable, IUnknown
Inheritance
object
SpotDiffuse
Implements
System.IDisposable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Constructors

SpotDiffuse(IntPtr)

Initializes a new instance of the SpotDiffuse class.

public SpotDiffuse(IntPtr nativePtr)

Parameters

nativePtr System.IntPtr

The native pointer.

Properties

Color

The color of the incoming light. This property is exposed as a Vector3 – (R, G, B) and used to compute LR, LG, LB.

public Vector3 Color { get; set; }

Property Value

Vector3

DiffuseConstant

The ratio of diffuse reflection to amount of incoming light. This property must be between 0 and 10,000 and is unitless.

public float DiffuseConstant { get; set; }

Property Value

float

Focus

The focus of the spot light. This property is unitless and is defined between 0 and 200.

public float Focus { get; set; }

Property Value

float

KernelUnitLength

The size of an element in the Sobel kernel used to generate the surface normal in the X and Y direction. This property maps to the dx and dy values in the Sobel gradient. This property is a Vector2 (Kernel Unit Length X, Kernel Unit Length Y) and is defined in (device-independent pixels (DIPs)/Kernel Unit). The effect uses bilinear interpolation to scale the bitmap to match size of kernel elements.

public Vector2 KernelUnitLength { get; set; }

Property Value

Vector2

LightPosition

The light position of the point light source. The property is a Vector3 defined as (x, y, z). The units are in device-independent pixels (DIPs) and the values are unitless and unbounded.

public Vector3 LightPosition { get; set; }

Property Value

Vector3

LimitingConeAngle

The cone angle that restricts the region where the light is projected. No light is projected outside the cone. The limiting cone angle is the angle between the spot light axis (the axis between the LightPosition and PointsAt properties) and the spot light cone. This property is defined in degrees and must be between 0 to 90 degrees.

public float LimitingConeAngle { get; set; }

Property Value

float

PointsAt

Where the spot light is focused. The property is exposed as a Vector3 with – (x, y, z). The units are in DIPs and the values are unbounded.

public Vector3 PointsAt { get; set; }

Property Value

Vector3

ScaleMode

The interpolation mode the effect uses to scale the image to the corresponding kernel unit length. There are six scale modes that range in quality and speed. If you don't select a mode, the effect uses the interpolation mode of the device context. See Scale modes for more info.

public SpotDiffuseScaleMode ScaleMode { get; set; }

Property Value

SpotDiffuseScaleMode

SurfaceScale

The scale factor in the Z direction. The value is unitless and must be between 0 and 10,000.

public float SurfaceScale { get; set; }

Property Value

float

Methods

Create(DeviceContext)

Initializes a new instance of SpotDiffuse effect.

public static SpotDiffuse Create(DeviceContext context)

Parameters

context DeviceContext

Returns

SpotDiffuse