public RasterColor(
int red,
int green,
int blue
)
red
The red component value for the new Color structure. Valid values are MinimumComponent through MaximumComponent.
green
The green component value for the new Color structure. Valid values are MinimumComponent through MaximumComponent.
blue
The blue component value for the new Color structure. Valid values are MinimumComponent through MaximumComponent.
The alpha value will be set to MaximumComponent.
using Leadtools;
public void RasterColorExample()
{
Random rand = new Random();
byte a = (byte)rand.Next(256);
byte r = (byte)rand.Next(256);
byte g = (byte)rand.Next(256);
byte b = (byte)rand.Next(256);
RasterColor clr = new RasterColor(a, r, g, b);
// Check
Assert.IsTrue(clr.A == a);
Assert.IsTrue(clr.R == r);
Assert.IsTrue(clr.G == g);
Assert.IsTrue(clr.B == b);
}
import java.io.File;
import java.io.IOException;
import java.util.Random;
import org.junit.*;
import org.junit.Test;
import org.junit.runner.JUnitCore;
import org.junit.runner.Result;
import org.junit.runner.notification.Failure;
import static org.junit.Assert.*;
import leadtools.*;
public void rasterColorRasterColorExample() {
Random rand = new Random();
byte a = (byte) rand.nextInt(256);
byte r = (byte) rand.nextInt(256);
byte g = (byte) rand.nextInt(256);
byte b = (byte) rand.nextInt(256);
RasterColor clr = new RasterColor(a, r, g, b);
// Check
assertTrue(clr.a() == a);
assertTrue(clr.r() == r);
assertTrue(clr.g() == g);
assertTrue(clr.b() == b);
}
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