←Select platform

InvertEffect Constructor

Summary
Initializes a new instance of the InvertEffect class.
Syntax
C#
C++/CLI
public InvertEffect() 
public: 
InvertEffect(); 
Example
C#
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.ImageProcessing; 
using Leadtools.Windows.Controls; 
using Leadtools.Windows.Media; 
using Leadtools.Windows.Media.Effects; 
 
class InvertEffectExampleWindow : Window 
{ 
   private ImageViewer theViewer; 
 
   public InvertEffectExampleWindow() 
   { 
      StackPanel sp = new StackPanel(); 
      Content = sp; 
 
      theViewer = new ImageViewer(); 
 
      theViewer.HorizontalAlignment = HorizontalAlignment.Center; 
      theViewer.VerticalAlignment = VerticalAlignment.Top; 
      theViewer.ImageHorizontalAlignment = HorizontalAlignment.Left; 
      theViewer.ImageVerticalAlignment = VerticalAlignment.Top; 
 
      sp.Children.Add(theViewer); 
 
      // Load an image into the viewer 
      theViewer.Source = new BitmapImage(new Uri(System.IO.Path.Combine(LEAD_VARS.ImagesDir, "Cannon.jpg"))); 
 
      Title = "Double click to use the Effect"; 
 
      theViewer.MouseDoubleClick += new MouseButtonEventHandler(theViewer_MouseDoubleClick); 
   } 
 
   private void theViewer_MouseDoubleClick(object sender, MouseButtonEventArgs e) 
   { 
      InvertEffect effect = new InvertEffect(); 
      theViewer.ImageEffect = effect; 
 
      Title = "Using InvertEffect"; 
   } 
} 
 
static class LEAD_VARS 
{ 
   public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images"; 
} 
Requirements

Target Platforms

Help Version 22.0.2023.2.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Windows.Media.Effects Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.