// Token: 0x06002B5B RID: 11099 RVA: 0x000A8DA4 File Offset: 0x000A6FA4 private unsafe static void smethod_3(Bitmap bmp, Struct33[,] data) { using (Class125 @class = new Class125(bmp)) { using (new Class125.Class153(@class)) { try { Struct33 *ptr; if (data != null && data.Length != 0) { fixed(Struct33 *ptr = &data[0, 0]) { } } else { ptr = null; } Struct33 *ptr2 = ptr; Struct33 *ptr3 = @class.pBase; for (int i = 0; i < bmp.Width * bmp.Height; i++) { *ptr3 = *ptr2; ptr3++; ptr2++; } } finally { Struct33 *ptr = null; } } } }
// Token: 0x06000529 RID: 1321 RVA: 0x000057DF File Offset: 0x000039DF public Struct42(string string_0) { this.class58_0 = new Class58 { class12_0 = Class125.smethod_0(string_0) }; }
// Token: 0x06001E88 RID: 7816 RVA: 0x000631E0 File Offset: 0x000613E0 private void method_6(Class125 alpha_bitmap, Class125 color_bitmap = null) { Struct33[,] colors = alpha_bitmap.Colors; Struct33[,] color_data = (color_bitmap == null) ? colors : color_bitmap.Colors; this.int_0 = 0; short left; short num; short num2; short num3; if (Class95 <ColorType> .smethod_2(colors, this.size_0, FlowDirection.LeftToRight, out left) && Class95 <ColorType> .smethod_2(colors, this.size_0, FlowDirection.TopDown, out num) && Class95 <ColorType> .smethod_2(colors, this.size_0, FlowDirection.RightToLeft, out num2) && Class95 <ColorType> .smethod_2(colors, this.size_0, FlowDirection.BottomUp, out num3)) { this.rectangle_0 = Rectangle.FromLTRB((int)left, (int)num, (int)(num2 + 1), (int)(num3 + 1)); this.array_0 = Array.CreateInstance(typeof(Array[]), new int[] { this.rectangle_0.Height }, new int[] { this.rectangle_0.Top }); short num4 = num; while ((int)num4 < this.rectangle_0.Bottom) { this.array_0.SetValue(this.method_7(colors, color_data, left, num2, num4), (int)num4); num4 += 1; } return; } this.array_0 = null; }
// Token: 0x06001E81 RID: 7809 RVA: 0x00062B20 File Offset: 0x00060D20 public Class95(Class125 alpha_bitmap, Class125 color_bitmap) { this.size_0 = alpha_bitmap.Size; using (new Class125.Class153(alpha_bitmap)) { using (new Class125.Class153(color_bitmap)) { this.method_6(alpha_bitmap, color_bitmap); } } this.method_4(); }
// Token: 0x0600052C RID: 1324 RVA: 0x0002C3AC File Offset: 0x0002A5AC public string method_1() { string text; if (this.method_0(out text)) { return(text); } object obj = Struct42.object_0; lock (obj) { if (this.method_0(out text)) { return(text); } Class184 class184_ = this.class58_0.class12_0.class184_0; object obj2 = class184_.object_0; byte[] byte_; bool bool_; lock (obj2) { byte_ = class184_.byte_0; bool_ = class184_.bool_0; if (class184_.bool_1) { if (byte_ == null) { throw new Exception(Class185.smethod_0(537694803)); } } else { WeakReference weakReference_ = this.class58_0.class12_0.weakReference_1; string text2 = ((weakReference_ != null) ? weakReference_.Target : null) as string; if (text2 == null) { throw new Exception(Class185.smethod_0(537694608)); } text = string.Copy(text2); Class125.smethod_3(text2); } class184_.bool_1 = true; } if (text == null) { text = Class125.smethod_2(byte_, bool_); } this.method_2(text); } return(text); }
// Token: 0x06002540 RID: 9536 RVA: 0x000800F8 File Offset: 0x0007E2F8 public Class95 <T> method_1 <T>() where T : Interface17 { Class95 <T> result; using (Class125 @class = new Class125(this.bitmap_1)) { using (Class125 class2 = new Class125(this.bitmap_0)) { result = new Class95 <T>(@class, class2); } } return(result); }
public void method_2(string string_1, int int_0, string string_2) { this.string_0 = string_1; this.class18_0 = new OutConnectionManager(); this.class18_0.method_0(string_2, (Interface26)this.object_0, this.emptyAgileLogger_0); this.class125_0 = new Class125(); this.class125_0.method_0(string_2, int_0, (Interface26)this.object_0, this.p2PSessionMessageTypeRoom_0); this.class125_0.OnSomeOneDisconnected += new CbGeneric <string>(this.OnP2PChannelClosed); this.class125_0.SomeOneConnected += new CbGeneric <string, IPEndPoint, bool>(this.OnP2PChannelOpened); this.class18_0.Event_1 += new CbGeneric <string>(this.OnP2PChannelClosed); this.class18_0.SomeOneConnected += new CbGeneric <string, IPEndPoint, bool>(this.OnP2PChannelOpened); this.object_1 = 1; }
internal void method_28() { int num = 0x10; Class599.smethod_0(this.document_0.FontInfoList, base.method_5(), base.method_3(), base.method_1()); Class812 class2 = new Class812(base.method_5(), base.method_3()); this.class142_0 = new Class142(class2); this.class140_0 = new Class140(this.document_0.FontInfoList, class2); this.class1109_0 = new Class1109(base.method_4(), class2, base.method_5().nfibEnum_0, this); this.class352_0 = new Class352(this.document_0); this.class352_0.method_3(base.method_3(), base.method_5().class597_0.class1111_50.int_0, base.method_5().class597_0.class1111_50.int_1, base.method_1()); if (ShapeObject.smethod_1(this.class352_0.method_12())) { this.document_0.method_27(new Background(this.document_0, this.class352_0.method_12())); } new Class427(this.document_0.FontInfoList, class2, this.document_0.Styles).method_0(base.method_3(), base.method_5(), this.method_47()); new Class1060(this.document_0.FontInfoList, class2, this.document_0.ListStyles, this.document_0.ListOverrides).method_0(base.method_5(), base.method_3(), this.method_47(), this.method_48()); this.document_0.Frame = Class1152.smethod_0(base.method_5(), base.method_3(), this.document_0.ListStyles); Class659.smethod_0(base.method_3(), base.method_5().class597_0.class1111_31, this.document_0); if (base.method_5().class597_0.method_6()) { this.document_0.RouteSlip = new Class481(base.method_5(), base.method_3(), this.document_0.Settings.int_27); } Class342 class3 = new Class342(); class3.method_0(base.method_3(), base.method_5().class597_0.class1111_72.int_0, base.method_5().class597_0.class1111_72.int_1); new Class869().method_0(base.method_3(), base.method_5(), class3, this.document_0.Settings.class460_0); base.method_18().method_0(class3, this.document_0.FileName); new Class704().method_0(base.method_0().method_0(), this.document_0.BuiltinDocumentProperties, this.document_0.CustomDocumentProperties); this.method_31(); this.method_32(); this.method_34(); base.method_3().BaseStream.Position = base.method_5().class597_0.class1111_45.int_0; this.document_0.DropdownStrings = base.method_3().ReadBytes(base.method_5().class597_0.class1111_45.int_1); base.method_3().BaseStream.Position = base.method_5().class597_0.class1111_24.int_0; new Class660().method_0(base.method_3(), base.method_5().class597_0.class1111_24.int_1, this.document_0); Class125.smethod_0(base.method_5(), base.method_3(), this.document_0); this.document_0.CompObj = base.method_0().method_0().method_4(BookmarkStart.b("㜵笷唹儻丽༿⁁⹃", num)); this.document_0.VbaMacros = base.method_0().method_0().method_6(BookmarkStart.b("笵夷夹主儽㌿", num)); new Class1108(this).method_0(); if (base.method_5().nfibEnum_0 <= NFibEnum.Word2000) { this.method_30(); } Class871.smethod_0(base.method_0(), this.document_0.CustomXmlParts); }
// Token: 0x06001C01 RID: 7169 RVA: 0x00057DC4 File Offset: 0x00055FC4 public PNGSplit(Stream stream) { this.stream_0 = stream; this.stream_0.Position = 0L; this.bitmap_0 = (Image.FromStream(this.stream_0) as Bitmap); if (!Class125.smethod_0(this.bitmap_0.PixelFormat)) { throw new InvalidPixelFormatException(this.bitmap_0.PixelFormat); } this.stream_0.Position = 0L; if (stream == null) { throw new ArgumentNullException("stream"); } this.InitializeComponent(); this.method_1(); }
private Class121 method_3() { bool flag = this.class144_0.vmethod_10(1) != 0; int num = this.class144_0.vmethod_10(7); int num2 = this.class144_0.vmethod_10(24); Class121 result; if (num == 0) { this.class122_0 = new Class122(this.class144_0, num2, flag); result = this.class122_0; } else if (num == 3) { this.class127_0 = new Class127(this.class144_0, num2, flag); result = this.class127_0; } else if (num == 2) { result = new Class124(this.class144_0, num2, flag); } else if (num == 1) { result = new Class128(this.class144_0, num2, flag); } else if (num == 4) { result = new Class129(this.class144_0, num2, flag); } else if (num == 5) { result = new Class125(this.class144_0, num2, flag); } else if (num == 6) { result = new Class123(this.class144_0, num2, flag); } else { result = new Class126(this.class144_0, num2, flag); } return(result); }
// Token: 0x06000338 RID: 824 RVA: 0x0001E648 File Offset: 0x0001C848 protected override void Finalize() { try { object object_ = this.class184_0.object_0; lock (object_) { if (!this.class184_0.bool_1) { this.class184_0.byte_0 = Class125.smethod_1(this.string_0); this.class184_0.bool_1 = true; Class125.smethod_3(this.string_0); } } } finally { base.Finalize(); } }
// Token: 0x060017A1 RID: 6049 RVA: 0x0003DFE0 File Offset: 0x0003C1E0 protected unsafe bool method_21(ManualResetEventSlim waitHandle = null) { int num = 0; do { Size size = new Size(20, 20); using (Bitmap bitmap = Class364.smethod_3(this.intptr_0, new Rectangle(Point.Empty, size))) { using (Class125 @class = new Class125(bitmap, false)) { using (new Class125.Class153(@class)) { Struct33 *ptr = @class.pBase; Struct33 right = new Struct33(0, 0, 0, byte.MaxValue); for (int i = 0; i < base.Size.Height; i++) { for (int j = 0; j < base.Size.Width; j++) { if (Struct33.smethod_4(*ptr, right)) { return(true); } ptr++; } } } } } if (waitHandle != null) { waitHandle.Wait(100); } else { Thread.Sleep(100); } num++; }while (num < 100 && (waitHandle == null || !waitHandle.IsSet)); return(false); }
// Token: 0x0600280B RID: 10251 RVA: 0x00093E4C File Offset: 0x0009204C public static Enum107 smethod_0(Class141 toontownWindow, Class150 original_capture, Struct46 bounds, Class104 settings) { if (original_capture == null) { return(Enum107.const_2); } if (bounds.IsSizeEmpty) { return(Enum107.const_2); } IntPtr mainWindowHandle = toontownWindow.MainWindowHandle; if (!toontownWindow.ProcessOpen) { return(Enum107.const_2); } if (original_capture != null && !Struct46.smethod_0(bounds, Struct46.struct46_0)) { Rectangle rec = bounds.method_0(Class410.smethod_16(mainWindowHandle).Size); Enum107 result; using (Bitmap bitmap = Class364.smethod_3(mainWindowHandle, rec)) { using (Class125 @class = new Class125(bitmap)) { using (Class150 class2 = new Class150(@class)) { if (Class150.smethod_1(class2, original_capture, settings.MaxColorRange)) { result = Enum107.const_0; } else { result = Enum107.const_1; } } } } return(result); } return(Enum107.const_2); }
// Token: 0x06002B5D RID: 11101 RVA: 0x000A8F14 File Offset: 0x000A7114 private unsafe static void smethod_5(Bitmap original, Color[,] data) { int width = original.Width; int height = original.Height; using (Class125 @class = new Class125(original)) { using (new Class125.Class153(@class)) { Struct33 *ptr = @class.pBase; for (int i = 0; i < height; i++) { for (int j = 0; j < width; j++) { data[j, i] = Struct33.smethod_0(*ptr); ptr++; } } } } }
// Token: 0x0600280C RID: 10252 RVA: 0x00093F24 File Offset: 0x00092124 public static Enum107 smethod_1(Class141 toontownWindow, Class150 original_capture, Rectangle capture_bounds, Class104 settings) { if (original_capture == null) { return(Enum107.const_2); } IntPtr mainWindowHandle = toontownWindow.MainWindowHandle; if (!toontownWindow.ProcessOpen) { return(Enum107.const_2); } if (original_capture != null && capture_bounds.Size.smethod_1()) { Enum107 result; using (Bitmap bitmap = Class364.smethod_3(mainWindowHandle, capture_bounds)) { using (Class125 @class = new Class125(bitmap)) { using (Class150 class2 = new Class150(@class)) { if (Class150.smethod_1(class2, original_capture, settings.MaxColorRange)) { result = Enum107.const_0; } else { result = Enum107.const_1; } } } } return(result); } return(Enum107.const_2); }
// Token: 0x06002534 RID: 9524 RVA: 0x0007FFA4 File Offset: 0x0007E1A4 private void PondRegionSelector_FormClosing(object sender, FormClosingEventArgs e) { if (base.DialogResult == DialogResult.OK) { Bitmap overlay = this.DrawingBoardRenderer.Overlay; if (overlay == null) { DialogBox.smethod_3("Please make a valid selection by using the drawing tools.", "Nothing selected"); return; } int num = Class125.smethod_4(overlay); if (num == 1) { DialogBox.smethod_3("Only a single pixel is selected. Unfortunately, Joe Fish needs at least 10,000 selected pixels to operate properly. Please try to use a larger brush.", "Too Small, Try Again."); e.Cancel = true; return; } if (num < 10000) { DialogBox.smethod_3("Please make a larger selection, this will ensure Joe Fish can operate properly.", "Selection Too Small"); e.Cancel = true; } } }
// Token: 0x06002B58 RID: 11096 RVA: 0x000A8164 File Offset: 0x000A6364 public static void smethod_0(Stream data_stream, Stream destination_stream, Bitmap destination_bitmap, Color?backGroundColor, bool convert_to_grayscale, Enum14 format) { using (Bitmap bitmap = (Bitmap)Image.FromStream(data_stream)) { if (destination_bitmap != null && backGroundColor != null) { if (destination_bitmap.Width == bitmap.Width) { if (destination_bitmap.Height == bitmap.Height) { using (Graphics graphics = Graphics.FromImage(destination_bitmap)) { using (SolidBrush solidBrush = new SolidBrush(backGroundColor.Value)) { graphics.SmoothingMode = SmoothingMode.HighQuality; graphics.InterpolationMode = InterpolationMode.High; graphics.CompositingQuality = CompositingQuality.HighQuality; graphics.FillRectangle(solidBrush, 0, 0, destination_bitmap.Width, destination_bitmap.Height); graphics.DrawImage(bitmap, 0, 0, bitmap.Width, bitmap.Height); } goto IL_B2; } } } throw new ArgumentException("Destination dimensions do not match source image dimensions."); } IL_B2: if (convert_to_grayscale) { Class125.smethod_1(bitmap); } using (Stream3 stream = new Stream3(destination_stream)) { using (BinaryWriter binaryWriter = new BinaryWriter(stream)) { stream.smethod_37(Class486.short_0); stream.WriteByte(1); stream.WriteByte(1); short num; short value; switch (format) { case Enum14.const_0: num = 4; value = 3; break; case Enum14.const_1: num = 3; value = 3; break; case Enum14.const_2: num = 2; value = 3; break; case Enum14.const_3: num = 1; value = 2; break; default: throw new NotSupportedException(string.Format("The specified format: '{0}' is not supported.", format)); } stream.smethod_37(value); stream.smethod_37((short)bitmap.Width); stream.smethod_37((short)bitmap.Height); stream.smethod_37(num); stream.smethod_35(0); stream.smethod_35(255); binaryWriter.Write(new byte[4]); binaryWriter.Write(new byte[80]); stream.smethod_35(0); binaryWriter.Write(new byte[404]); for (int i = 0; i < (int)num; i++) { for (int j = 0; j < bitmap.Height; j++) { stream.smethod_35(0); } for (int k = 0; k < bitmap.Height; k++) { stream.smethod_35(0); } } Class486.Class487[] array = new Class486.Class487[bitmap.Height]; if (destination_bitmap == null) { array = new Class486.Class487[bitmap.Height * (int)num]; Struct33[,] array2 = new Struct33[bitmap.Width, bitmap.Height]; Class486.smethod_4(bitmap, array2); switch (format) { case Enum14.const_0: case Enum14.const_1: for (int l = (int)(num - 1); l >= 0; l--) { int num2 = ((int)(num - 1) - l) * bitmap.Height; for (int m = 0; m < bitmap.Height; m++) { Class486.Class487 @class = array[num2 + m] = new Class486.Class487(); @class.byte_0 = new byte[bitmap.Width]; for (int n = 0; n < bitmap.Width; n++) { switch (l) { case 0: @class.byte_0[n] = array2[n, m].R; break; case 1: @class.byte_0[n] = array2[n, m].G; break; case 2: @class.byte_0[n] = array2[n, m].B; break; case 3: @class.byte_0[n] = array2[n, m].A; break; } } } } break; case Enum14.const_2: for (int num3 = (int)(num - 1); num3 >= 0; num3--) { int num4 = ((int)(num - 1) - num3) * bitmap.Height; for (int num5 = 0; num5 < bitmap.Height; num5++) { Class486.Class487 class2 = array[num4 + num5] = new Class486.Class487(); class2.byte_0 = new byte[bitmap.Width]; for (int num6 = 0; num6 < bitmap.Width; num6++) { switch (num3) { case 0: class2.byte_0[num6] = array2[num6, num5].R; break; case 1: class2.byte_0[num6] = array2[num6, num5].A; break; } } } } break; case Enum14.const_3: for (int num7 = 0; num7 < bitmap.Height; num7++) { array[num7] = new Class486.Class487(); array[num7].byte_0 = new byte[bitmap.Width]; for (int num8 = 0; num8 < bitmap.Width; num8++) { array[num7].byte_0[num8] = array2[num8, num7].R; } } break; default: throw new NotSupportedException("Format not supported: " + format); } } else { array = new Class486.Class487[bitmap.Height]; Color[,] array3 = new Color[bitmap.Width, bitmap.Height]; Class486.smethod_5(bitmap, array3); for (int num9 = 0; num9 < bitmap.Height; num9++) { array[num9] = new Class486.Class487(); array[num9].byte_0 = new byte[bitmap.Width]; for (int num10 = 0; num10 < bitmap.Width; num10++) { array[num9].byte_0[num10] = array3[num10, num9].A; } } } foreach (Class486.Class487 tbl in array) { Class486.smethod_7(stream, tbl); } Array.Reverse(array); binaryWriter.Seek(512, SeekOrigin.Begin); foreach (Class486.Class487 class3 in array) { stream.smethod_35(class3.int_0); } foreach (Class486.Class487 class4 in array) { stream.smethod_35(class4.int_1); } } } } }
// Token: 0x060019B0 RID: 6576 // RVA: 0x0007B4A4 File Offset: 0x000796A4 internal Class115(string string_3) { this.string_1 = string_3; Application.EnableVisualStyles(); Class115.form_0 = (Form)Control.FromHandle(base.method_4().vmethod_1()); string filePath = Environment.CurrentDirectory + "\\" + Process.GetCurrentProcess().ProcessName.Replace(".vshost", string.Empty) + ".exe"; try { Class115.form_0.Icon = Icon.ExtractAssociatedIcon(filePath); } catch { } Class115.form_0.AllowDrop = true; Class115.form_0.FormClosing += new FormClosingEventHandler(this.method_29); Class115.form_0.DragEnter += new DragEventHandler(Class115.smethod_10); Class115.form_0.DragDrop += new DragEventHandler(Class115.smethod_9); Class115.form_0.Deactivate += new EventHandler(this.method_27); Class115.form_0.Activated += new EventHandler(this.method_28); Class115.form_0.SizeChanged += new EventHandler(this.method_26); Class115.smethod_77(new EventHandler(Class115.smethod_72)); Class115.thread_2 = Thread.CurrentThread; Class115.class114_0 = this; Class115.class115_0 = this; Class341.Initialize(); if (Class341.class608_17 == 5) { Class341.class608_17.Value = 0; Class341.smethod_3(); Class905.smethod_11(false); } string arg_1A9_0 = Class341.class605_3; bool arg_1A9_1 = Class341.class605_15 != Class344.smethod_0(); if (Class115.voidDelegate_13 == null) { Class115.voidDelegate_13 = new VoidDelegate(Class115.smethod_102); } Class41.smethod_0(arg_1A9_0, arg_1A9_1, Class115.voidDelegate_13, Resources.en); KeyboardState state = Keyboard.GetState(); if (state.IsKeyDown(160) || state.IsKeyDown(161)) { Configuration configuration = new Configuration(); configuration.ShowDialog(); } if (Class905.smethod_16()) { Class341.class605_18.Value = "d3d"; Class341.class605_26.Value = FrameSync.Limit120; } if (Class341.class605_18 == "opengl") { Class115.bool_27 = true; } else { Class115.bool_26 = true; } this.bool_6 = Class115.bool_26; Class115.class125_0 = new Class125(this); Class115.class125_0.method_15(Class341.smethod_0()); Class115.class125_0.method_16(new EventHandler<EventArgs1>(Class115.smethod_7)); if (Class341.dictionary_0.ContainsKey("GraphicsFix")) { Class115.class125_0.method_13(54); Class115.class125_0.method_7(9); } Class115.contentManager_0 = new ResourceContentManager(base.method_3(), ResourcesStore.get_ResourceManager()); Class115.size_0 = Class787.smethod_4(); Class115.point_0 = Class787.smethod_5(); Class115.smethod_4(); }
// Token: 0x0600172D RID: 5933 RVA: 0x0003824C File Offset: 0x0003644C protected bool method_10(string message, string question, Struct46 ratio, out Class125 bmp, out Struct46 resulting_ratio) { bmp = null; resulting_ratio = default(Struct46); if (!this.class141_0.ProcessOpen && !this.class141_0.smethod_1(this)) { return(false); } using (Class499 @class = new Class499(this, true)) { using (DialogBox dialogBox = new DialogBox(question, "Are you ready?", Enum90.const_0, null, false, Enum121.const_1, new Enum39[] { Enum39.const_0, Enum39.const_1 })) { @class.method_1(dialogBox, DialogResult.OK); DialogResult dialogResult = dialogBox.ShowDialog(); if (dialogResult != DialogResult.OK) { return(false); } @class.method_4(); @class.method_6(); } if (this.class141_0.ProcessOpen) { Class410.smethod_8(this, this.class141_0.MainWindowHandle); using (CountDown countDown = new CountDown()) { @class.method_1(countDown, DialogResult.OK); if (countDown.ShowDialog() == DialogResult.OK) { @class.method_6(); @class.method_4(); if (this.class141_0.ProcessOpen) { Class410.smethod_8(this, this.class141_0.MainWindowHandle); EventHandler eventHandler = null; CaptureSetupForm.Class159 class2 = new CaptureSetupForm.Class159(); class2.regionSelector_0 = new RegionSelector(this.class141_0.MainWindowHandle); try { @class.method_0(class2.regionSelector_0); Rectangle rectangle = Class410.smethod_16(this.class141_0.MainWindowHandle); class2.regionSelector_0.SelectionBounds = Rectangle.Empty; class2.regionSelector_0.SelectedRegion = ratio.method_0(rectangle.Size); class2.regionSelector_0.RegionSelectorType = Enum124.const_0; class2.regionSelector_0.FullSelect = false; class2.regionSelector_0.FullSize = true; class2.regionSelector_0.FullScreenCapture = true; class2.regionSelector_0.MovableResizeMessage = message + " Press any key to accept or escape to cancel."; Form regionSelector_ = class2.regionSelector_0; if (eventHandler == null) { eventHandler = new EventHandler(class2.method_0); } regionSelector_.Shown += eventHandler; if (class2.regionSelector_0.ShowDialog() == DialogResult.OK && class2.regionSelector_0.SelectedRegion.smethod_2()) { bmp = class2.regionSelector_0.SelectedBitmap; resulting_ratio = Struct46.smethod_3(class2.regionSelector_0.SelectedRegion, new Rectangle(Point.Empty, rectangle.Size)); return(true); } } finally { if (class2.regionSelector_0 != null) { ((IDisposable)class2.regionSelector_0).Dispose(); } } } } } } } return(false); }
// Token: 0x06002D19 RID: 11545 RVA: 0x000157A0 File Offset: 0x000139A0 public Class150(Class125 bmp) : this() { this.size_0 = bmp.Size; this.class125_0 = bmp; this.class125_0.method_4(); }
// Token: 0x06001E87 RID: 7815 RVA: 0x00062FB8 File Offset: 0x000611B8 public unsafe Bitmap method_5(Color?replaceColor = null) { Bitmap bitmap = null; Bitmap result; try { bitmap = new Bitmap(this.size_0.Width, this.size_0.Height); if (this.array_0 != null) { using (Class125 @class = new Class125(bitmap)) { using (new Class125.Class153(@class)) { for (int i = this.rectangle_0.Top; i < this.rectangle_0.Bottom; i++) { Array[] array = (Array[])this.array_0.GetValue(i); short num = 0; while ((int)num < array.Length) { Array array2 = (Array)array.GetValue((int)num); int lowerBound = array2.GetLowerBound(0); int num2 = lowerBound + array2.Length - 1; Struct33 *ptr = @class.pBase + i * this.size_0.Width + lowerBound + this.rectangle_0.Left; if (replaceColor != null) { Struct33 @struct = Struct33.smethod_1(replaceColor.Value); for (int j = lowerBound; j <= num2; j++) { *ptr = @struct; ptr++; } } else if (this.bool_0) { for (int k = lowerBound; k <= num2; k++) { *ptr = (Struct33)array2.GetValue(k); ptr++; } } else { for (int l = lowerBound; l <= num2; l++) { *ptr = Struct33.smethod_2((Struct54)array2.GetValue(l)); ptr++; } } num += 1; } } } } } result = bitmap; } catch { if (bitmap != null) { bitmap.Dispose(); } throw; } return(result); }
// Token: 0x06001E8F RID: 7823 RVA: 0x000638A0 File Offset: 0x00061AA0 public unsafe bool method_10(Bitmap bmp, float minimum_percent) { int num = this.int_0 - (int)Math.Ceiling((double)(minimum_percent * (float)this.int_0)); Size size = bmp.Size; bool result; using (Class125 @class = new Class125(bmp)) { using (new Class125.Class153(@class)) { int num2 = 0; Array[][] array = new Array[this.array_0.Length][]; this.array_0.CopyTo(array, 0); int i = 0; int num3 = this.rectangle_0.Y; while (i < this.rectangle_0.Height) { Array[] array2 = array[i]; Array[] array3 = array2; int j = 0; while (j < array3.Length) { Array array4 = array3[j]; int k = array4.GetLowerBound(0) + this.rectangle_0.Left; int length = array4.GetLength(0); int num4 = k + length; Struct33 *ptr = @class.pBase + k + num3 * size.Width; if (this.bool_0) { Struct33[] array5 = new Struct33[length]; array4.CopyTo(array5, 0); try { Struct33[] array6; Struct33 * ptr2; if ((array6 = array5) != null && array6.Length != 0) { fixed(Struct33 *ptr2 = &array6[0]) { } } else { ptr2 = null; } Struct33 *ptr3 = ptr2; while (k < num4) { if (ptr->R != ptr3->R || ptr->G != ptr3->G || ptr->B != ptr3->B || ptr->A != ptr3->A) { num2++; } ptr3++; ptr++; k++; } goto IL_23F; } finally { Struct33 *ptr2 = null; } goto IL_193; } goto IL_193; IL_23F: j++; continue; IL_193: Struct54[] array7 = new Struct54[length]; array4.CopyTo(array7, 0); try { Struct54[] array8; Struct54 * ptr4; if ((array8 = array7) != null && array8.Length != 0) { fixed(Struct54 *ptr4 = &array8[0]) { } } else { ptr4 = null; } Struct54 *ptr5 = ptr4; while (k < num4) { if (ptr->R != ptr5->R || ptr->G != ptr5->G || ptr->B != ptr5->B) { num2++; } ptr5++; ptr++; k++; } goto IL_23F; } finally { Struct54 *ptr4 = null; } break; } if (num2 > num) { break; } i++; num3++; } result = (num2 <= num); } } return(result); }
// Token: 0x06001E94 RID: 7828 RVA: 0x00063DB8 File Offset: 0x00061FB8 public unsafe void method_0() { try { Struct24 @struct = new Struct24(int.MaxValue, int.MaxValue, int.MinValue, int.MinValue); Struct24 struct2 = new Struct24(int.MaxValue, int.MaxValue, int.MinValue, int.MinValue); bool * ptr = stackalloc bool[(UIntPtr)(this.class95_0.rectangle_0.Height * this.class95_0.rectangle_0.Width)]; bool * ptr2 = stackalloc bool[(UIntPtr)(this.class95_0.rectangle_0.Height * this.class95_0.rectangle_0.Width)]; Struct24 *ptr3 = &@struct; Struct24 *ptr4 = &struct2; using (Class125 @class = new Class125(this.bitmap_0)) { using (new Class125.Class153(@class)) { Array[][] array = new Array[this.class95_0.array_0.Length][]; this.class95_0.array_0.CopyTo(array, 0); for (int i = 0; i < this.class95_0.rectangle_0.Height; i++) { Array[] array2 = array[i]; Array[] array3 = array2; int j = 0; while (j < array3.Length) { Array array4 = array3[j]; int k = array4.GetLowerBound(0); int length = array4.GetLength(0); int num = k + length - 1; bool flag = false; if (this.class95_0.bool_0) { Struct33[] array5 = new Struct33[length]; array4.CopyTo(array5, 0); try { Struct33[] array6; Struct33 * ptr5; if ((array6 = array5) != null && array6.Length != 0) { fixed(Struct33 *ptr5 = &array6[0]) { } } else { ptr5 = null; } Struct33 *ptr6 = ptr5; Struct33 *ptr7 = @class.pBase + @class.Width * i + k; bool * ptr8 = ptr + k + (IntPtr)this.class95_0.rectangle_0.Width * (IntPtr)i; while (k <= num) { if (ptr7->A != ptr6->A || ptr7->R != ptr6->R || ptr7->G != ptr6->G || ptr7->B != ptr6->B) { *ptr8 = true; flag = true; if (ptr3->int_0 > k) { ptr3->int_0 = k; } if (ptr3->int_2 < k) { ptr3->int_2 = k; } } ptr7++; ptr6++; ptr8++; k++; } goto IL_3B8; } finally { Struct33 *ptr5 = null; } goto IL_25F; } goto IL_25F; IL_395: j++; continue; IL_36D: if (ptr3->int_1 > i) { ptr3->int_1 = i; } if (ptr3->int_3 < i) { ptr3->int_3 = i; goto IL_395; } goto IL_395; IL_25F: Struct54[] array7 = new Struct54[length]; array4.CopyTo(array7, 0); try { Struct54[] array8; Struct54 * ptr9; if ((array8 = array7) != null && array8.Length != 0) { fixed(Struct54 *ptr9 = &array8[0]) { } } else { ptr9 = null; } Struct54 *ptr10 = ptr9; Struct33 *ptr11 = @class.pBase + @class.Width * i + k; bool * ptr12 = ptr + k + (IntPtr)this.class95_0.rectangle_0.Width * (IntPtr)i; while (k <= num) { if (ptr11->R != ptr10->R || ptr11->G != ptr10->G || ptr11->B != ptr10->B) { *ptr12 = true; flag = true; if (ptr3->int_0 > k) { ptr3->int_0 = k; } if (ptr3->int_2 < k) { ptr3->int_2 = k; } } ptr11++; ptr10++; ptr12++; k++; } goto IL_3B8; } finally { Struct54 *ptr9 = null; } goto IL_36D; IL_3B8: if (flag) { goto IL_36D; } goto IL_395; } if (this.cancellationToken_0.IsCancellationRequested) { return; } } } } for (int l = ptr3->int_1; l < ptr3->int_3; l++) { bool flag2 = false; bool *ptr13 = ptr + ptr3->int_0 + (IntPtr)l * (IntPtr)this.class95_0.rectangle_0.Width; bool *ptr14 = ptr2 + ptr3->int_0 + (IntPtr)l * (IntPtr)this.class95_0.rectangle_0.Width; for (int m = ptr3->int_0; m < ptr3->int_2; m++) { if (*ptr13 && (m + 1 == this.class95_0.rectangle_0.Width || ptr13[1]) && (m == 0 || *(ptr13 - 1)) && (l + 1 == this.class95_0.rectangle_0.Height || ptr13[this.class95_0.rectangle_0.Width]) && (l == 0 || *(ptr13 - this.class95_0.rectangle_0.Width))) { *ptr14 = true; flag2 = true; if (ptr4->int_0 > m) { ptr4->int_0 = m; } if (ptr4->int_2 < m) { ptr4->int_2 = m; } } ptr13++; ptr14++; } if (flag2) { if (ptr4->int_1 > l) { ptr4->int_1 = l; } if (ptr4->int_3 < l) { ptr4->int_3 = l; } } if (this.cancellationToken_0.IsCancellationRequested) { return; } } for (int n = ptr4->int_1; n < ptr4->int_3; n++) { bool *ptr15 = ptr2 + ptr4->int_0 + (IntPtr)n * (IntPtr)this.class95_0.rectangle_0.Width; for (int num2 = ptr4->int_0; num2 < ptr4->int_2; num2++) { if (*ptr15) { Struct24 struct3 = this.class95_0.method_9(ptr15, num2, n); struct3.int_2++; struct3.int_3++; Rectangle rectangle = struct3.method_0(); Size size = rectangle.Size; Class335.smethod_3(Class95 <ColorType> .string_1, new object[] { rectangle }); if (size.Width > this.size_0.Width && size.Height > this.size_0.Height && size.Width < this.size_1.Width && size.Height < this.size_1.Height) { bool flag3 = true; for (int num3 = rectangle.Y; num3 < rectangle.Bottom; num3++) { int[] array9 = this.class95_0.int_1[num3]; if (array9.Length > 0) { foreach (int num5 in array9) { if (num5 >= rectangle.Left && num5 <= rectangle.Right) { flag3 = false; break; } } } else { flag3 = false; } if (!flag3) { break; } if (this.cancellationToken_0.IsCancellationRequested) { return; } } if (flag3) { Rectangle rectangle2 = rectangle.smethod_4(this.class95_0.rectangle_0.X, this.class95_0.rectangle_0.Y); Class335.smethod_3(Class95 <ColorType> .string_0, new object[] { rectangle2 }); this.list_0.Add(rectangle2); } } for (int num6 = struct3.int_1; num6 < struct3.int_3; num6++) { bool *ptr16 = ptr2 + struct3.int_0 + (IntPtr)num6 * (IntPtr)this.class95_0.rectangle_0.Width; for (int num7 = struct3.int_0; num7 < struct3.int_2; num7++) { *ptr16 = false; ptr16++; } } } ptr15++; } if (this.cancellationToken_0.IsCancellationRequested) { break; } } } catch (Exception ex) { this.exception_0 = ex; } }
private void method_3(object object_0, Class125 class125_0) { this.navigateToolScripBody1.Visible = !class125_0.Hide; this.method_4(); }
public override void Visit(Class125 c) { }
public abstract void Visit(Class125 c);