LEADTOOLS Image Processing (Leadtools.ImageProcessing.Core assembly)

HalfTonePatternCommand Constructor(Int32,Int32,Int32,Int32,Int32,RasterColor,RasterColor,HalfTonePatternCommandType)

Show in webframe
Example 







Halftone pattern contrast. Increasing this value increases the pattern brightness, making it more visible.
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.
Angular pattern contrast. Increasing this value increases brightness of the "spokes" in the image.
Angular pattern frequency. This value determines how many "spokes" appear in the image.
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.
Value that specifies the foreground color for any exposed areas.
Value that specifies the background color for any exposed areas.
Value that indicates which halftone pattern type to use.
Initializes a new HalfTonePatternCommand with explicit parameters.
Syntax
public HalfTonePatternCommand( 
   int contrast,
   int ripple,
   int angleContrast,
   int angleRipple,
   int angleOffset,
   RasterColor foreGroundColor,
   RasterColor backGroundColor,
   HalfTonePatternCommandType type
)
'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 _
)
'Usage
 
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)
public HalfTonePatternCommand( 
   int contrast,
   int ripple,
   int angleContrast,
   int angleRipple,
   int angleOffset,
   RasterColor foreGroundColor,
   RasterColor backGroundColor,
   HalfTonePatternCommandType type
)

            

            
function HalfTonePatternCommand( 
   contrast ,
   ripple ,
   angleContrast ,
   angleRipple ,
   angleOffset ,
   foreGroundColor ,
   backGroundColor ,
   type 
)
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
Copy Code  
Imports Leadtools
Imports Leadtools.Codecs
Imports Leadtools.ImageProcessing.Core

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
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, "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";
}
function HalfTonePatternConstructorExample()
{
   var codecs = new Leadtools.Codecs.RasterCodecs();
   codecs.throwExceptionsOnInvalidImages = true;

   // Load the image
   var srcFileName = "Assets\\Image1.cmp";
   return Tools.AppInstallFolder().getFileAsync(srcFileName).then(function (loadFile) {
      return codecs.loadAsync(Leadtools.LeadStreamFactory.create(loadFile));
   }).then(function (image) {
      // Prepare the command
      with (Leadtools.ImageProcessing.Core) {
         var command  = new HalfTonePatternCommand(100, 200, 12, 2, 4500,
            Leadtools.RasterColorHelper.create(255, 0, 0),
            Leadtools.RasterColorHelper.create(255, 255, 255),
            HalfTonePatternCommandType.line);
         command.run(image);
      }
   });
}
using Leadtools;
using Leadtools.Codecs;
using Leadtools.ImageProcessing.Core;

      
public async Task HalfTonePatternConstructorExample()
{
   // Load an image
   RasterCodecs codecs = new RasterCodecs();
   codecs.ThrowExceptionsOnInvalidImages = true;
   // Load the image
   string srcFileName = @"Assets\Image1.cmp";
   StorageFile loadFile = await Tools.AppInstallFolder.GetFileAsync(srcFileName);
   RasterImage image = await codecs.LoadAsync(LeadStreamFactory.Create(loadFile));

   // Prepare the command
   HalfTonePatternCommand command  = new HalfTonePatternCommand(100, 200, 12, 2, 4500,
      RasterColorHelper.Create(255, 0, 0),
      RasterColorHelper.Create(255, 255, 255),
      HalfTonePatternCommandType.Line);
   command.Run(image);

}
Requirements

Target Platforms

See Also

Reference

HalfTonePatternCommand Class
HalfTonePatternCommand Members
Overload List

 

 


Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.