Axiom.Core.ColorEx.ToARGB C# (CSharp) Method

ToARGB() public method

Converts this color value to packed ARBG format.
public ToARGB ( ) : int
return int
		public int ToARGB()
		{
			int result = 0;

			result += ( (int)( a * 255.0f ) ) << 24;
			result += ( (int)( r * 255.0f ) ) << 16;
			result += ( (int)( g * 255.0f ) ) << 8;
			result += ( (int)( b * 255.0f ) );

			return result;
		}

Usage Example

Beispiel #1
0
	    public static int ConvertColorValue( ColorEx color, VertexElementType colorVertexElementType )
	    {
            switch (colorVertexElementType)
            {
#if AXIOM_PLATFORM == AXIOM_PLATFORM_WIN32
                default:
#endif
                case VertexElementType.Color_ARGB:
                    return color.ToARGB();
#if AXIOM_PLATFORM != OGRE_PLATFORM_WIN32
        default:
#endif
                case VertexElementType.Color_ABGR:
                    return color.ToABGR();
            }
	    }
All Usage Examples Of Axiom.Core.ColorEx::ToARGB