当前位置: 首页>>代码示例>>C#>>正文


C# Color4.ToBgra方法代码示例

本文整理汇总了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();
 }
开发者ID:BigGranu,项目名称:MediaPortal-2,代码行数:9,代码来源:PositionColoredTextured.cs

示例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;
    }
开发者ID:BigGranu,项目名称:MediaPortal-2,代码行数:40,代码来源:PositionColoredTextured.cs

示例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
        }
开发者ID:joewan,项目名称:xenko,代码行数:19,代码来源:GraphicsDevice.Direct3D.cs

示例4: FromColor4

 public void FromColor4(ref Color4 color)
 {
     color.ToBgra(out R, out G, out B, out A);
 }
开发者ID:rthome,项目名称:softrender,代码行数:4,代码来源:Color.cs

示例5: Color

 public Color(Color4 color)
 {
     color.ToBgra(out R, out G, out B, out A);
 }
开发者ID:rthome,项目名称:softrender,代码行数:4,代码来源:Color.cs


注:本文中的Color4.ToBgra方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。