diff --git a/MangaColor/MangaColor/Form1.Designer.cs b/MangaColor/MangaColor/Form1.Designer.cs
index b9ec2bf..d97dd46 100644
--- a/MangaColor/MangaColor/Form1.Designer.cs
+++ b/MangaColor/MangaColor/Form1.Designer.cs
@@ -52,6 +52,7 @@
//
// panel
//
+ this.panel.BackColor = System.Drawing.SystemColors.Control;
this.panel.Controls.Add(this.lb_a);
this.panel.Controls.Add(this.lbHint);
this.panel.Controls.Add(this.lb_b);
@@ -63,24 +64,26 @@
this.panel.Controls.Add(this.cpanel);
this.panel.Location = new System.Drawing.Point(147, 0);
this.panel.Name = "panel";
- this.panel.Size = new System.Drawing.Size(273, 141);
+ this.panel.Size = new System.Drawing.Size(273, 132);
this.panel.TabIndex = 0;
//
// lb_a
//
this.lb_a.AutoSize = true;
+ this.lb_a.Cursor = System.Windows.Forms.Cursors.Hand;
this.lb_a.Font = new System.Drawing.Font("Lucida Console", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lb_a.Location = new System.Drawing.Point(88, 3);
this.lb_a.Name = "lb_a";
this.lb_a.Size = new System.Drawing.Size(55, 13);
this.lb_a.TabIndex = 8;
this.lb_a.Text = "label1";
+ this.lb_a.Click += new System.EventHandler(this.lb_a_Click);
//
// lbHint
//
this.lbHint.Location = new System.Drawing.Point(3, 107);
this.lbHint.Name = "lbHint";
- this.lbHint.Size = new System.Drawing.Size(267, 34);
+ this.lbHint.Size = new System.Drawing.Size(267, 22);
this.lbHint.TabIndex = 4;
this.lbHint.Text = "label1";
this.lbHint.TextAlign = System.Drawing.ContentAlignment.BottomRight;
@@ -88,62 +91,74 @@
// lb_b
//
this.lb_b.AutoSize = true;
+ this.lb_b.Cursor = System.Windows.Forms.Cursors.Hand;
this.lb_b.Font = new System.Drawing.Font("Lucida Console", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lb_b.Location = new System.Drawing.Point(88, 48);
this.lb_b.Name = "lb_b";
this.lb_b.Size = new System.Drawing.Size(55, 13);
this.lb_b.TabIndex = 7;
this.lb_b.Text = "label1";
+ this.lb_b.Click += new System.EventHandler(this.lb_a_Click);
//
// lb_g
//
this.lb_g.AutoSize = true;
+ this.lb_g.Cursor = System.Windows.Forms.Cursors.Hand;
this.lb_g.Font = new System.Drawing.Font("Lucida Console", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lb_g.Location = new System.Drawing.Point(88, 33);
this.lb_g.Name = "lb_g";
this.lb_g.Size = new System.Drawing.Size(55, 13);
this.lb_g.TabIndex = 6;
this.lb_g.Text = "label1";
+ this.lb_g.Click += new System.EventHandler(this.lb_a_Click);
//
// lb_r
//
this.lb_r.AutoSize = true;
+ this.lb_r.Cursor = System.Windows.Forms.Cursors.Hand;
this.lb_r.Font = new System.Drawing.Font("Lucida Console", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lb_r.Location = new System.Drawing.Point(88, 18);
this.lb_r.Name = "lb_r";
this.lb_r.Size = new System.Drawing.Size(55, 13);
this.lb_r.TabIndex = 5;
this.lb_r.Text = "label1";
+ this.lb_r.Click += new System.EventHandler(this.lb_a_Click);
//
// lb_cs
//
this.lb_cs.AutoSize = true;
+ this.lb_cs.Cursor = System.Windows.Forms.Cursors.Hand;
this.lb_cs.Font = new System.Drawing.Font("Lucida Console", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lb_cs.Location = new System.Drawing.Point(3, 94);
this.lb_cs.Name = "lb_cs";
this.lb_cs.Size = new System.Drawing.Size(55, 13);
this.lb_cs.TabIndex = 3;
this.lb_cs.Text = "label1";
+ this.lb_cs.Click += new System.EventHandler(this.lb_a_Click);
//
// lb_html2
//
this.lb_html2.AutoSize = true;
+ this.lb_html2.Cursor = System.Windows.Forms.Cursors.Hand;
this.lb_html2.Font = new System.Drawing.Font("Lucida Console", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lb_html2.Location = new System.Drawing.Point(3, 79);
this.lb_html2.Name = "lb_html2";
this.lb_html2.Size = new System.Drawing.Size(55, 13);
this.lb_html2.TabIndex = 2;
this.lb_html2.Text = "label1";
+ this.lb_html2.Click += new System.EventHandler(this.lb_a_Click);
//
// lb_html
//
this.lb_html.AutoSize = true;
+ this.lb_html.Cursor = System.Windows.Forms.Cursors.Hand;
this.lb_html.Font = new System.Drawing.Font("Lucida Console", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lb_html.Location = new System.Drawing.Point(3, 64);
this.lb_html.Name = "lb_html";
this.lb_html.Size = new System.Drawing.Size(55, 13);
this.lb_html.TabIndex = 1;
this.lb_html.Text = "label1";
+ this.lb_html.Click += new System.EventHandler(this.lb_a_Click);
//
// cpanel
//
@@ -157,12 +172,15 @@
// Form1
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
+ this.BackColor = System.Drawing.SystemColors.WindowFrame;
this.ClientSize = new System.Drawing.Size(560, 174);
this.Controls.Add(this.panel);
+ this.DoubleBuffered = true;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.Name = "Form1";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "MangaColor 3 (C) XWolf 2012-2015";
this.Load += new System.EventHandler(this.Form1_Load);
this.Paint += new System.Windows.Forms.PaintEventHandler(this.Form1_Paint);
diff --git a/MangaColor/MangaColor/Form1.cs b/MangaColor/MangaColor/Form1.cs
index d312231..d8a43ca 100644
--- a/MangaColor/MangaColor/Form1.cs
+++ b/MangaColor/MangaColor/Form1.cs
@@ -12,7 +12,7 @@
{
public partial class Form1 : Form
{
- private const int TTLMAX = 15;
+ private const int TTLMAX = 10;
private int ttl;
private Point amouse;
private int sz = 17;
@@ -76,7 +76,10 @@
for (int x = 0; x < szm; x++)
{
int dist = (int)((Math.Sqrt(Math.Pow(x - c, 2) + Math.Pow(y - c, 2)) * 300) / c);
- if (dist > 255)
+ dist -= 100;
+ if (dist < 0)
+ dist = 0;
+ else if (dist > 255)
dist = 255;
nmask[x, y] = (byte)(255 - dist);
}
@@ -110,8 +113,11 @@
else
{
lb_html.Text = "HTML:" + cl_html;
+ lb_html.Tag = cl_html;
lb_html2.Text = "HTML:" + cl_html2;
+ lb_html2.Tag = cl_html2;
lb_cs.Text = "C#:" + cl_cs;
+ lb_cs.Tag = cl_cs;
lb_a.Text = "A: " + XA + "(" + cl.A + ")";
lb_r.Text = "R: " + XR + "(" + cl.R + ")";
lb_g.Text = "G: " + XG + "(" + cl.G + ")";
@@ -178,7 +184,13 @@
for (int x = 0; x < szm; x++)
{
int posalpha = (((y * szm) + x) * 4) + 3;
+ //int posr = (((y * szm) + x) * 4) + 2;
+ //int posg = (((y * szm) + x) * 4) + 1;
+ //int posb = (((y * szm) + x) * 4) + 0;
*(p0 + posalpha) = (byte)(mask[x, y] * (*(p0 + posalpha)) / 255);
+ //*(p0 + posr) = (byte)(mask[x, y] * (*(p0 + posalpha)) / 255);
+ //*(p0 + posg) = (byte)(mask[x, y] * (*(p0 + posalpha)) / 255);
+ //*(p0 + posb) = (byte)(mask[x, y] * (*(p0 + posalpha)) / 255);
}
}
bmp.UnlockBits(bdata);
@@ -194,6 +206,8 @@
else
{
Point src = MouseScreenPosition(szh - 1);
+ int offx = 2;
+ int offy = 7;
using (Bitmap bmp = CaptureImage(src))
{
if (auto)
@@ -202,14 +216,14 @@
{
using (Bitmap blur = ZoomImage(bmp, InterpolationMode.HighQualityBilinear))
{
- bg.DrawImage(blur, 0, 0, szm, szm);
+ bg.DrawImage(blur, offx, offy, szm, szm);
}
using (Bitmap clear = ZoomImage(bmp, InterpolationMode.NearestNeighbor))
{
MaskImage(clear, nmask);
- bg.DrawImage(clear, 0, 0, szm, szm);
+ bg.DrawImage(clear, offx, offy, szm, szm);
}
- bg.DrawImage(mask, 0, 0, szm, szm);
+ bg.DrawImage(mask, offx, offy, szm, szm);
}
}
}
@@ -277,5 +291,13 @@
}
}
}
+
+ private void lb_a_Click(object sender, EventArgs e)
+ {
+ Label lbl = sender as Label;
+ if (lbl == null)
+ return;
+ Clipboard.SetText(lbl.Tag is string ? (string)lbl.Tag : lbl.Text);
+ }
}
}
diff --git a/MangaColor/MangaColor/MangaColor.csproj b/MangaColor/MangaColor/MangaColor.csproj
index 5fecce7..bd948ef 100644
--- a/MangaColor/MangaColor/MangaColor.csproj
+++ b/MangaColor/MangaColor/MangaColor.csproj
@@ -9,7 +9,7 @@
WinExe
Properties
MangaColor2
- MangaColor2
+ MangaColor3
v2.0
512
mag2.ico