Leadtools.Windows.Media.Effects Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.02.15
PerlinCommandBitmapEffect Class
See Also  Members   Example 
Leadtools.Windows.Media.Effects.SpecialEffects Namespace : PerlinCommandBitmapEffect Class





Uses a pseudo-random number generator in order to create a Perlin noise, and then procedurally transforms that noise into a texture.

Syntax

Visual Basic (Declaration) 
Public Class PerlinCommandBitmapEffect 
   Inherits RasterCommandBitmapEffect
Visual Basic (Usage)Copy Code
Dim instance As PerlinCommandBitmapEffect
C# 
public class PerlinCommandBitmapEffect : RasterCommandBitmapEffect 
Managed Extensions for C++ 
public __gc class PerlinCommandBitmapEffect : public RasterCommandBitmapEffect 
C++/CLI 
public ref class PerlinCommandBitmapEffect : public RasterCommandBitmapEffect 
XAML Property Element Usage 

PerlinCommandBitmapEffect ...

Example

Run the PerlinCommandBitmapEffect on an image and apply the Perlin filter.

Visual BasicCopy Code
Public Sub PerlinCommandBitmapEffectExample(ByVal element As FrameworkElement)
   Dim effect As PerlinCommandBitmapEffect = New PerlinCommandBitmapEffect()
   effect.Backcolor = Color.FromRgb(0, 128, 0)
   effect.DenLayout = 10
   effect.FreqLayout = 10
   effect.Frequency = 10
   effect.Iteration = 5
   effect.Opacity = 10
   effect.PerlinColor = Color.FromRgb(29, 100, 200)
   effect.PerlinFlags = NoiseLayoutBitmapEffectsType.PF_Circle
   effect.Seed = 7
   effect.XCircle = 100
   effect.YCircle = 100
   element.BitmapEffect = effect

   Dim storyboard As Storyboard = New Storyboard()

   Dim animation1 As Int32Animation = New Int32Animation()
   animation1.From = 1
   animation1.To = 16
   animation1.Duration = New Duration(TimeSpan.Parse("0:0:5"))
   animation1.RepeatBehavior = RepeatBehavior.Forever
   animation1.AutoReverse = True

   storyboard.SetTargetName(animation1, "AnimatedBitmapEffect")
   storyboard.SetTargetProperty(animation1, New PropertyPath(PerlinCommandBitmapEffect.FrequencyProperty))
   element.RegisterName("AnimatedBitmapEffect", effect)
   storyboard.Children.Add(animation1)

   storyboard.Begin(element)
End Sub
C#Copy Code
public void PerlinCommandBitmapEffectExample(FrameworkElement element) 

   PerlinCommandBitmapEffect effect = new PerlinCommandBitmapEffect(); 
   effect.Backcolor = Color.FromRgb(0, 128, 0); 
   effect.DenLayout = 10; 
   effect.FreqLayout = 10; 
   effect.Frequency = 10; 
   effect.Iteration = 5; 
   effect.Opacity = 10; 
   effect.PerlinColor = Color.FromRgb(29, 100, 200); 
   effect.PerlinFlags = NoiseLayoutBitmapEffectsType.PF_Circle; 
   effect.Seed = 7; 
   effect.XCircle = 100; 
   effect.YCircle = 100; 
   element.BitmapEffect = effect; 
 
   Storyboard storyboard = new Storyboard(); 
 
   Int32Animation animation1 = new Int32Animation(); 
   animation1.From = 1; 
   animation1.To = 16; 
   animation1.Duration = new Duration(TimeSpan.Parse("0:0:5")); 
   animation1.RepeatBehavior = RepeatBehavior.Forever; 
   animation1.AutoReverse = true; 
 
   Storyboard.SetTargetName(animation1, "AnimatedBitmapEffect"); 
   Storyboard.SetTargetProperty(animation1, new PropertyPath(PerlinCommandBitmapEffect.FrequencyProperty)); 
   element.RegisterName("AnimatedBitmapEffect", effect); 
   storyboard.Children.Add(animation1); 
 
   storyboard.Begin(element); 
}

Remarks

  • This method uses a pseudo-random number generator in order to create a Perlin noise, and then procedurally transforms that noise into a texture. Depending on the flags that are set, the texture can be saved as an image by itself, or the texture can be combined with another image.
  • This method is similar to the CloudsCommandBitmapEffect in that they both use Perlin equations to generate pseudo-random noise, but each method applies different equations to the noise to produce the texture.
  • Use the AddNoiseCommandBitmapEffect in order to add random noise to an image.
  • This command does not support signed data images.

Inheritance Hierarchy

System.Object
   System.Windows.Threading.DispatcherObject
      System.Windows.DependencyObject
         System.Windows.Freezable
            System.Windows.Media.Animation.Animatable
               System.Windows.Media.Effects.BitmapEffect
                  Leadtools.Windows.Media.Effects.RasterCommandBitmapEffect
                     Leadtools.Windows.Media.Effects.SpecialEffects.PerlinCommandBitmapEffect

Requirements

Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Vista, and Windows Server 2003

See Also

Reference

PerlinCommandBitmapEffect Members
Leadtools.Windows.Media.Effects.SpecialEffects Namespace
AddNoiseCommandBitmapEffect Class
SharpenCommandBitmapEffect Class
PosterizeCommandBitmapEffect Class
MosaicCommandBitmapEffect Class
EmbossCommandBitmapEffect Class
AverageCommandBitmapEffect Class
MedianCommandBitmapEffect Class
IntensityDetectCommandBitmapEffect Class
SpatialFilterCommandBitmapEffect Class
BinaryFilterCommandBitmapEffect Class
MinimumCommandBitmapEffect Class
MaximumCommandBitmapEffect Class
OilifyCommandBitmapEffect Class
SolarizeCommandBitmapEffect Class
CubismCommandBitmapEffect Class
DrawStarCommandBitmapEffect Class
DryCommandBitmapEffect Class
FreePlaneBendCommandBitmapEffect Class
FreeRadialBendCommandBitmapEffect Class
GlassEffectCommandBitmapEffect Class
GlowCommandBitmapEffect Class
LensFlareCommandBitmapEffect Class
OceanCommandBitmapEffect Class
PlaneBendCommandBitmapEffect Class
PlaneCommandBitmapEffect Class
SampleTargetCommandBitmapEffect Class
TunnelCommandBitmapEffect Class
BendCommandBitmapEffect Class
CylinderCommandBitmapEffect Class
FreeHandShearCommandBitmapEffect Class
FreeHandWaveCommandBitmapEffect Class
ImpressionistCommandBitmapEffect Class
PixelateCommandBitmapEffect Class
PolarCommandBitmapEffect Class
RadialBlurCommandBitmapEffect Class
RadialWaveCommandBitmapEffect Class
RippleCommandBitmapEffect Class
SphereCommandBitmapEffect Class
SwirlCommandBitmapEffect Class
WaveCommandBitmapEffect Class
WindCommandBitmapEffect Class
ZoomBlurCommandBitmapEffect Class
ZoomWaveCommandBitmapEffect Class
ShadowCommandBitmapEffect Class
RevEffectCommandBitmapEffect Class
AgingCommandBitmapEffect Class
DiceEffectCommandBitmapEffect Class
FunctionalLightCommandBitmapEffect Class
PuzzleEffectCommandBitmapEffect Class
RingEffectCommandBitmapEffect Class
AddNoiseCommandBitmapEffect Class