GxColor.CreateARGB

Fore Syntax

CreateARGB(A: Integer; R: Integer; G: Integer; B: Integer);

Fore.NET Syntax

CreateARGB(A: Integer; R: Integer; G: Integer; B: Integer);

Parameters

A. Degree of color transparency.

R. Red color component.

G. Blue color component.

B. Green color component.

Description

The CreateARGB constructor creates a new color in accordance with the specified values of transparency degree and red, green and blue components.

Fore Example

Function GetColorARGB(A: Integer; R: Integer; G: Integer; B: Integer): IGxColor;
Var
    OutColor: IGxColor;
Begin
    If (A >= 0And (A <= 255And
        (R >= 0And (R <= 255And
        (G >= 0And (G <= 255And
        (B >= 0And (B <= 255Then
        OutColor := New GxColor.CreateARGB(A, R, G, B);
        Return OutColor;
    Else
        Return Null;
    End If;
End Function GetColorARGB;

This function returns the color in accordance with the specified values of transparency degree and red, green and blue components.

Fore.NET Example

Imports Prognoz.Platform.Interop.Drawing;

Function GetColorARGB(A: integer; R: integer; G: integer; B: integer): GxColor;
Var
    OutColor: GxColor;
Begin
    If (A >= 0And (A <= 255And
        (R >= 0And (R <= 255And
        (G >= 0And (G <= 255And
        (B >= 0And (B <= 255Then
        OutColor := New GxColorClass_2();
        OutColor.CreateARGB(A, R, G, B);
        Return OutColor;
    Else
        Return Null
    End If;
End Function;

This function returns the color in accordance with the specified values of transparency degree and red, green and blue components.

See also:

GxColor