←Select platform

HalfTonePatternCommand Constructor(int,int,int,int,int,RasterColor,RasterColor,HalfTonePatternCommandType)

Summary

Initializes a new HalfTonePatternCommand with explicit parameters.

Syntax

C#
VB
WinRT C#
C++
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 Leadtools.RasterColor, _ 
   ByVal backGroundColor As Leadtools.RasterColor, _ 
   ByVal type As Leadtools.Imageprocessing.Core.HalfTonePatternCommandType _ 
) 
function HalfTonePatternCommand(  
   contrast , 
   ripple , 
   angleContrast , 
   angleRipple , 
   angleOffset , 
   foreGroundColor , 
   backGroundColor , 
   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 HalfTonePatternCommand on an image.

C#
VB
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.ImageProcessing.Core; 
 
public void HalfTonePatternConstructorExample() 
{ 
   // Load an image 
   RasterCodecs codecs = new RasterCodecs(); 
   codecs.ThrowExceptionsOnInvalidImages = true; 
 
   RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "sample1.cmp")); 
 
   // 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"; 
} 
Imports Leadtools 
Imports Leadtools.Codecs 
Imports Leadtools.ImageProcessing.Core 
      Leadtools.Examples.Support.SetLicense() 
 
Public Sub HalfTonePatternConstructorExample() 
   Dim codecs As New RasterCodecs() 
   codecs.ThrowExceptionsOnInvalidImages = True 
 
   Dim leadImage As RasterImage = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "sample1.cmp")) 
 
   ' 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 

Requirements

Target Platforms

Help Version 19.0.2017.10.18
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.ImageProcessing.Core Assembly