本文整理汇总了C#中Color.get_G方法的典型用法代码示例。如果您正苦于以下问题:C# Color.get_G方法的具体用法?C# Color.get_G怎么用?C# Color.get_G使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Color
的用法示例。
在下文中一共展示了Color.get_G方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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_0
// Token: 0x06002561 RID: 9569
// RVA: 0x000E0B34 File Offset: 0x000DED34
internal static void smethod_0(Color color_3, ref Color color_4, ref Color color_5)
{
Color color_6;
color_6..ctor(color_3.get_R(), color_3.get_G(), color_3.get_B(), 180);
color_4 = Class610.smethod_1(color_6, 0.5f);
color_5 = Class610.smethod_2(color_6, 0.1f);
}
示例3: 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);
}
示例4: smethod_7
// Token: 0x060025F8 RID: 9720
// RVA: 0x0001D78F File Offset: 0x0001B98F
internal static Color smethod_7(Color color_0, byte byte_0)
{
return new Color(color_0.get_R(), color_0.get_G(), color_0.get_B(), byte_0);
}
示例5: smethod_5
// Token: 0x060025F6 RID: 9718
// RVA: 0x0001D75F File Offset: 0x0001B95F
internal static string smethod_5(Color color_0)
{
return string.Format("{0:X2}{1:X2}{2:X2}", color_0.get_R(), color_0.get_G(), color_0.get_B());
}
示例6: 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));
}
示例7: 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());
}
示例8: 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());
}
示例9: 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;
示例10: vmethod_0
// Token: 0x060033C2 RID: 13250
// RVA: 0x00162818 File Offset: 0x00160A18
internal override void vmethod_0(Color color_0)
{
if (this.class531_2.vmethod_6() != null && this.class531_2.vmethod_6().enum112_0 == Enum112.flag_1 && (int)(color_0.get_R() + color_0.get_G() + color_0.get_B()) > 600)
{
this.class531_2.color_0 = Color.get_Black();
this.list_0.Remove(this.class531_2);
}
base.vmethod_0(color_0);
}
示例11: smethod_5
//.........这里部分代码省略.........
num8 += num7;
}
}
else
{
using (Bitmap bitmap = new Bitmap(num, num2, PixelFormat.Format32bppArgb))
{
using (Graphics graphics2 = Graphics.FromImage(bitmap))
{
graphics2.TextRenderingHint = graphics.TextRenderingHint;
graphics2.SmoothingMode = SmoothingMode.HighQuality;
graphics2.InterpolationMode = InterpolationMode.HighQualityBicubic;
if (color_1.get_A() > 0)
{
if (vector4_0 != Vector4.get_Zero())
{
Class747.smethod_6(graphics2, new Rectangle(0, 0, num, num2), new SolidBrush(Class778.smethod_6(color_1)), vector4_0);
if (int_0 > 0)
{
Class747.smethod_7(graphics2, new Rectangle(0, 0, num - (int)Math.Ceiling((double)((float)int_0 / 2f)), num2 - (int)Math.Ceiling((double)((float)int_0 / 2f))), new Pen(Class778.smethod_6(color_2), (float)int_0), vector4_0);
}
}
else
{
graphics2.Clear(Class778.smethod_6(color_1));
if (int_0 > 0)
{
graphics2.DrawRectangle(new Pen(Class778.smethod_6(color_2), (float)int_0), new Rectangle(int_0 / 2, int_0 / 2, num - int_0, num2 - int_0));
}
}
}
else
{
graphics2.Clear(Color.FromArgb(1, (int)color_0.get_R(), (int)color_0.get_G(), (int)color_0.get_B()));
}
using (Brush brush = new SolidBrush(Class778.smethod_6(color_0)))
{
if (vector2_0 != Vector2.get_Zero())
{
vector2_0.X -= vector2_2.X * 2f;
vector2_0.Y -= vector2_2.Y * 2f;
switch (enum73_0)
{
case Enum73.const_1:
graphics2.DrawString(string_0, font, Class747.brush_0, new RectangleF(vector2_2.X - num3, num3 + vector2_2.Y, vector2_0.X, vector2_0.Y), stringFormat);
graphics2.DrawString(string_0, font, Class747.brush_0, new RectangleF(vector2_2.X + num3, num3 + vector2_2.Y, vector2_0.X, vector2_0.Y), stringFormat);
break;
case Enum73.const_2:
{
Brush brush2 = Class747.brush_1;
if (color_1.get_A() == 0 && int_0 == 1 && color_2.get_A() > 0)
{
brush2 = new SolidBrush(Class778.smethod_6(color_2));
}
graphics2.DrawString(string_0, font, brush2, new RectangleF(vector2_2.X + num3, vector2_2.Y + num3, vector2_0.X, vector2_0.Y), stringFormat);
graphics2.DrawString(string_0, font, brush2, new RectangleF(vector2_2.X + num3, vector2_2.Y - num3, vector2_0.X, vector2_0.Y), stringFormat);
graphics2.DrawString(string_0, font, brush2, new RectangleF(vector2_2.X - num3, vector2_2.Y + num3, vector2_0.X, vector2_0.Y), stringFormat);
graphics2.DrawString(string_0, font, brush2, new RectangleF(vector2_2.X - num3, vector2_2.Y - num3, vector2_0.X, vector2_0.Y), stringFormat);
break;
}
}
graphics2.DrawString(string_0, font, brush, new RectangleF(vector2_2.X, vector2_2.Y, vector2_0.X, vector2_0.Y), stringFormat);
}
else
{
switch (enum73_0)
示例12: 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());
}