LEADTOOLS Image Processing (Leadtools.ImageProcessing.Core assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.29
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 Leadtools.ImageProcessing.Core.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 New 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
)
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

Run the Leadtools.ImageProcessing.Core.HalfTonePatternCommand on an image.

Visual BasicCopy Code
Public Sub HalfTonePatternConstructorExample()
   Dim codecs As New RasterCodecs()
   codecs.ThrowExceptionsOnInvalidImages = True

   Dim leadImage As RasterImage = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "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)

End Sub

Public NotInheritable Class LEAD_VARS
   Public Const ImagesDir As String = "C:\Users\Public\Documents\LEADTOOLS Images"
End Class
C#Copy Code
public void HalfTonePatternConstructorExample()
   {
      // Load an image
      RasterCodecs codecs = new RasterCodecs();
      codecs.ThrowExceptionsOnInvalidImages = true;

      RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "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);

   }

static class LEAD_VARS
{
   public const string ImagesDir = @"C:\Users\Public\Documents\LEADTOOLS Images";
}
SilverlightCSharpCopy Code
SilverlightVBCopy Code

Requirements

Target Platforms: Silverlight 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7, MAC OS/X (Intel Only)

See Also