RasterColor Structure (original) (raw)
Summary
Describes a color consisting of relative intensities of alpha, red, green, and blue.
Syntax
C#
Objective-C
C++/CLI
Java
Python
[SerializableAttribute()]
public struct RasterColor
@interface LTRasterColor : NSObject <NSCopying, NSCoding>
public final class RasterColor
[SerializableAttribute()]
public value class RasterColor : public System.ValueType
Example
Converts a .NET color to a RasterColor and back.
using Leadtools;
public void Example()
{
const int A = 128, R = 24, G = 87, B = 134;
// Create a RasterColor
RasterColor clr = new RasterColor(A, R, G, B);
// Make sure the color is correct
Assert.IsTrue(clr.A == A);
Assert.IsTrue(clr.R == R);
Assert.IsTrue(clr.G == G);
Assert.IsTrue(clr.B == B);
// Show its value
Console.WriteLine(clr);
// Show the A, R, G and B values
Console.WriteLine("Alpha value: " + clr.A);
Console.WriteLine("Red value: " + clr.R);
Console.WriteLine("Green value: " + clr.G);
Console.WriteLine("Blue value: " + clr.B);
}
Leadtools Assembly