[]
        
(Showing Draft Content)

GrapeCity.Documents.DX.Direct2D.Effects.Turbulence

Class Turbulence

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

Builtin Turbulence effect.

public class Turbulence : Effect, IDisposable, IUnknown
Inheritance
object
Turbulence
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

Turbulence(IntPtr)

Initializes a new instance of the Turbulence class.

public Turbulence(IntPtr nativePtr)

Parameters

nativePtr System.IntPtr

The native pointer.

Properties

BaseFrequency

The base frequencies in the X and Y direction.. This property is a float and must be greater than 0. The units are specified in 1/DIPs. A value of 1 (1/DIPs) for the base frequency results in the Perlin noise completing an entire cycle between two pixels. The ease interpolation for these pixels results in completely random pixels, since there is no correlation between the pixels. A value of 0.1(1/DIPs) for the base frequency, the Perlin noise function repeats every 10 DIPs. This results in correlation between pixels and the typical turbulence effect is visible

public Vector2 BaseFrequency { get; set; }

Property Value

Vector2

Noise

The turbulence noise mode. This property can be either fractal sum or turbulence. Indicates whether to generate a bitmap based on Fractal Noise or the Turbulence function. See Noise modes for more info.

public TurbulenceNoise Noise { get; set; }

Property Value

TurbulenceNoise

OctaveCount

The number of octaves for the noise function. This property is an int and must be greater than 0.

public int OctaveCount { get; set; }

Property Value

int

Offset

The coordinates where the turbulence output is generated. The algorithm used to generate the Perlin noise is position dependent, so a different offset results in a different output. This property is not bounded and the units are specified in DIPs

public Vector2 Offset { get; set; }

Property Value

Vector2

Remarks

The offset does not have the same effect as a translation because the noise function output is infinite and the function will wrap around the tile.

Seed

The seed for the pseudo random generator. This property is unbounded.

public int Seed { get; set; }

Property Value

int

Stitchable

Turns stitching on or off. The base frequency is adjusted so that output bitmap can be stitched. This is useful if you want to tile multiple copies of the turbulence effect output. true: The output bitmap can be tiled (using the tile effect) without the appearance of seams. The base frequency is adjusted so that output bitmap can be stitched. false: The base frequency is not adjusted, so seams may appear between tiles if the bitmap is tiled.

public bool Stitchable { get; set; }

Property Value

bool

Methods

Create(DeviceContext)

Initializes a new instance of Turbulence effect.

public static Turbulence Create(DeviceContext context)

Parameters

context DeviceContext

Returns

Turbulence