From c4925e3db5174f9cf41aeb5fd6d3e6f793250e46 Mon Sep 17 00:00:00 2001 From: Kurt Date: Wed, 11 Nov 2015 21:49:39 -0800 Subject: [PATCH] Minor tweaks Return bitmap over image --- pk3DS/Structs.cs | 6 +++--- pk3DS/Subforms/MapPermView.Designer.cs | 2 +- pk3DS/Subforms/OWSE.designer.cs | 21 +++------------------ 3 files changed, 7 insertions(+), 22 deletions(-) diff --git a/pk3DS/Structs.cs b/pk3DS/Structs.cs index 3f1e3bc..8995044 100644 --- a/pk3DS/Structs.cs +++ b/pk3DS/Structs.cs @@ -941,7 +941,7 @@ public byte[] Write() } } - public Image Preview(int Scale, int ColorShift) + public Bitmap Preview(int Scale, int ColorShift) { // Require the entries to be defined in order to continue. if (Entries.Any(entry => entry == null)) @@ -950,7 +950,7 @@ public Image Preview(int Scale, int ColorShift) } // Fetch Singular Images first - Image[] EntryImages = new Image[Area]; + Bitmap[] EntryImages = new Bitmap[Area]; for (int i = 0; i < Area; i++) EntryImages[i] = (Entries[i] == null) ? new Bitmap(40 * Scale, 40 * Scale) @@ -995,7 +995,7 @@ public byte[] Write() return ms.ToArray(); } } - public Image Preview(int s, int ColorShift) + public Bitmap Preview(int s, int ColorShift) { Bitmap img = new Bitmap(Width*s, Height*s); for (int i = 0; i < Area; i++) diff --git a/pk3DS/Subforms/MapPermView.Designer.cs b/pk3DS/Subforms/MapPermView.Designer.cs index 8a24a66..253c595 100644 --- a/pk3DS/Subforms/MapPermView.Designer.cs +++ b/pk3DS/Subforms/MapPermView.Designer.cs @@ -80,7 +80,7 @@ private void InitializeComponent() // CHK_AutoDraw // this.CHK_AutoDraw.AutoSize = true; - this.CHK_AutoDraw.Location = new System.Drawing.Point(267, 2); + this.CHK_AutoDraw.Location = new System.Drawing.Point(267, 8); this.CHK_AutoDraw.Name = "CHK_AutoDraw"; this.CHK_AutoDraw.Size = new System.Drawing.Size(76, 17); this.CHK_AutoDraw.TabIndex = 18; diff --git a/pk3DS/Subforms/OWSE.designer.cs b/pk3DS/Subforms/OWSE.designer.cs index a200dc5..03c6b4a 100644 --- a/pk3DS/Subforms/OWSE.designer.cs +++ b/pk3DS/Subforms/OWSE.designer.cs @@ -152,7 +152,6 @@ private void InitializeComponent() this.RTB_OWSC = new System.Windows.Forms.RichTextBox(); this.RTB_Encounter = new System.Windows.Forms.RichTextBox(); this.RTB_MapSC = new System.Windows.Forms.RichTextBox(); - this.tb_Map = new System.Windows.Forms.TabPage(); this.B_Map = new System.Windows.Forms.Button(); this.tb_Dev = new System.Windows.Forms.TabPage(); this.L_DeComp = new System.Windows.Forms.Label(); @@ -218,7 +217,6 @@ private void InitializeComponent() this.tb_Encounters.SuspendLayout(); this.tb_File5.SuspendLayout(); this.tb_RAW.SuspendLayout(); - this.tb_Map.SuspendLayout(); this.tb_Dev.SuspendLayout(); this.SuspendLayout(); // @@ -264,7 +262,6 @@ private void InitializeComponent() this.tabControl1.Controls.Add(this.tb_Encounters); this.tabControl1.Controls.Add(this.tb_File5); this.tabControl1.Controls.Add(this.tb_RAW); - this.tabControl1.Controls.Add(this.tb_Map); this.tabControl1.Controls.Add(this.tb_Dev); this.tabControl1.Location = new System.Drawing.Point(12, 32); this.tabControl1.Name = "tabControl1"; @@ -1630,22 +1627,11 @@ private void InitializeComponent() this.RTB_MapSC.TabIndex = 419; this.RTB_MapSC.Text = "00 11 22 33 44 55 66 77 88 99 AA BB CC DD EE FF"; // - // tb_Map - // - this.tb_Map.Controls.Add(this.B_Map); - this.tb_Map.Location = new System.Drawing.Point(4, 22); - this.tb_Map.Name = "tb_Map"; - this.tb_Map.Padding = new System.Windows.Forms.Padding(3); - this.tb_Map.Size = new System.Drawing.Size(486, 471); - this.tb_Map.TabIndex = 6; - this.tb_Map.Text = "Map Preview"; - this.tb_Map.UseVisualStyleBackColor = true; - // // B_Map // - this.B_Map.Location = new System.Drawing.Point(145, 165); + this.B_Map.Location = new System.Drawing.Point(318, 5); this.B_Map.Name = "B_Map"; - this.B_Map.Size = new System.Drawing.Size(190, 130); + this.B_Map.Size = new System.Drawing.Size(89, 23); this.B_Map.TabIndex = 420; this.B_Map.Text = "Show Map"; this.B_Map.UseVisualStyleBackColor = true; @@ -1793,6 +1779,7 @@ private void InitializeComponent() this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(514, 537); + this.Controls.Add(this.B_Map); this.Controls.Add(this.B_HLCMD); this.Controls.Add(this.L_ZDPreview); this.Controls.Add(this.tabControl1); @@ -1863,7 +1850,6 @@ private void InitializeComponent() this.tb_File5.ResumeLayout(false); this.tb_File5.PerformLayout(); this.tb_RAW.ResumeLayout(false); - this.tb_Map.ResumeLayout(false); this.tb_Dev.ResumeLayout(false); this.tb_Dev.PerformLayout(); this.ResumeLayout(false); @@ -1939,7 +1925,6 @@ private void InitializeComponent() private System.Windows.Forms.RichTextBox RTB_OSP; private System.Windows.Forms.RichTextBox RTB_MSP; private System.Windows.Forms.Button B_HLCMD; - private System.Windows.Forms.TabPage tb_Map; private System.Windows.Forms.GroupBox GB_N; private System.Windows.Forms.NumericUpDown NUD_NModel; private System.Windows.Forms.Label L_NModel;