Leadtools.Windows.Media.Effects Send comments on this topic. | Back to Introduction - LEADTOOLS WPF | Help Version 16.5.9.25
Angle Property
See Also  Example
Leadtools.Windows.Media.Effects.SpecialEffects Namespace > FunctionalLightCommandBitmapEffect Class : Angle Property





Gets or sets a value that represents the angle, in hundredths of degrees.

Syntax

Visual Basic (Declaration) 
Public Property Angle As Integer
Visual Basic (Usage)Copy Code
Dim instance As FunctionalLightCommandBitmapEffect
Dim value As Integer
 
instance.Angle = value
 
value = instance.Angle
C# 
public int Angle {get; set;}
C++/CLI 
public:
property int Angle {
   int get();
   void set (int value);
}
XAML Attributes Usage 

<object Angle =int >

Dependencies Property Information 

Identifier field

AngleProperty

Metadata properties set to true

None

XAML Attributes Usage 

<object Angle =int >

Dependencies Property Information 

Identifier field

AngleProperty

Metadata properties set to true

None

Return Value

Value that represents the angle, in hundredths of degrees. This property is used if the Flags property is set to FunctionalLightCommandBitmapEffectsFlags.Trigonometry or to FunctionalLightCommandBitmapEffectsFlags.Freehand. Valid values for this property range from -18000 to 18000. This value is divided internally by 100.

Example

Visual BasicCopy Code
' Run the FunctionalLight command on an image.
Public Sub AnglePropertyExample(ByVal element As FrameworkElement)
   Dim effect As FunctionalLightCommandBitmapEffect = New FunctionalLightCommandBitmapEffect()
   Dim curve() As Integer
   curve = New Integer() {0, 1666, 3333, 5000, 5333, 5666, 6000, 6333, 6666, 7000, 8000, 9000, 10000}
   effect.RedAmplitude = 90
   effect.GreenAmplitude = 50
   effect.BlueAmplitude = 75
   effect.Angle = 4500
   effect.PhaseShift = 3000
   effect.Frequency = 3000
   effect.Buffer = curve
   effect.Flags = FunctionalLightCommandBitmapEffectsFlags.Freehand Or FunctionalLightCommandBitmapEffectsFlags.Addition
   element.BitmapEffect = effect
End Sub
C#Copy Code
//Run the FunctionalLight command on an image. 
public void AnglePropertyExample(FrameworkElement element) 

   FunctionalLightCommandBitmapEffect effect = new FunctionalLightCommandBitmapEffect(); 
   int[] curve = { 0, 1666, 3333, 5000, 5333, 5666, 6000, 6333, 6666, 7000, 8000, 9000, 10000 }; 
   effect.RedAmplitude = 90; 
   effect.GreenAmplitude = 50; 
   effect.BlueAmplitude = 75; 
   effect.Angle = 4500; 
   effect.PhaseShift = 3000; 
   effect.Frequency = 5000; 
   effect.Buffer = curve; 
   effect.Flags = FunctionalLightCommandBitmapEffectsFlags.Freehand | FunctionalLightCommandBitmapEffectsFlags.Addition; 
   element.BitmapEffect = effect; 
}
XAMLCopy Code
<Page Title="CSAnimateEffect" Height="391" Width="300" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:lteffects="clr-namespace:Leadtools.Windows.Media.Effects.SpecialEffects;assembly=Leadtools.Windows.Media.Effects"> 
  <Grid> 
    <Image Margin="10,10,10,10" HorizontalAlignment="Center" VerticalAlignment="Center" Source="C:\Program Files\LEAD Technologies, Inc\LEADTOOLS 16\Images\slave.jpg"> 
      <Image.BitmapEffect> 
        <lteffects:FunctionalLightCommandBitmapEffect x:Name="MyBitmapEffect" RedAmplitude="90" GreenAmplitude="50" BlueAmplitude="75" Angle="4500" PhaseShift="3000" Frequency="3000" Origin="5,5" /> 
      </Image.BitmapEffect> 
      <Image.Triggers> 
        <EventTrigger RoutedEvent="Image.Loaded"> 
          <BeginStoryboard> 
            <Storyboard> 
              <PointAnimation Storyboard.TargetName="MyBitmapEffect" Storyboard.TargetProperty="Origin" From="5,5" To="200,150" Duration="0:0:4" RepeatBehavior="Forever" AutoReverse="True" /> 
            </Storyboard> 
          </BeginStoryboard> 
        </EventTrigger> 
      </Image.Triggers> 
    </Image> 
  </Grid> 
</Page>

Requirements

Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Vista, Windows Server 2008 family

See Also