private static Color smethod_2(Class678 A_0) { TextureStyle style = A_0.method_13(); switch (style) { case TextureStyle.TextureNone: case TextureStyle.TextureNil: if (!A_0.method_7().IsEmpty&& (smethod_4(A_0.method_7()) <= 0.238f)) { return(Color.White); } return(Color.Black); } if (!Class955.smethod_13(style)) { float num = (float)Class955.smethod_11(style); float num2 = smethod_4(smethod_1(A_0.method_11())) * num; float num3 = 1f - num; float num4 = smethod_4(smethod_0(A_0.method_7())) * num3; float num5 = num2 + num4; if (num5 <= 0.238f) { return(Color.White); } } return(Color.Black); }
public void method_0() { smethod_0(new object[] { this.interface69_0 != null, PrId.Parent, this.interface69_0 }); this.interface69_0 = null; smethod_0(new object[] { this.textureStyle_0 != TextureStyle.TextureNone, PrId.Texture, this.textureStyle_0 }); this.textureStyle_0 = TextureStyle.TextureNone; smethod_0(new object[] { !this.color_0.IsEmpty, PrId.ForegroundPatternColor, this.color_0 }); this.color_0 = Color.Empty; smethod_0(new object[] { !this.color_1.IsEmpty, PrId.BackgroundPatternColor, this.color_1 }); this.color_1 = Color.Empty; this.string_0 = null; this.string_1 = null; this.string_2 = null; this.string_3 = null; this.string_4 = null; this.string_5 = null; }
internal static bool smethod_13(TextureStyle A_0) { switch (A_0) { case TextureStyle.TextureDarkHorizontal: case TextureStyle.TextureDarkVertical: case TextureStyle.TextureDarkDiagonalDown: case TextureStyle.TextureDarkDiagonalUp: case TextureStyle.TextureDarkCross: case TextureStyle.TextureDarkDiagonalCross: case TextureStyle.TextureHorizontal: case TextureStyle.TextureVertical: case TextureStyle.TextureDiagonalDown: case TextureStyle.TextureDiagonalUp: case TextureStyle.TextureCross: case TextureStyle.TextureDiagonalCross: return(true); } return(false); }
internal void method_33(FormatBase A_0, int A_1) { if (A_0 is Spire.Doc.Formatting.RowFormat) { Spire.Doc.Formatting.RowFormat format = A_0 as Spire.Doc.Formatting.RowFormat; switch (A_1) { case 1: { TextureStyle textureStyle = format.TextureStyle; foreach (TableCell cell in this.Cells) { if (!cell.CellFormat.HasKey(cell.CellFormat.Shading.GetFullKey(1))) { cell.CellFormat.TextureStyle = textureStyle; } } return; } case 2: return; case 3: { Color backColor = format.BackColor; foreach (TableCell cell2 in this.Cells) { if (!cell2.CellFormat.HasKey(cell2.CellFormat.Shading.GetFullKey(3))) { cell2.CellFormat.BackColor = backColor; } } return; } } } }
private void method_3(Class678 A_0) { int num = 0; if (A_0 == null) { throw new ArgumentNullException(BookmarkStart.b("唥娧䤩", num)); } this.interface69_0 = A_0.interface69_0; smethod_0(new object[] { this.int_0 != A_0.int_0, PrId.Key, this.int_0 }); this.int_0 = A_0.int_0; smethod_0(new object[] { this.textureStyle_0 != A_0.method_13(), PrId.Texture, this.textureStyle_0 }); this.textureStyle_0 = A_0.method_13(); smethod_0(new object[] { this.color_0 != A_0.method_11(), PrId.ForegroundPatternColor, this.color_0 }); this.color_0 = A_0.method_11(); smethod_0(new object[] { this.color_1 != A_0.method_7(), PrId.BackgroundPatternColor, this.color_1 }); this.color_1 = A_0.method_7(); this.string_0 = A_0.method_15(); this.string_1 = A_0.method_17(); this.string_2 = A_0.method_19(); this.string_3 = A_0.method_21(); this.string_4 = A_0.method_23(); this.string_5 = A_0.method_25(); }
internal void method_65(TextureStyle A_0) { base.Shading.method_63(A_0); }
internal static double smethod_11(TextureStyle A_0) { int num = 0x13; switch (A_0) { case TextureStyle.TextureNone: case TextureStyle.TextureNil: return(0.0); case TextureStyle.TextureSolid: return(1.0); case TextureStyle.Texture5Percent: return(0.05); case TextureStyle.Texture10Percent: return(0.10000000149011612); case TextureStyle.Texture20Percent: return(0.2); case TextureStyle.Texture25Percent: case TextureStyle.TextureHorizontal: case TextureStyle.TextureVertical: case TextureStyle.TextureDiagonalDown: case TextureStyle.TextureDiagonalUp: return(0.25); case TextureStyle.Texture30Percent: case TextureStyle.TextureDiagonalCross: return(0.3); case TextureStyle.Texture40Percent: return(0.4); case TextureStyle.Texture50Percent: case TextureStyle.TextureDarkHorizontal: case TextureStyle.TextureDarkVertical: case TextureStyle.TextureDarkDiagonalDown: case TextureStyle.TextureDarkDiagonalUp: case TextureStyle.TextureDarkCross: return(0.5); case TextureStyle.Texture60Percent: return(0.6); case TextureStyle.Texture70Percent: case TextureStyle.TextureDarkDiagonalCross: return(0.7); case TextureStyle.Texture75Percent: return(0.75); case TextureStyle.Texture80Percent: return(0.8); case TextureStyle.Texture90Percent: return(0.9); case TextureStyle.TextureCross: case TextureStyle.Texture35Percent: return(0.35); case TextureStyle.Texture2Pt5Percent: return(0.025); case TextureStyle.Texture7Pt5Percent: return(0.075); case TextureStyle.Texture12Pt5Percent: return(0.125); case TextureStyle.Texture15Percent: return(0.15); case TextureStyle.Texture17Pt5Percent: return(0.175); case TextureStyle.Texture22Pt5Percent: return(0.225); case TextureStyle.Texture27Pt5Percent: return(0.275); case TextureStyle.Texture32Pt5Percent: return(0.325); case TextureStyle.Texture37Pt5Percent: return(0.375); case TextureStyle.Texture42Pt5Percent: return(0.425); case TextureStyle.Texture45Percent: return(0.45); case TextureStyle.Texture47Pt5Percent: return(0.475); case TextureStyle.Texture52Pt5Percent: return(0.525); case TextureStyle.Texture55Percent: return(0.55); case TextureStyle.Texture57Pt5Percent: return(0.575); case TextureStyle.Texture62Pt5Percent: return(0.625); case TextureStyle.Texture65Percent: return(0.65); case TextureStyle.Texture67Pt5Percent: return(0.675); case TextureStyle.Texture72Pt5Percent: return(0.725); case TextureStyle.Texture77Pt5Percent: return(0.775); case TextureStyle.Texture82Pt5Percent: return(0.825); case TextureStyle.Texture85Percent: return(0.85); case TextureStyle.Texture87Pt5Percent: return(0.875); case TextureStyle.Texture92Pt5Percent: return(0.925); case TextureStyle.Texture95Percent: return(0.95); case TextureStyle.Texture97Pt5Percent: return(0.975); } throw new InvalidOperationException(BookmarkStart.b("永唺嘼儾⹀㑂⭄杆㵈⹊㕌㭎⅒ご祖", num)); }
internal static TextureStyle smethod_12(TextureStyle A_0) { switch (A_0) { case TextureStyle.TextureNone: case TextureStyle.TextureSolid: case TextureStyle.Texture5Percent: case TextureStyle.Texture10Percent: case TextureStyle.Texture20Percent: case TextureStyle.Texture25Percent: case TextureStyle.Texture30Percent: case TextureStyle.Texture40Percent: case TextureStyle.Texture50Percent: case TextureStyle.Texture60Percent: case TextureStyle.Texture70Percent: case TextureStyle.Texture75Percent: case TextureStyle.Texture80Percent: case TextureStyle.Texture90Percent: case TextureStyle.TextureDarkHorizontal: case TextureStyle.TextureDarkVertical: case TextureStyle.TextureDarkDiagonalDown: case TextureStyle.TextureDarkDiagonalUp: case TextureStyle.TextureDarkCross: case TextureStyle.TextureDarkDiagonalCross: case TextureStyle.TextureHorizontal: case TextureStyle.TextureVertical: case TextureStyle.TextureDiagonalDown: case TextureStyle.TextureDiagonalUp: case TextureStyle.TextureCross: case TextureStyle.TextureDiagonalCross: case TextureStyle.Texture2Pt5Percent: case TextureStyle.Texture7Pt5Percent: case TextureStyle.Texture12Pt5Percent: case TextureStyle.Texture15Percent: case TextureStyle.Texture17Pt5Percent: case TextureStyle.Texture22Pt5Percent: case TextureStyle.Texture27Pt5Percent: case TextureStyle.Texture32Pt5Percent: case TextureStyle.Texture35Percent: case TextureStyle.Texture37Pt5Percent: case TextureStyle.Texture42Pt5Percent: case TextureStyle.Texture45Percent: case TextureStyle.Texture47Pt5Percent: case TextureStyle.Texture52Pt5Percent: case TextureStyle.Texture55Percent: case TextureStyle.Texture57Pt5Percent: case TextureStyle.Texture62Pt5Percent: case TextureStyle.Texture65Percent: case TextureStyle.Texture67Pt5Percent: case TextureStyle.Texture72Pt5Percent: case TextureStyle.Texture77Pt5Percent: case TextureStyle.Texture82Pt5Percent: case TextureStyle.Texture85Percent: case TextureStyle.Texture87Pt5Percent: case TextureStyle.Texture92Pt5Percent: case TextureStyle.Texture95Percent: case TextureStyle.Texture97Pt5Percent: return(A_0); case TextureStyle.TextureNil: return(A_0); } return(TextureStyle.TextureNone); }
static public Texture2D CreateTexture(int width, int height, Texture2D texture, TextureStyle style) { //get the data of the base texture Color[,] InTextureColors = TextureTo2DArray(texture); //prepare the new texture Color[,] OutTextureColors = new Color[width, height]; Texture2D outTexture = new Texture2D(Global.currentGame.GraphicsDevice, width, height); switch (style) { case TextureStyle.Center: //align the centers of each texture int nx = width / 2 - texture.Width / 2; int ny = height / 2 - texture.Height / 2; int nyreset = ny; int bx = 0; int by = 0; int w = texture.Width; int h = texture.Height; //check if base texture is larger than new texture if (nx < 0) { bx = 0 - nx; nx = 0; w = width; } if (ny < 0) { by = 0 - ny; ny = 0; nyreset = ny; h = height; } //go through each point in the base texture int k = nx; for (int i = bx; i < bx + w; i++) { int l = ny; for (int j = by; j < by + h; j++) { //skip over points that are outside the new texture //transcribe the base texture to the new texture OutTextureColors[k, l] = InTextureColors[i, j]; l++; } k++; } break; case TextureStyle.Fill: //to do case TextureStyle.Fit: //to do case TextureStyle.Stretch: //to do case TextureStyle.Tile: int tilex = 0; int tiley = 0; for (int i = 0; i < width; i++) { if (tilex >= texture.Width) { tilex = 0; } tiley = 0; for (int j = 0; j < height; j++) { if (tiley >= texture.Height) { tiley = 0; } OutTextureColors[i, j] = InTextureColors[tilex, tiley]; tiley++; } tilex++; } break; } Color[] textureColors = new Color[width * height]; for (int i = 0; i < width; i++) { for (int j = 0; j < height; j++) { textureColors[i + j * width] = OutTextureColors[i, j]; } } outTexture.SetData(textureColors); return(outTexture); }
internal void method_70(TextureStyle A_0) { this.method_71().method_63(A_0); }
public void method_14(TextureStyle A_0) { this.method_2(); smethod_0(new object[] { this.textureStyle_0 != A_0, PrId.Texture, this.textureStyle_0 }); this.textureStyle_0 = A_0; }
public void method_63(TextureStyle A_0) { this.method_51(); smethod_5(new object[] { ((TextureStyle) base[1]) != A_0, PrId.Texture, (TextureStyle) base[1] }); base[1] = A_0; }