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


C# ColorEx.ToARGB方法代码示例

本文整理汇总了C#中Axiom.Core.ColorEx.ToARGB方法的典型用法代码示例。如果您正苦于以下问题:C# ColorEx.ToARGB方法的具体用法?C# ColorEx.ToARGB怎么用?C# ColorEx.ToARGB使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Axiom.Core.ColorEx的用法示例。


在下文中一共展示了ColorEx.ToARGB方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ConvertColorValue

	    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();
            }
	    }
开发者ID:WolfgangSt,项目名称:axiom,代码行数:16,代码来源:VertexElement.cs

示例2: ColorExToColor

 private Color ColorExToColor(ColorEx cx)
 {
     return Color.FromArgb((int)cx.ToARGB());
 }
开发者ID:ufosky-server,项目名称:MultiversePlatform,代码行数:4,代码来源:AddFogDialog.cs

示例3: ClearFrameBuffer

        public override void ClearFrameBuffer( FrameBufferType buffers, ColorEx color, Real depth, ushort stencil )
        {
            ClearFlags flags = 0;

            if ( ( buffers & FrameBufferType.Color ) > 0 )
            {
                flags |= ClearFlags.Target;
            }
            if ( ( buffers & FrameBufferType.Depth ) > 0 )
            {
                flags |= ClearFlags.ZBuffer;
            }
            // Only try to clear the stencil buffer if supported
            if ( ( buffers & FrameBufferType.Stencil ) > 0
                && Capabilities.HasCapability( Graphics.Capabilities.StencilBuffer ) )
            {
                flags |= ClearFlags.Stencil;
            }

            // clear the device using the specified params
            ActiveD3D9Device.Clear(flags, color.ToARGB(), depth, stencil);
        }
开发者ID:mono-soc-2011,项目名称:axiom,代码行数:22,代码来源:D3DRenderSystem.cs

示例4: ConvertColor

 public override uint ConvertColor(ColorEx color)
 {
     return color.ToARGB();
 }
开发者ID:ufosky-server,项目名称:MultiversePlatform,代码行数:4,代码来源:D3D9RenderSystem.cs

示例5: ClearFrameBuffer

        /// <summary>
        ///		
        /// </summary>
        /// <param name="buffers"></param>
        /// <param name="color"></param>
        /// <param name="depth"></param>
        /// <param name="stencil"></param>
        public override void ClearFrameBuffer(FrameBuffer buffers, ColorEx color, float depth, int stencil)
        {
            D3D.ClearFlags flags = 0;

            if((buffers & FrameBuffer.Color) > 0) {
                flags |= D3D.ClearFlags.Target;
            }
            if((buffers & FrameBuffer.Depth) > 0) {
                flags |= D3D.ClearFlags.ZBuffer;
            }
            // Only try to clear the stencil buffer if supported
            if((buffers & FrameBuffer.Stencil) > 0
                && caps.CheckCap(Capabilities.StencilBuffer)) {

                flags |= D3D.ClearFlags.Stencil;
            }

            // clear the device using the specified params
            device.Clear(flags, (int)color.ToARGB(), depth, stencil);
        }
开发者ID:ufosky-server,项目名称:MultiversePlatform,代码行数:27,代码来源:D3D9RenderSystem.cs

示例6: BeginProfileEvent

 /// <summary>
 /// This is used to insert events into the PIX trace for DirectX debugging and profiling.
 /// </summary>
 /// <param name="color">Color to display the event</param>
 /// <param name="message">Message to display</param>
 /// <returns>nesting level of events</returns>
 public override int BeginProfileEvent(ColorEx color, string message)
 {
     return D3DPERF_BeginEvent(color.ToARGB(), message);
 }
开发者ID:ufosky-server,项目名称:MultiversePlatform,代码行数:10,代码来源:D3D9RenderSystem.cs

示例7: SetProfileMarker

 /// <summary>
 /// Set an instantaneous marker in the profiling event log.  (PIX for DirectX)
 /// </summary>
 /// <param name="color"></param>
 /// <param name="message"></param>
 public override void SetProfileMarker(ColorEx color, string message)
 {
     D3DPERF_SetMarker(color.ToARGB(), message);
 }
开发者ID:ufosky-server,项目名称:MultiversePlatform,代码行数:9,代码来源:D3D9RenderSystem.cs


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