Leadtools.ImageProcessing.Core Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.12.10
HalfTonePatternCommand Constructor(Int32,Int32,Int32,Int32,Int32,RasterColor,RasterColor,HalfTonePatternCommandType)
See Also  Example
Leadtools.ImageProcessing.Core Namespace > HalfTonePatternCommand Class > HalfTonePatternCommand Constructor : HalfTonePatternCommand Constructor(Int32,Int32,Int32,Int32,Int32,RasterColor,RasterColor,HalfTonePatternCommandType)




contrast
Halftone pattern contrast. Increasing this value increases the pattern brightness, making it more visible.
ripple
Halftone pattern frequency. Internally, this value is divided by 100. For example, if ripple = 200 the actual frequency is 2. Increasing this value increases the number of dots, lines, etc. in the pattern.
angleContrast
Angular pattern contrast. Increasing this value increases brightness of the "spokes" in the image.
angleRipple
Angular pattern frequency. This value determines how many "spokes" appear in the image.
angleOffset
Angular pattern offset in hundredths of degrees (+/-). A positive value will rotate the screen clockwise, while a negative value will rotate the screen counter-clockwise.
foreGroundColor
Value that specifies the foreground color for any exposed areas.
backGroundColor
Value that specifies the background color for any exposed areas.
type
Value that indicates which halftone pattern type to use.
Initializes a new HalfTonePatternCommand with explicit parameters.

Syntax

Visual Basic (Declaration) 
Public Function New( _
   ByVal contrast As Integer, _
   ByVal ripple As Integer, _
   ByVal angleContrast As Integer, _
   ByVal angleRipple As Integer, _
   ByVal angleOffset As Integer, _
   ByVal foreGroundColor As RasterColor, _
   ByVal backGroundColor As RasterColor, _
   ByVal type As HalfTonePatternCommandType _
)
Visual Basic (Usage)Copy Code
Dim contrast As Integer
Dim ripple As Integer
Dim angleContrast As Integer
Dim angleRipple As Integer
Dim angleOffset As Integer
Dim foreGroundColor As RasterColor
Dim backGroundColor As RasterColor
Dim type As HalfTonePatternCommandType
 
Dim instance As HalfTonePatternCommand(contrast, ripple, angleContrast, angleRipple, angleOffset, foreGroundColor, backGroundColor, type)
C# 
public HalfTonePatternCommand( 
   int contrast,
   int ripple,
   int angleContrast,
   int angleRipple,
   int angleOffset,
   RasterColor foreGroundColor,
   RasterColor backGroundColor,
   HalfTonePatternCommandType type
)
Managed Extensions for C++ 
public: HalfTonePatternCommand( 
   int contrast,
   int ripple,
   int angleContrast,
   int angleRipple,
   int angleOffset,
   RasterColor foreGroundColor,
   RasterColor backGroundColor,
   HalfTonePatternCommandType type
)
C++/CLI 
public:
HalfTonePatternCommand( 
   int contrast,
   int ripple,
   int angleContrast,
   int angleRipple,
   int angleOffset,
   RasterColor foreGroundColor,
   RasterColor backGroundColor,
   HalfTonePatternCommandType type
)

Parameters

contrast
Halftone pattern contrast. Increasing this value increases the pattern brightness, making it more visible.
ripple
Halftone pattern frequency. Internally, this value is divided by 100. For example, if ripple = 200 the actual frequency is 2. Increasing this value increases the number of dots, lines, etc. in the pattern.
angleContrast
Angular pattern contrast. Increasing this value increases brightness of the "spokes" in the image.
angleRipple
Angular pattern frequency. This value determines how many "spokes" appear in the image.
angleOffset
Angular pattern offset in hundredths of degrees (+/-). A positive value will rotate the screen clockwise, while a negative value will rotate the screen counter-clockwise.
foreGroundColor
Value that specifies the foreground color for any exposed areas.
backGroundColor
Value that specifies the background color for any exposed areas.
type
Value that indicates which halftone pattern type to use.

Example

Visual BasicCopy Code
ImageProcessing.Core.HalfTonePatternCommand.HalfTonePatternConstructor
   Public Sub HalfTonePatternConstructorExample()
      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 command As New HalfTonePatternCommand(100, 200, 12, 2, 4500, _
                                       New RasterColor(255, 0, 0), _
                                       New RasterColor(255, 255, 255), _
                                       HalfTonePatternCommandType.Line)
      command.Run(leadImage)

      RasterCodecs.Shutdown()
   End Sub
C#Copy Code
ImageProcessing.Core.HalfTonePatternCommand.HalfTonePatternConstructor 
      public void HalfTonePatternConstructorExample() 
      { 
         // 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 
         HalfTonePatternCommand command  = new HalfTonePatternCommand(100, 200, 12, 2, 4500, 
            new RasterColor(255, 0, 0), 
            new RasterColor(255, 255, 255), 
            HalfTonePatternCommandType.Line); 
         command.Run(image); 
 
         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