Leadtools.ImageProcessing.Effects Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.12.10
RegionContourPointsCommand Constructor()
See Also  Example
Leadtools.ImageProcessing.Effects Namespace > RegionContourPointsCommand Class > RegionContourPointsCommand Constructor : RegionContourPointsCommand Constructor()




Initializes a new RegionContourPointsCommand class object with default parameters.

Syntax

Visual Basic (Declaration) 
Public Function New()
Visual Basic (Usage)Copy Code
Dim instance As RegionContourPointsCommand()
C# 
public RegionContourPointsCommand()
Managed Extensions for C++ 
public: RegionContourPointsCommand();
C++/CLI 
public:
RegionContourPointsCommand();

Example

Visual BasicCopy Code
ImageProcessing.Effects.RegionContourPointsCommand.RegionContourPointsConstructor
   Public Sub RegionContourPointsConstructorExample()
      RasterCodecs.Startup()
      Dim codecs As New RasterCodecs()
      codecs.ThrowExceptionsOnInvalidImages = True

      Dim leadImage As RasterImage = codecs.Load("C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Master.jpg")

      ' Prepare the command
      Dim rcRect As Rectangle = New Rectangle(leadImage.Width \ 3, leadImage.Height \ 3, leadImage.Width * 2 \ 3, leadImage.Height * 2 \ 3)
      leadImage.AddEllipseToRegion(Nothing, rcRect, RasterRegionCombineMode.Set)
      Dim command As RegionContourPointsCommand = New RegionContourPointsCommand
      command.XForm = New RasterRegionXForm
      command.Run(leadImage)
      codecs.Save(leadImage, "C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Result.jpg", RasterImageFormat.Jpeg, 24)
      Dim points() As Point = command.Points

      RasterCodecs.Shutdown()
   End Sub
C#Copy Code
ImageProcessing.Effects.RegionContourPointsCommand.RegionContourPointsConstructor 
      public void RegionContourPointsConstructorExample() 
      { 
         // Load an image 
         RasterCodecs.Startup(); 
         RasterCodecs codecs = new RasterCodecs(); 
         codecs.ThrowExceptionsOnInvalidImages = true; 
 
         RasterImage image = codecs.Load(@"C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Master.jpg"); 
 
         // Prepare the command 
         Rectangle rcRect = new Rectangle(image.Width/3, image.Height/3, image.Width*2/3, image.Height*2/3); 
         image.AddEllipseToRegion(null, rcRect, RasterRegionCombineMode.Set); 
         RegionContourPointsCommand command = new RegionContourPointsCommand(); 
         command.XForm = new RasterRegionXForm(); 
         command.Run(image); 
         codecs.Save(image, @"C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Result.jpg", RasterImageFormat.Jpeg, 24); 
         Point[] points = command.Points; 
 
         RasterCodecs.Shutdown(); 
      }

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also