Sharpex2D.Rendering.Color.FromArgb C# (CSharp) Méthode

FromArgb() public static méthode

Generates a Color from the given Values.
public static FromArgb ( int a, int r, int g, int b ) : Color
a int The AlphaValue.
r int The RedValue.
g int The GreenValue.
b int The BlueValue.
Résultat Color
        public static Color FromArgb(int a, int r, int g, int b)
        {
            return new Color(r, g, b, a);
        }

Usage Example

Exemple #1
0
        private static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            RenderTarget renderTarget = RenderTarget.Create();

            renderTarget.Window.Icon             = Icon.ExtractAssociatedIcon(Application.ExecutablePath);
            renderTarget.Window.Title            = "Flying Bird";
            renderTarget.Window.CursorVisibility = true;
            renderTarget.Window.SurfaceLayout    = new SurfaceLayout(true, false, true);

            SGL.Initialize();

            SGL.Components.Get <GraphicsDevice>().ClearColor = Color.FromArgb(255, 128, 197, 205);
        }