本文整理汇总了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();
}
}
示例2: ColorExToColor
private Color ColorExToColor(ColorEx cx)
{
return Color.FromArgb((int)cx.ToARGB());
}
示例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);
}
示例4: ConvertColor
public override uint ConvertColor(ColorEx color)
{
return color.ToARGB();
}
示例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);
}
示例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);
}
示例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);
}