本文整理汇总了C#中Axiom.Core.ColorEx.ToABGR方法的典型用法代码示例。如果您正苦于以下问题:C# ColorEx.ToABGR方法的具体用法?C# ColorEx.ToABGR怎么用?C# ColorEx.ToABGR使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Axiom.Core.ColorEx
的用法示例。
在下文中一共展示了ColorEx.ToABGR方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddPlantTypeDialog
public AddPlantTypeDialog(string title, List<AssetDesc> list, WorldEditor app)
{
InitializeComponent();
ColorEx color = new ColorEx();
color = app.Config.PlantColorDefault;
colorDialog1.Color = ColorExToColor(color);
colorSelectButton.BackColor = colorDialog1.Color;
int colorabgr = (int)color.ToABGR();
int[] colorsabgr = new int[1];
colorabgr &= 0x00ffffff;
colorsabgr[0] = colorabgr;
colorDialog1.CustomColors = colorsabgr;
foreach (AssetDesc asset in list)
{
imageNameComboBox.Items.Add(asset.Name);
}
imageNameComboBox.SelectedIndex = 0;
}
示例2: 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();
}
}
示例3: ConvertColor
/// <summary>
/// Converts the Axiom.Core.ColorEx value to a int. Each API may need the
/// bytes of the packed color data in different orders. i.e. OpenGL - ABGR, D3D - ARGB
/// </summary>
/// <param name="color"></param>
/// <returns></returns>
public override int ConvertColor(ColorEx color)
{
return color.ToABGR();
}