Leadtools Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
B Property
See Also  Example
Leadtools Namespace > RasterColor16 Structure : B Property



Gets or sets the blue component of this RasterColor16 structure.

Syntax

Visual Basic (Declaration) 
<CLSCompliantAttribute(False)>
Public Property B As UShort
Visual Basic (Usage)Copy Code
Dim instance As RasterColor16
Dim value As UShort
 
instance.B = value
 
value = instance.B
C# 
[CLSCompliantAttribute(false)]
public ushort B {get; set;}
C++/CLI 
[CLSCompliantAttribute(false)]
public:
property ushort B {
   ushort get();
   void set (ushort value);
}

Return Value

The blue component of this RasterColor16 structure.

Example

Visual BasicCopy Code
Public Sub RasterColor16ComponentsExample()
 ' This C# example shows how to create a normal grayscale LUT.
 Dim lut As RasterColor16() = New RasterColor16(1023) {}
 Dim color As RasterColor16 = New RasterColor16(0, 0, 0)
 For i As UShort = 0 To 1023
    Dim gray As Integer = CInt(i * 65535 / 1023)
    color.R = CUShort(gray)
    color.G = CUShort(gray)
    color.B = CUShort(gray)
    lut(i) = color
 Next i
      End Sub
C#Copy Code
public void RasterColor16ComponentsExample() 

   // This C# example shows how to create a normal grayscale LUT. 
   RasterColor16[] lut = new RasterColor16[1024]; 
   RasterColor16 color = new RasterColor16(0, 0, 0); 
   for(ushort i = 0; i < 1024; i++) 
   { 
       int gray = i * 65535 / 1023; 
       color.R = (ushort)gray; 
       color.G = (ushort)gray; 
       color.B = (ushort)gray; 
       lut[i] = color; 
   } 
}

Requirements

Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family

See Also