mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-24 01:25:31 +00:00
Initial check-in.
This commit is contained in:
parent
3bdcc9dbcf
commit
9f1593aada
21
Source/Examples/Utilities.cs
Normal file
21
Source/Examples/Utilities.cs
Normal file
|
@ -0,0 +1,21 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Drawing;
|
||||
|
||||
namespace Examples
|
||||
{
|
||||
public static class Utilities
|
||||
{
|
||||
/// <summary>
|
||||
/// Converts a System.Drawing.Color to a System.Int32.
|
||||
/// </summary>
|
||||
/// <param name="c">The System.Drawing.Color to convert.</param>
|
||||
/// <returns>A System.Int32 containing the R, G, B, A values of the
|
||||
/// given System.Drawing.Color in the Rbga32 format.</returns>
|
||||
public static int ColorToRgba32(Color c)
|
||||
{
|
||||
return (int)((c.A << 24) | (c.B << 16) | (c.G << 8) | c.R);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue