本文整理汇总了C#中Color.get_A方法的典型用法代码示例。如果您正苦于以下问题:C# Color.get_A方法的具体用法?C# Color.get_A怎么用?C# Color.get_A使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Color
的用法示例。
在下文中一共展示了Color.get_A方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: smethod_13
// Token: 0x06002E99 RID: 11929
// RVA: 0x0012EF98 File Offset: 0x0012D198
public static Color smethod_13(Color color_0, Color color_1, int int_0, int int_1, int int_2, Enum70 enum70_0)
{
if (color_0 == color_1)
{
return color_0;
}
int num = int_0 - int_1;
int num2 = int_2 - int_1;
if (num2 != 0 && num != 0)
{
return new Color((byte)Math.Max(0.0, Math.Min(255.0, Class778.smethod_17(enum70_0, (double)num, (double)color_0.get_R(), (double)(color_1.get_R() - color_0.get_R()), (double)num2))), (byte)Math.Max(0.0, Math.Min(255.0, Class778.smethod_17(enum70_0, (double)num, (double)color_0.get_G(), (double)(color_1.get_G() - color_0.get_G()), (double)num2))), (byte)Math.Max(0.0, Math.Min(255.0, Class778.smethod_17(enum70_0, (double)num, (double)color_0.get_B(), (double)(color_1.get_B() - color_0.get_B()), (double)num2))), (byte)Math.Max(0.0, Math.Min(255.0, Class778.smethod_17(enum70_0, (double)num, (double)color_0.get_A(), (double)(color_1.get_A() - color_0.get_A()), (double)num2))));
}
return color_0;
}
示例2: smethod_4
// Token: 0x06002CF8 RID: 11512
// RVA: 0x0012396C File Offset: 0x00121B6C
internal static void smethod_4(Color color_0)
{
if (BaseGLControl.nullable_0 == color_0)
{
return;
}
Gl.glColor4ub(color_0.get_R(), color_0.get_G(), color_0.get_B(), color_0.get_A());
BaseGLControl.nullable_0 = new Color?(color_0);
}
示例3: smethod_3
// Token: 0x060025F4 RID: 9716
// RVA: 0x000E3A54 File Offset: 0x000E1C54
internal static Color smethod_3(Color color_0, Color color_1, float float_0)
{
return new Color((byte)Class778.smethod_0((float)color_0.get_R(), (float)color_1.get_R(), float_0), (byte)Class778.smethod_0((float)color_0.get_G(), (float)color_1.get_G(), float_0), (byte)Class778.smethod_0((float)color_0.get_B(), (float)color_1.get_B(), float_0), (byte)Class778.smethod_0((float)color_0.get_A(), (float)color_1.get_A(), float_0));
}
示例4: smethod_2
// Token: 0x060025F3 RID: 9715
// RVA: 0x000E39E8 File Offset: 0x000E1BE8
internal static Color smethod_2(Color color_0, float float_0)
{
return new Color((byte)Math.Min(255f, (float)color_0.get_R() / (1f + float_0)), (byte)Math.Min(255f, (float)color_0.get_G() / (1f + float_0)), (byte)Math.Min(255f, (float)color_0.get_B() / (1f + float_0)), color_0.get_A());
}
示例5: smethod_1
// Token: 0x060025F2 RID: 9714
// RVA: 0x000E3948 File Offset: 0x000E1B48
internal static Color smethod_1(Color color_0, float float_0)
{
float_0 *= 0.5f;
return new Color((byte)Math.Min(255f, (float)color_0.get_R() * (1f + 0.5f * float_0) + 255f * float_0), (byte)Math.Min(255f, (float)color_0.get_G() * (1f + 0.5f * float_0) + 255f * float_0), (byte)Math.Min(255f, (float)color_0.get_B() * (1f + 0.5f * float_0) + 255f * float_0), color_0.get_A());
}
示例6: Draw
// Token: 0x0600250D RID: 9485
// RVA: 0x000DF4CC File Offset: 0x000DD6CC
internal void Draw(List<Class880> list_0, float float_0, Color color_0, float float_1, string string_0, bool bool_0)
{
if (Class115.bool_26)
{
if (Class115.int_0 < 2 && string_0.StartsWith("Standard"))
{
string_0 += "11";
}
if (string_0 == null)
{
this.effect_0.set_CurrentTechnique(this.effect_0.get_Techniques().get_Item(0));
}
else
{
EffectTechnique currentTechnique = this.effect_0.get_Techniques().get_Item(string_0);
this.effect_0.set_CurrentTechnique(currentTechnique);
}
this.effect_0.Begin();
EffectPass effectPass = this.effect_0.get_CurrentTechnique().get_Passes().get_Item(0);
int num;
int num2;
if (bool_0)
{
this.graphicsDevice_0.set_VertexDeclaration(this.vertexDeclaration_0);
this.graphicsDevice_0.get_Vertices().get_Item(0).SetSource(this.vertexBuffer_0, 0, this.int_0);
this.graphicsDevice_0.set_Indices(this.indexBuffer_0);
this.graphicsDevice_0.get_RenderState().set_CullMode(1);
num = this.int_4;
num2 = this.int_2;
}
else
{
this.graphicsDevice_0.set_VertexDeclaration(this.vertexDeclaration_1);
this.graphicsDevice_0.get_Vertices().get_Item(0).SetSource(this.vertexBuffer_1, 0, this.int_0);
this.graphicsDevice_0.set_Indices(this.indexBuffer_1);
this.graphicsDevice_0.get_RenderState().set_CullMode(2);
num = this.int_5;
num2 = this.int_3;
}
effectPass.Begin();
this.effectParameter_3.SetValue(float_1);
Vector4 value;
value..ctor((float)color_0.get_R() / 255f, (float)color_0.get_G() / 255f, (float)color_0.get_B() / 255f, (float)color_0.get_A() / 255f);
this.effectParameter_1.SetValue(value);
this.effectParameter_2.SetValue(float_0);
Color color = color_0;
foreach (Class880 current in list_0)
{
Matrix value2 = current.method_2() * Matrix.get_Identity() * Class297.matrix_0;
this.effectParameter_4.SetValue(value2);
Class881 class = current as Class881;
示例7: Class531
// Token: 0x0600240E RID: 9230
// RVA: 0x000D8F3C File Offset: 0x000D713C
internal Class531(Class731 class731_1, Enum115 enum115_1, Origins origins_1, Enum114 enum114_1, Vector2 vector2_9, float float_7, bool bool_15, Color color_2, object object_1)
: base(bool_15)
{
this.class731_0 = class731_1;
this.origins_0 = origins_1;
this.vmethod_8();
this.vmethod_9();
this.enum114_0 = enum114_1;
this.vector2_1 = vector2_9;
this.vector2_0 = this.vector2_1;
this.float_2 = 1f;
this.float_0 = float_7;
this.float_4 = -this.float_0;
this.enum115_0 = enum115_1;
this.float_3 = (float)color_2.get_A() / 255f;
this.color_0 = color_2;
this.object_0 = object_1;
}
示例8: smethod_5
//.........这里部分代码省略.........
if (!Class905.smethod_16() && string_1.StartsWith("Aller"))
{
for (char c = '0'; c <= '9'; c += '\u0001')
{
string_0 = string_0.Replace(c, c + '');
}
}
Font font = Class747.smethod_11(string_1, float_2 * Class747.float_1, fontStyle);
if (Class747.float_1 != 1f)
{
vector2_0 *= Class747.float_1;
}
SizeF sizeF;
try
{
if (string_0.Length == 0)
{
string_0 = " ";
}
sizeF = ((vector2_0 != Vector2.get_Zero()) ? graphics.MeasureString(string_0, font, new SizeF(vector2_0.X, vector2_0.Y), stringFormat) : graphics.MeasureString(string_0, font));
}
catch (InvalidOperationException)
{
vector2_1 = Vector2.get_Zero();
result = null;
return result;
}
int num = (int)(sizeF.Width + 1f);
int num2 = (int)(sizeF.Height + 1f);
if (vector2_0.Y != 0f)
{
num2 = (int)vector2_0.Y;
}
if (vector2_0.X != 0f && (enum72_0 != Enum72.const_0 || color_1.get_A() > 0))
{
num = (int)vector2_0.X;
}
if (vector2_2 != Vector2.get_Zero() && vector2_0 == Vector2.get_Zero())
{
num += (int)(vector2_2.X * 2f);
num2 += (int)(vector2_2.Y * 2f);
}
vector2_1 = new Vector2((float)num, (float)num2);
float num3 = Math.Max(0.5f, Math.Min(1f, float_2 * Class747.float_1 / 14f));
if (bool_4)
{
rectangleF_0 = new RectangleF[string_0.Length];
int num4 = string_0.Length / 32 + 1;
for (int i = 0; i < num4; i++)
{
int num5 = i * 32;
int num6 = Math.Min(string_0.Length - num5, 32);
CharacterRange[] array = new CharacterRange[num6];
for (int j = 0; j < num6; j++)
{
array[j] = new CharacterRange(j + num5, 1);
}
stringFormat.SetMeasurableCharacterRanges(array);
Region[] array2 = graphics.MeasureCharacterRanges(string_0, font, new RectangleF(vector2_2.X, vector2_2.Y, (vector2_0.X == 0f) ? float.PositiveInfinity : vector2_0.X, (vector2_0.Y == 0f) ? float.PositiveInfinity : vector2_0.Y), stringFormat);
for (int k = 0; k < num6; k++)
{
Region region = array2[k];
rectangleF_0[k + num5] = region.GetBounds(graphics);
}
}
}
示例9: smethod_6
// Token: 0x06002E92 RID: 11922
// RVA: 0x0002317D File Offset: 0x0002137D
internal static Color smethod_6(Color color_0)
{
return Color.FromArgb((int)color_0.get_A(), (int)color_0.get_R(), (int)color_0.get_G(), (int)color_0.get_B());
}