LEADTOOLS (Leadtools assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.29
RasterColor16 Constructor
See Also  Example
Leadtools Namespace > RasterColor16 Structure : RasterColor16 Constructor



red
The red component value for the new structure. Valid values are MinimumComponent through MaximumComponent.
green
The green component value for the new structure. Valid values are MinimumComponent through MaximumComponent.
blue
The blue component value for the new structure. Valid values are MinimumComponent through MaximumComponent.
Initializes a new RasterColor16 structure with specific values for red, green and blue. Supported in Silverlight, Windows Phone 7

Syntax

Visual Basic (Declaration) 
Public Function New( _
   ByVal red As Integer, _
   ByVal green As Integer, _
   ByVal blue As Integer _
)
Visual Basic (Usage)Copy Code
Dim red As Integer
Dim green As Integer
Dim blue As Integer
 
Dim instance As New RasterColor16(red, green, blue)
C# 
public RasterColor16( 
   int red,
   int green,
   int blue
)
C++/CLI 
public:
RasterColor16( 
   int red,
   int green,
   int blue
)

Parameters

red
The red component value for the new structure. Valid values are MinimumComponent through MaximumComponent.
green
The green component value for the new structure. Valid values are MinimumComponent through MaximumComponent.
blue
The blue component value for the new structure. Valid values are MinimumComponent through MaximumComponent.

Example

Visual BasicCopy Code
Public Sub RasterColor16Example()
   ' create a white color
   Dim white16 As RasterColor16 = New RasterColor16(RasterColor16.MaximumComponent, RasterColor16.MaximumComponent, RasterColor16.MaximumComponent)

   ' create a black color
   Dim black16 As RasterColor16 = New RasterColor16(RasterColor16.MinimumComponent, RasterColor16.MinimumComponent, RasterColor16.MinimumComponent)
End Sub
C#Copy Code
public void RasterColor16Example()
{
   // create a white color
   RasterColor16 white16 = new RasterColor16(RasterColor16.MaximumComponent, RasterColor16.MaximumComponent, RasterColor16.MaximumComponent);

   // create a black color
   RasterColor16 black16 = new RasterColor16(RasterColor16.MinimumComponent, RasterColor16.MinimumComponent, RasterColor16.MinimumComponent);
}
SilverlightCSharpCopy Code
[TestMethod]
public void RasterColor16Example()
{
   // create a white color
   RasterColor16 white16 = new RasterColor16(RasterColor16.MaximumComponent, RasterColor16.MaximumComponent, RasterColor16.MaximumComponent);
   // create a black color
   RasterColor16 black16 = new RasterColor16(RasterColor16.MinimumComponent, RasterColor16.MinimumComponent, RasterColor16.MinimumComponent);
}
SilverlightVBCopy Code
<TestMethod> _
Public Sub RasterColor16Example()
   ' create a white color
   Dim white16 As RasterColor16 = New RasterColor16(RasterColor16.MaximumComponent, RasterColor16.MaximumComponent, RasterColor16.MaximumComponent)
   ' create a black color
   Dim black16 As RasterColor16 = New RasterColor16(RasterColor16.MinimumComponent, RasterColor16.MinimumComponent, RasterColor16.MinimumComponent)
End Sub

Remarks

This structure has no alpha component.

Requirements

Target Platforms: Silverlight, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7, MAC OS/X (Intel Only), Windows Phone 7

See Also