Leadtools.ImageProcessing.Core Namespace > HalfTonePatternCommand Class > HalfTonePatternCommand Constructor : HalfTonePatternCommand Constructor(Int32,Int32,Int32,Int32,Int32,RasterColor,RasterColor,HalfTonePatternCommandType) |
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 )
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
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); } }); }
[TestMethod] 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); }
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2