本文整理汇总了C#中Color4.ToBgra方法的典型用法代码示例。如果您正苦于以下问题:C# Color4.ToBgra方法的具体用法?C# Color4.ToBgra怎么用?C# Color4.ToBgra使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Color4
的用法示例。
在下文中一共展示了Color4.ToBgra方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PositionColoredTextured
public PositionColoredTextured(Vector3 position, float u1, float v1, Color4 color)
{
X = position.X;
Y = position.Y;
Z = position.Z;
Tu1 = u1;
Tv1 = v1;
Color = color.ToBgra();
}
示例2: CreateQuad_Fan
public static PositionColoredTextured[] CreateQuad_Fan(float left, float top, float right, float bottom,
float uLeft, float vTop, float uRight, float vBottom,
float zPos, Color4 color)
{
PositionColoredTextured[] verts = new PositionColoredTextured[4];
// Upper left
verts[0].X = left;
verts[0].Y = top;
verts[0].Color = color.ToBgra();
verts[0].Tu1 = uLeft;
verts[0].Tv1 = vTop;
verts[0].Z = zPos;
// Bottom left
verts[1].X = left;
verts[1].Y = bottom;
verts[1].Color = color.ToBgra();
verts[1].Tu1 = uLeft;
verts[1].Tv1 = vBottom;
verts[1].Z = zPos;
// Bottom right
verts[2].X = right;
verts[2].Y = bottom;
verts[2].Color = color.ToBgra();
verts[2].Tu1 = uRight;
verts[2].Tv1 = vBottom;
verts[2].Z = zPos;
// Upper right
verts[3].X = right;
verts[3].Y = top;
verts[3].Color = color.ToBgra();
verts[3].Tu1 = uRight;
verts[3].Tv1 = vTop;
verts[3].Z = zPos;
return verts;
}
示例3: BeginProfile
/// <summary>
/// Begins profiling.
/// </summary>
/// <param name="profileColor">Color of the profile.</param>
/// <param name="name">The name.</param>
public unsafe void BeginProfile(Color4 profileColor, string name)
{
#if SILICONSTUDIO_PLATFORM_WINDOWS_DESKTOP
if (nativeDeviceProfiler != null)
{
nativeDeviceProfiler.BeginEvent(name);
}
else
{
var rawColor = profileColor.ToBgra();
SharpDX.Direct3D.PixHelper.BeginEvent(*(RawColorBGRA*)(&rawColor), name);
}
#endif
}
示例4: FromColor4
public void FromColor4(ref Color4 color)
{
color.ToBgra(out R, out G, out B, out A);
}
示例5: Color
public Color(Color4 color)
{
color.ToBgra(out R, out G, out B, out A);
}