public HalfTonePatternCommand(
int contrast,
int ripple,
int angleContrast,
int angleRipple,
int angleOffset,
RasterColor foreGroundColor,
RasterColor backGroundColor,
HalfTonePatternCommandType type
)
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 _
)
public:
HalfTonePatternCommand(
int contrast,
int ripple,
int angleContrast,
int angleRipple,
int angleOffset,
RasterColor foreGroundColor,
RasterColor backGroundColor,
HalfTonePatternCommandType type
)
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.
Run the HalfTonePatternCommand on an image.
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:\LEADTOOLS21\Resources\Images";
}
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, "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:\LEADTOOLS21\Resources\Images"
End Class
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.