Table of Contents

Class PdnWavesEffect

Namespace
PaintDotNet.Effects.Gpu
Assembly
PaintDotNet.Effects.Gpu.dll

Provides Paint.NET's Waves effect as a DynamicEffect that can be used for rendering with Direct2D.

public sealed class PdnWavesEffect : PdnDistortionEffect, ISerializable, IDynamicEffect, IDynamicImage, IDeviceImage, IDirect2DResource, IObjectRef, IIsDisposed, IDisposable, IFactoryProperty, IInternalImpl
Inheritance
PdnWavesEffect
Implements
Inherited Members

Remarks

Which properties matter depends on the pattern. A property a pattern ignores is still stored and still forwarded to the shader; it simply has no part in the geometry that pattern builds.

                      Angle   Center   WaveLength   Lobes   Damping   Bounds
Linear                 yes    phase       yes         -        -         -
LongitudinalLinear     yes    phase       yes         -        -         -
Crossed                yes    phase       yes         -        -         -
Radial                  -      yes        yes         -       yes        -
Tangential              -      yes        yes         -       yes        -
SquareRings             -      yes        yes         -       yes        -
DiamondRings            -      yes        yes         -       yes        -
Angular                 -      yes         -         yes       -         -
Spiral                  -      yes        yes        yes      yes        -
FromEdges               -      yes        yes         -       yes       yes

Pattern, Waveform, Amplitude and Phase are read by every pattern, as are the PdnDistortionEffect properties this inherits.
"phase" marks the patterns that read Center only as the point where the wave's phase is zero, rather than as something the wavefronts are arranged around. Moving it slides those patterns along their direction of travel, which is what Phase already does, so Paint.NET's own Waves dialog does not offer it for them.

The waveform decides how much of Amplitude the displacement actually reaches, and how the result breaks down once the amplitude passes the fold threshold described there:

                Reaches      Past the fold threshold
Sine             all         folds over itself
Triangle         all         folds over itself, but not until a higher amplitude
Sawtooth         all         tears along the line where the wave resets
Square           all         tears along the line where the wave flips
Semicircle       all         creases at any amplitude; its arcs meet at a vertical tangent
Harmonics        about 58%   folds over itself
SteppedSine      all         tears along each step

Harmonics reaches less because it is scaled to match a sine's steepest slope rather than a sine's peak, which is what lets one fold threshold cover every waveform.

Constructors

PdnWavesEffect(IDeviceContext)

Creates an instance of the distortion effect.

Properties

Properties