internal static void smethod_1(Class857 A_0, DocumentObject A_1, Class106 A_2) { int num = 14; A_0.method_17(null); smethod_5(A_0); A_0.method_11().method_8().MoveToElement(); Class108 class2 = Class574.smethod_10(A_0); if (!Class576.smethod_1(A_0.method_11())) { A_1 = Class574.smethod_4(A_0, class2, A_1); } Class106 class3 = (Class106)A_0.method_13().method_2(A_0.method_16(), BookmarkStart.b("䀳圵娷嘹夻", num), A_0.method_20(), true); if (class3 == null) { class3 = A_2; } if (class3 == null) { class3 = new Class106(); } Class975 class4 = new Class975(); smethod_6(A_0, class3, class4); class4.method_4(); Table table = smethod_3(A_0, class3, class4); if (A_1.LastChild is Table) { A_1.method_13(smethod_2(A_0.method_9())); } A_1.method_13(table); }
public void CreateImage( DxfRasterImage rasterImage, WW.Math.Point2D imageCorner1, WW.Math.Point2D imageCorner2, Vector4D transformedOrigin, Vector4D transformedXAxis, Vector4D transformedYAxis, DrawContext.Wireframe drawContext) { IBitmap bitmap = rasterImage.ImageDef.Bitmap; if (!bitmap.IsValid) { return; } imageCorner1 += DxfRasterImage.PixelOffset; imageCorner2 -= DxfRasterImage.PixelOffset; double width = (double)bitmap.Width; double height = (double)bitmap.Height; imageCorner1.X = IntervalD.GetRestrictedValue(imageCorner1.X, 0.0, width - 1.0); imageCorner1.Y = IntervalD.GetRestrictedValue(imageCorner1.Y, 0.0, height - 1.0); imageCorner2.X = IntervalD.GetRestrictedValue(imageCorner2.X, 0.0, width - 1.0); imageCorner2.Y = IntervalD.GetRestrictedValue(imageCorner2.Y, 0.0, height - 1.0); bool flag = imageCorner1.X != 0.0 || imageCorner1.Y != 0.0 || imageCorner2.X != width - 1.0 || imageCorner2.Y != height - 1.0; IntPtr hbitmap = bitmap.Image.GetHbitmap(); try { BitmapSource source = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(hbitmap, IntPtr.Zero, Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions()); if (flag) { source = (BitmapSource) new CroppedBitmap(source, new Int32Rect((int)imageCorner1.X, (int)imageCorner1.Y, (int)(imageCorner2.X - imageCorner1.X), (int)(imageCorner2.Y - imageCorner1.Y))); } WW.Math.Point2D point2D1 = this.matrix4D_0.TransformToPoint2D(transformedOrigin); WW.Math.Point2D point2D2 = this.matrix4D_0.TransformToPoint2D(transformedXAxis); WW.Math.Point2D point2D3 = this.matrix4D_0.TransformToPoint2D(transformedYAxis); Vector2D vector2D1 = point2D2 - point2D1; Vector2D vector2D2 = point2D3 - point2D1; TransformedBitmap transformedBitmap = new TransformedBitmap(); transformedBitmap.BeginInit(); transformedBitmap.Source = source; transformedBitmap.Transform = (Transform) new MatrixTransform(new Matrix(1.0, 0.0, 0.0, 1.0, 0.0, point2D1.Y) * new Matrix(1.0, 0.0, 0.0, -1.0, 0.0, 0.0) * new Matrix(1.0, 0.0, 0.0, 1.0, 0.0, -point2D1.Y) * new Matrix(vector2D1.X, vector2D2.X, vector2D1.Y, vector2D2.Y, 0.0, 0.0)); transformedBitmap.EndInit(); Image image = new Image(); image.BeginInit(); image.Source = (ImageSource)transformedBitmap; image.RenderTransform = (Transform) new TranslateTransform(point2D1.X, point2D1.Y); image.Stretch = Stretch.None; image.EndInit(); this.visualCollection_0.Add((Visual)image); } finally { Class975.DeleteObject(hbitmap); } }
public void CreateImage( DxfRasterImage rasterImage, WW.Math.Point2D imageCorner1, WW.Math.Point2D imageCorner2, Vector4D transformedOrigin, Vector4D transformedXAxis, Vector4D transformedYAxis, DrawContext.Wireframe drawContext) { IBitmap bitmap = rasterImage.ImageDef == null ? (IBitmap)null : rasterImage.ImageDef.Bitmap; if (bitmap == null || !bitmap.IsValid) { return; } imageCorner1 += DxfRasterImage.PixelOffset; imageCorner2 -= DxfRasterImage.PixelOffset; double width = (double)bitmap.Width; double height = (double)bitmap.Height; imageCorner1.X = IntervalD.GetRestrictedValue(imageCorner1.X, 0.0, width - 1.0); imageCorner1.Y = IntervalD.GetRestrictedValue(imageCorner1.Y, 0.0, height - 1.0); imageCorner2.X = IntervalD.GetRestrictedValue(imageCorner2.X, 0.0, width - 1.0); imageCorner2.Y = IntervalD.GetRestrictedValue(imageCorner2.Y, 0.0, height - 1.0); bool flag = imageCorner1.X != 0.0 || imageCorner1.Y != 0.0 || imageCorner2.X != width - 1.0 || imageCorner2.Y != height - 1.0; IntPtr hbitmap = bitmap.Image.GetHbitmap(); try { BitmapSource source = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(hbitmap, IntPtr.Zero, Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions()); if (flag) { source = (BitmapSource) new CroppedBitmap(source, new Int32Rect((int)imageCorner1.X, (int)imageCorner1.Y, (int)(imageCorner2.X - imageCorner1.X), (int)(imageCorner2.Y - imageCorner1.Y))); } WW.Math.Point2D point2D1 = this.matrix4D_0.TransformToPoint2D(transformedOrigin); WW.Math.Point2D point2D2 = this.matrix4D_0.TransformToPoint2D(transformedXAxis); WW.Math.Point2D point2D3 = this.matrix4D_0.TransformToPoint2D(transformedYAxis); Vector2D vector2D1 = point2D2 - point2D1; Vector2D vector2D2 = point2D3 - point2D1; Image image = new Image(); image.BeginInit(); image.Source = (ImageSource)source; image.RenderTransform = (Transform) new MatrixTransform(new Matrix(1.0, 0.0, 0.0, -1.0, 0.0, source.Height) * new Matrix(vector2D1.X, vector2D1.Y, vector2D2.X, vector2D2.Y, point2D1.X, point2D1.Y)); image.Stretch = Stretch.None; image.Tag = this.objectTaggerDelegate_0((DxfEntity)rasterImage, (DrawContext)drawContext); image.EndInit(); this.linkedListNodeRef_0.Insert((Interface37) new Class747((FrameworkElement)image)); } finally { Class975.DeleteObject(hbitmap); } }
private static void smethod_6(Class857 A_0, Class106 A_1, Class975 A_2) { int num = 11; Class396 class2 = A_0.method_11(); while (class2.method_9(BookmarkStart.b("䔰刲圴嬶尸", num))) { string str = class2.method_1(); if (str != null) { if (str != BookmarkStart.b("䔰刲圴嬶尸ᘺ帼倾ⵀ㙂⡄⥆", num)) { if (str != BookmarkStart.b("䔰刲圴嬶尸ᘺ帼倾ⵀ㙂⡄⥆㩈", num)) { if (str != BookmarkStart.b("䔰刲圴嬶尸ᘺ似倾㙀", num)) { if (!(str == BookmarkStart.b("䔰刲圴嬶尸ᘺ似倾㙀あ", num))) { if (!(str == BookmarkStart.b("䔰刲圴嬶尸ᘺ唼娾⁀❂⁄㕆摈㥊≌㡎≐", num))) { goto Label_00AE; } smethod_9(A_0, A_1, A_2); } else { smethod_8(A_0, A_2, A_1); } } else { Class570.smethod_1(A_0, A_2, A_1); } } else { smethod_7(A_0, A_1); } } else { Class1049.smethod_0(A_0, A_1); } continue; } Label_00AE: class2.vmethod_1(); } }
private static void smethod_9(Class857 A_0, Class106 A_1, Class975 A_2) { int num = 1; Class396 class2 = A_0.method_11(); while (class2.method_9(BookmarkStart.b("匦䠨䤪䄬䨮ᰰ嬲倴嘶崸帺似ሾ㍀ⱂ㉄㑆", num))) { string str; if (((str = class2.method_1()) != null) && (str == BookmarkStart.b("匦䠨䤪䄬䨮ᰰ䄲娴䀶", num))) { Class570.smethod_0(A_0, A_2, A_1, true); } else { class2.vmethod_1(); } } }
private static int smethod_4(Class857 A_0, Class106 A_1, Class975 A_2) { int num = 0; Class108 class2 = Class574.smethod_11(A_0, A_0.method_14(), A_0.method_26()); if (class2 != null) { int num2 = Class969.smethod_31((double)class2.method_8().PageSetup.ClientWidth); int num3 = 0; int num4 = 0; if (A_1 == null) { return(num); } int num5 = (A_1.method_16() == -2147483648) ? num2 : A_1.method_16(); foreach (Class94 class3 in A_1.method_20()) { if (class3.method_12() == -2147483648) { num3++; } else { num4 += class3.method_12(); } } if (A_2.method_5() > A_1.method_20().Count) { num3 += A_2.method_5() - A_1.method_20().Count; } if (num3 > 0) { num = (num5 - num4) / num3; } } return(num); }
internal static void smethod_0(Class857 A_0, Class975 A_1, Class106 A_2, bool A_3) { Class571 class2 = new Class571(); A_0.method_17(null); smethod_2(A_0, class2); Class103 class3 = (Class103)A_0.method_13().method_2(A_0.method_16(), BookmarkStart.b("別䤧䠩䀫䬭ᴯ䀱嬳䄵", 0), A_0.method_20(), true); if ((class3 != null) && (class3.method_12() != null)) { class3.method_12().method_37(class2.method_2()); } A_1.Add(class2); smethod_3(A_0, A_2, class2); if (A_2 != null) { class2.method_2().LeftIndent = (float)A_2.method_18().method_0().method_0(); } if (A_3) { class2.method_2().SetAttr(0xfc8, true); } A_1.method_6(Math.Max(A_1.method_5(), class2.Count)); }
internal static void smethod_1(Class857 A_0, Class975 A_1, Class106 A_2) { smethod_0(A_0, A_1, A_2, false); }
private static Table smethod_3(Class857 A_0, Class106 A_1, Class975 A_2) { int num = 0; Table table = new Table(A_0.method_9()); int num2 = smethod_4(A_0, A_1, A_2); foreach (Class571 class4 in A_2) { TableCell cell = new TableCell(A_0.method_9()); TableRow lastRow = null; if (table.FirstRow != null) { lastRow = table.LastRow; cell = (TableCell)Class681.smethod_15(lastRow.FirstChild); } table.method_13(new TableRow(A_0.method_9(), class4.method_2())); for (int i = 0; i < class4.Count; i++) { Class1140 class3 = class4.method_0(i); if (class3.method_8() == null) { class3.method_9((TableCell)cell.Clone()); if ((class3.method_4() == CellMerge.Continue) && (i != 0)) { class3.method_8().CellFormat.PreferredWidth.method_50(0f); class3.method_8().CellFormat.PreferredWidth.method_52(FtsWidth.Point); } if (((class3.method_6() == CellMerge.Continue) && (lastRow != null)) && (lastRow.Cells[i] != null)) { class3.method_8().CellFormat.PreferredWidth.method_50(((float)A_1.method_20().method_1(i).method_12()) / 20f); class3.method_8().CellFormat.PreferredWidth.method_52(FtsWidth.Point); } } else if (class3.method_4() != CellMerge.Continue) { int num6 = 0; for (int k = 0; k < class3.method_0(); k++) { if ((A_1 != null) && ((i + k) < A_1.method_20().Count)) { Class94 class2 = A_1.method_20().method_1(i + k); if (class2 != null) { num6 += (class2.method_12() == -2147483648) ? num2 : class2.method_12(); } } } class3.method_8().CellFormat.PreferredWidth.method_50(((float)num6) / 20f); class3.method_8().CellFormat.PreferredWidth.method_52(FtsWidth.Point); } class3.method_8().CellFormat.HorizontalMerge = class3.method_4(); class3.method_8().CellFormat.VerticalMerge = class3.method_6(); table.LastRow.Cells.Add(class3.method_8()); cell = class3.method_8(); } if ((class4.method_0(0).method_6() == CellMerge.Continue) && (lastRow != null)) { table.LastRow.RowFormat.LeftIndent = lastRow.RowFormat.LeftIndent; } for (int j = 1; j < class4.method_4(); j++) { table.method_13(table.LastRow); } } if (A_1 != null) { string str = A_1.method_12(); if (str != null) { if (!(str == BookmarkStart.b("吥䐧ܩ堫䰭", num))) { if (str == BookmarkStart.b("䨥娧ܩ堫䰭", num)) { table.TableFormat.Bidi = false; } } else { table.TableFormat.Bidi = true; } } table.DocxTableFormat.Format.HorizontalAlignment = (RowAlignment)A_1.method_14(); } if ((A_1 != null) && (A_1.method_16() != -2147483648)) { table.PreferredWidth = new PreferredWidth(WidthType.Twip, (short)A_1.method_16()); } return(table); }