Successfully implemented manual drawing
This commit is contained in:
2
McBitFont/Form1.Designer.cs
generated
2
McBitFont/Form1.Designer.cs
generated
@@ -70,7 +70,6 @@
|
|||||||
this.dotPanel.Name = "dotPanel";
|
this.dotPanel.Name = "dotPanel";
|
||||||
this.dotPanel.Size = new System.Drawing.Size(593, 518);
|
this.dotPanel.Size = new System.Drawing.Size(593, 518);
|
||||||
this.dotPanel.TabIndex = 0;
|
this.dotPanel.TabIndex = 0;
|
||||||
this.dotPanel.Scroll += new System.Windows.Forms.ScrollEventHandler(this.dotPanel_Scroll);
|
|
||||||
this.dotPanel.Paint += new System.Windows.Forms.PaintEventHandler(this.dotPanel_Paint);
|
this.dotPanel.Paint += new System.Windows.Forms.PaintEventHandler(this.dotPanel_Paint);
|
||||||
this.dotPanel.MouseMove += new System.Windows.Forms.MouseEventHandler(this.dotPanel_MouseMove);
|
this.dotPanel.MouseMove += new System.Windows.Forms.MouseEventHandler(this.dotPanel_MouseMove);
|
||||||
this.dotPanel.Resize += new System.EventHandler(this.cbZoom_SelectedIndexChanged);
|
this.dotPanel.Resize += new System.EventHandler(this.cbZoom_SelectedIndexChanged);
|
||||||
@@ -368,6 +367,7 @@
|
|||||||
//
|
//
|
||||||
this.vScroll.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
this.vScroll.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.vScroll.LargeChange = 25;
|
||||||
this.vScroll.Location = new System.Drawing.Point(608, 12);
|
this.vScroll.Location = new System.Drawing.Point(608, 12);
|
||||||
this.vScroll.Name = "vScroll";
|
this.vScroll.Name = "vScroll";
|
||||||
this.vScroll.Size = new System.Drawing.Size(21, 518);
|
this.vScroll.Size = new System.Drawing.Size(21, 518);
|
||||||
|
@@ -14,6 +14,12 @@ namespace McBitFont {
|
|||||||
public partial class Form1 : Form {
|
public partial class Form1 : Form {
|
||||||
|
|
||||||
struct FrameMiniature {
|
struct FrameMiniature {
|
||||||
|
public FrameMiniature(int cc, int ww, int hh) {
|
||||||
|
code = cc;
|
||||||
|
width = ww;
|
||||||
|
height = hh;
|
||||||
|
data = new bool[ww, hh];
|
||||||
|
}
|
||||||
public int code;
|
public int code;
|
||||||
public int width;
|
public int width;
|
||||||
public int height;
|
public int height;
|
||||||
@@ -26,14 +32,13 @@ namespace McBitFont {
|
|||||||
private int pixelOffset = 5;
|
private int pixelOffset = 5;
|
||||||
private int gap;
|
private int gap;
|
||||||
private int w, h;
|
private int w, h;
|
||||||
//private Panel[,] dots = new Panel[255,255];
|
|
||||||
|
|
||||||
public Form1() {
|
public Form1() {
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
this.dotPanel.MouseWheel += new MouseEventHandler(this.dotPanel_MouseWheel);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Form1_Load(object sender, EventArgs e) {
|
private void Form1_Load(object sender, EventArgs e) {
|
||||||
int i, j;
|
|
||||||
|
|
||||||
dotWidth = (int)nudX.Value;
|
dotWidth = (int)nudX.Value;
|
||||||
dotHeight = (int)nudY.Value;
|
dotHeight = (int)nudY.Value;
|
||||||
@@ -46,24 +51,33 @@ namespace McBitFont {
|
|||||||
cbZoom.SelectedIndex = 3;
|
cbZoom.SelectedIndex = 3;
|
||||||
cbZoom.SelectedIndexChanged += cbZoom_SelectedIndexChanged;
|
cbZoom.SelectedIndexChanged += cbZoom_SelectedIndexChanged;
|
||||||
|
|
||||||
f.code = 1;
|
f = new FrameMiniature(1, dotWidth, dotHeight);
|
||||||
f.width = dotWidth;
|
|
||||||
f.height = dotHeight;
|
|
||||||
f.data = new bool[dotWidth, dotHeight];
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void dot_MouseMove(object sender, MouseEventArgs e) {
|
private void dotPanel_MouseWheel(object sender, MouseEventArgs e) {
|
||||||
//Panel p = (Panel)sender;
|
int t = e.Delta / 120;
|
||||||
|
if (e.Delta == 0) return;
|
||||||
//if (e.Button == MouseButtons.Left && p.BackColor != Color.Black) {
|
if (ModifierKeys.HasFlag(Keys.Shift)) {
|
||||||
// p.BackColor = Color.Black;
|
t += cbZoom.SelectedIndex;
|
||||||
//}
|
if (t > cbZoom.Items.Count - 1) return;
|
||||||
//if (e.Button == MouseButtons.Right && p.BackColor != Color.White) {
|
if (t < 0) return;
|
||||||
// p.BackColor = Color.White;
|
cbZoom.SelectedIndex = t;
|
||||||
//}
|
} else if (ModifierKeys.HasFlag(Keys.Control)) {
|
||||||
//label3.Text = "Over: " + p.Tag;
|
if (hScroll.Enabled) {
|
||||||
//p.Capture = false;
|
t = t * -1 * (cellSize + gap) + hScroll.Value;
|
||||||
|
if (t < hScroll.Minimum) t = hScroll.Minimum;
|
||||||
|
if (t > hScroll.Maximum) t = hScroll.Maximum;
|
||||||
|
hScroll.Value = t;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (vScroll.Enabled) {
|
||||||
|
t = t * -1 * (cellSize + gap) + vScroll.Value;
|
||||||
|
if (t < vScroll.Minimum) t = vScroll.Minimum;
|
||||||
|
if (t > vScroll.Maximum) t = vScroll.Maximum;
|
||||||
|
vScroll.Value = t;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void nudX_ValueChanged(object sender, EventArgs e) {
|
private void nudX_ValueChanged(object sender, EventArgs e) {
|
||||||
@@ -74,40 +88,29 @@ namespace McBitFont {
|
|||||||
dotResize(dotWidth, (int)nudY.Value);
|
dotResize(dotWidth, (int)nudY.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void dotResize(int w, int h) {
|
private void dotResize(int ww, int hh) {
|
||||||
////Width
|
int imax, jmax;
|
||||||
//if (w > dotWidth) {
|
bool[,] t;
|
||||||
// for (int i = dotWidth; i < w; i++) {
|
|
||||||
// for (int j = 0; j < dotHeight; j++) {
|
if (ww < dotWidth) imax = ww;
|
||||||
// dots[i, j] = NewDot(i, j);
|
else imax = dotWidth;
|
||||||
// }
|
if (hh < dotHeight) jmax = hh;
|
||||||
// }
|
else jmax = dotHeight;
|
||||||
//}
|
|
||||||
//if (w < dotWidth) {
|
|
||||||
// for (int i = w; i < dotWidth; i++) {
|
|
||||||
// for (int j = 0; j < dotHeight; j++) {
|
|
||||||
// dots[i, j].Dispose();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
//dotWidth = w;
|
|
||||||
|
|
||||||
////Height
|
f.width = ww;
|
||||||
//if (h > dotHeight) {
|
f.height = hh;
|
||||||
// for (int i = 0; i < dotWidth; i++) {
|
t = new bool[ww, hh];
|
||||||
// for (int j = dotHeight; j < h; j++) {
|
for (int i=0; i<imax; i++) {
|
||||||
// dots[i, j] = NewDot(i, j);
|
for (int j=0; j<jmax; j++) {
|
||||||
// }
|
t[i, j] = f.data[i, j];
|
||||||
// }
|
}
|
||||||
//}
|
}
|
||||||
//if (h < dotHeight) {
|
f.data = t;
|
||||||
// for (int i = 0; i < dotWidth; i++) {
|
dotWidth = ww;
|
||||||
// for (int j = h; j < dotHeight; j++) {
|
dotHeight = hh;
|
||||||
// dots[i, j].Dispose();
|
w = pixelOffset + dotWidth * (cellSize + gap);
|
||||||
// }
|
h = pixelOffset + dotHeight * (cellSize + gap);
|
||||||
// }
|
cbZoom_SelectedIndexChanged(cbZoom, null);
|
||||||
//}
|
|
||||||
//dotHeight = h;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void cbZoom_SelectedIndexChanged(object sender, EventArgs e) {
|
private void cbZoom_SelectedIndexChanged(object sender, EventArgs e) {
|
||||||
@@ -118,6 +121,7 @@ namespace McBitFont {
|
|||||||
h = pixelOffset + dotHeight * (cellSize + gap);
|
h = pixelOffset + dotHeight * (cellSize + gap);
|
||||||
if (w <= dotPanel.Width) {
|
if (w <= dotPanel.Width) {
|
||||||
hScroll.Enabled = false;
|
hScroll.Enabled = false;
|
||||||
|
hScroll.Value = 0;
|
||||||
} else {
|
} else {
|
||||||
hScroll.Maximum = w - dotPanel.Width + 12;
|
hScroll.Maximum = w - dotPanel.Width + 12;
|
||||||
hScroll.Minimum = 0;
|
hScroll.Minimum = 0;
|
||||||
@@ -126,43 +130,44 @@ namespace McBitFont {
|
|||||||
|
|
||||||
if (h <= dotPanel.Height) {
|
if (h <= dotPanel.Height) {
|
||||||
vScroll.Enabled = false;
|
vScroll.Enabled = false;
|
||||||
|
vScroll.Value = 0;
|
||||||
} else {
|
} else {
|
||||||
vScroll.Maximum = h - dotPanel.Height + 12;
|
vScroll.Maximum = h - dotPanel.Height + 12;
|
||||||
vScroll.Minimum = 0;
|
vScroll.Minimum = 0;
|
||||||
vScroll.Enabled = true;
|
vScroll.Enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//dotPanel.
|
dotPanel.Refresh();
|
||||||
//dotPanel.ClientSize = s;
|
|
||||||
dotPanel.Invalidate();
|
|
||||||
//dotScale();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnShiftLeft_Click(object sender, EventArgs e) {
|
private void btnShiftLeft_Click(object sender, EventArgs e) {
|
||||||
//for (int j = 0; j < dotHeight; j++) {
|
bool c;
|
||||||
// Color c = dots[0, j].BackColor;
|
for (int j = 0; j < dotHeight; j++) {
|
||||||
// for (int i = 0; i < dotWidth; i++) {
|
c = f.data[0, j];
|
||||||
// if (i == dotWidth - 1) {
|
for (int i = 0; i < dotWidth; i++) {
|
||||||
// dots[i, j].BackColor = c;
|
if (i == dotWidth - 1) {
|
||||||
// } else {
|
f.data[i, j] = c;
|
||||||
// dots[i, j].BackColor = dots[i+1, j].BackColor;
|
} else {
|
||||||
// }
|
f.data[i, j] = f.data[i + 1, j];
|
||||||
// }
|
}
|
||||||
//}
|
}
|
||||||
|
}
|
||||||
|
dotPanel.Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnShiftRight_Click(object sender, EventArgs e) {
|
private void btnShiftRight_Click(object sender, EventArgs e) {
|
||||||
//for (int j = 0; j < dotHeight; j++) {
|
bool c;
|
||||||
// Color c = dots[dotWidth - 1, j].BackColor;
|
for (int j = 0; j < dotHeight; j++) {
|
||||||
// for (int i = dotWidth-1; i >= 0; i--) {
|
c = f.data[dotWidth - 1, j];
|
||||||
// if (i == 0) {
|
for (int i = dotWidth - 1; i >= 0; i--) {
|
||||||
// dots[i, j].BackColor = c;
|
if (i == 0) {
|
||||||
// } else {
|
f.data[i, j] = c;
|
||||||
// dots[i, j].BackColor = dots[i - 1, j].BackColor;
|
} else {
|
||||||
// }
|
f.data[i, j] = f.data[i - 1, j];
|
||||||
// }
|
}
|
||||||
//}
|
}
|
||||||
|
}
|
||||||
|
dotPanel.Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void dotPanel_MouseMove(object sender, MouseEventArgs e) {
|
private void dotPanel_MouseMove(object sender, MouseEventArgs e) {
|
||||||
@@ -176,7 +181,6 @@ namespace McBitFont {
|
|||||||
Graphics g = dotPanel.CreateGraphics();
|
Graphics g = dotPanel.CreateGraphics();
|
||||||
SolidBrush sbb = new SolidBrush(Color.Black);
|
SolidBrush sbb = new SolidBrush(Color.Black);
|
||||||
f.data[i, j] = true;
|
f.data[i, j] = true;
|
||||||
//dotPanel.Refresh();
|
|
||||||
int x = pixelOffset + i * (cellSize + gap) - hScroll.Value;
|
int x = pixelOffset + i * (cellSize + gap) - hScroll.Value;
|
||||||
int y = pixelOffset + j * (cellSize + gap) - vScroll.Value;
|
int y = pixelOffset + j * (cellSize + gap) - vScroll.Value;
|
||||||
g.FillRectangle(sbb, x, y, cellSize, cellSize);
|
g.FillRectangle(sbb, x, y, cellSize, cellSize);
|
||||||
@@ -185,7 +189,6 @@ namespace McBitFont {
|
|||||||
Graphics g = dotPanel.CreateGraphics();
|
Graphics g = dotPanel.CreateGraphics();
|
||||||
SolidBrush sbw = new SolidBrush(Color.White);
|
SolidBrush sbw = new SolidBrush(Color.White);
|
||||||
f.data[i, j] = false;
|
f.data[i, j] = false;
|
||||||
//dotPanel.Refresh();
|
|
||||||
int x = pixelOffset + i * (cellSize + gap) - hScroll.Value;
|
int x = pixelOffset + i * (cellSize + gap) - hScroll.Value;
|
||||||
int y = pixelOffset + j * (cellSize + gap) - vScroll.Value;
|
int y = pixelOffset + j * (cellSize + gap) - vScroll.Value;
|
||||||
g.FillRectangle(sbw, x, y, cellSize, cellSize);
|
g.FillRectangle(sbw, x, y, cellSize, cellSize);
|
||||||
@@ -194,115 +197,117 @@ namespace McBitFont {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void btnShiftUp_Click(object sender, EventArgs e) {
|
private void btnShiftUp_Click(object sender, EventArgs e) {
|
||||||
//for (int i = 0; i < dotWidth; i++) {
|
bool c;
|
||||||
// Color c = dots[i, 0].BackColor;
|
for (int i = 0; i < dotWidth; i++) {
|
||||||
// for (int j = 0; j < dotHeight; j++) {
|
c = f.data[i, 0];
|
||||||
// if (j == dotHeight - 1) {
|
for (int j = 0; j < dotHeight; j++) {
|
||||||
// dots[i, j].BackColor = c;
|
if (j == dotHeight - 1) {
|
||||||
// } else {
|
f.data[i, j] = c;
|
||||||
// dots[i, j].BackColor = dots[i, j + 1].BackColor;
|
} else {
|
||||||
// }
|
f.data[i, j] = f.data[i, j + 1];
|
||||||
// }
|
}
|
||||||
//}
|
}
|
||||||
|
}
|
||||||
|
dotPanel.Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnShiftDown_Click(object sender, EventArgs e) {
|
private void btnShiftDown_Click(object sender, EventArgs e) {
|
||||||
//for (int i = 0; i < dotWidth; i++) {
|
bool c;
|
||||||
// Color c = dots[i, dotHeight - 1].BackColor;
|
for (int i = 0; i < dotWidth; i++) {
|
||||||
// for (int j = dotHeight-1; j >= 0; j--) {
|
c = f.data[i, dotHeight - 1];
|
||||||
// if (j == 0) {
|
for (int j = dotHeight-1; j >= 0; j--) {
|
||||||
// dots[i, j].BackColor = c;
|
if (j == 0) {
|
||||||
// } else {
|
f.data[i, j] = c;
|
||||||
// dots[i, j].BackColor = dots[i, j - 1].BackColor;
|
} else {
|
||||||
// }
|
f.data[i, j] = f.data[i, j - 1];
|
||||||
// }
|
}
|
||||||
//}
|
}
|
||||||
|
}
|
||||||
|
dotPanel.Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnInvert_Click(object sender, EventArgs e) {
|
private void btnInvert_Click(object sender, EventArgs e) {
|
||||||
//for (int i = 0; i < dotWidth; i++) {
|
for (int i = 0; i < dotWidth; i++) {
|
||||||
// for (int j = 0; j < dotHeight; j++) {
|
for (int j = 0; j < dotHeight; j++) {
|
||||||
// if (dots[i, j].BackColor == Color.White)
|
f.data[i, j] = !f.data[i, j];
|
||||||
// dots[i, j].BackColor = Color.Black;
|
}
|
||||||
// else
|
}
|
||||||
// dots[i, j].BackColor = Color.White;
|
dotPanel.Refresh();
|
||||||
// }
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnMirrorX_Click(object sender, EventArgs e) {
|
private void btnMirrorX_Click(object sender, EventArgs e) {
|
||||||
//int a, b, j;
|
int a, b, j;
|
||||||
//Color c;
|
bool c;
|
||||||
|
|
||||||
//for (j = 0; j < dotHeight; j++) {
|
for (j = 0; j < dotHeight; j++) {
|
||||||
// a = 0;
|
a = 0;
|
||||||
// b = dotWidth - 1;
|
b = dotWidth - 1;
|
||||||
// while (a < b) {
|
while (a < b) {
|
||||||
// c = dots[a, j].BackColor;
|
c = f.data[a, j];
|
||||||
// dots[a, j].BackColor = dots[b, j].BackColor;
|
f.data[a, j] = f.data[b, j];
|
||||||
// dots[b, j].BackColor = c;
|
f.data[b, j] = c;
|
||||||
// a++;
|
a++;
|
||||||
// b--;
|
b--;
|
||||||
// }
|
}
|
||||||
//}
|
}
|
||||||
|
dotPanel.Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnMirrorY_Click(object sender, EventArgs e) {
|
private void btnMirrorY_Click(object sender, EventArgs e) {
|
||||||
//int a, b, i;
|
int a, b, i;
|
||||||
//Color c;
|
bool c;
|
||||||
|
|
||||||
//for (i = 0; i < dotWidth; i++) {
|
for (i = 0; i < dotWidth; i++) {
|
||||||
// a = 0;
|
a = 0;
|
||||||
// b = dotHeight - 1;
|
b = dotHeight - 1;
|
||||||
// while (a < b) {
|
while (a < b) {
|
||||||
// c = dots[i, a].BackColor;
|
c = f.data[i, a];
|
||||||
// dots[i, a].BackColor = dots[i, b].BackColor;
|
f.data[i, a] = f.data[i, b];
|
||||||
// dots[i, b].BackColor = c;
|
f.data[i, b] = c;
|
||||||
// a++;
|
a++;
|
||||||
// b--;
|
b--;
|
||||||
// }
|
}
|
||||||
//}
|
}
|
||||||
|
dotPanel.Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void button1_Click(object sender, EventArgs e) {
|
private void button1_Click(object sender, EventArgs e) {
|
||||||
//for (int i = 0; i < dotWidth; i++) {
|
outBox.Clear();
|
||||||
// for (int j = 0; j < dotHeight; j++) {
|
String str;
|
||||||
// if (dots[i, j].BackColor == Color.Black) f.data[i, j] = true;
|
Byte b = 0;
|
||||||
// else f.data[i, j] = false;
|
for (ushort i = 0; i < dotWidth; i++) {
|
||||||
// }
|
str = "";
|
||||||
//}
|
for (ushort j = 0; j < dotHeight; j++) {
|
||||||
|
if (j % 8 == 0) b = 0;
|
||||||
//outBox.Clear();
|
if (f.data[i, j]) {
|
||||||
//String str;
|
b |= (Byte)(1 << (j % 8));
|
||||||
//Byte b = 0;
|
}
|
||||||
//for (ushort i = 0; i < dotWidth; i++) {
|
if ( ((j + 1) % 8 == 0) || j+1 == dotHeight ) {
|
||||||
// str = "";
|
if (str.Length > 0) str += " ";
|
||||||
// for (ushort j = 0; j < dotHeight; j++) {
|
str += "0x" + Convert.ToString(b, 16).PadLeft(2, '0') + ',';
|
||||||
// if (j % 8 == 0) b = 0;
|
}
|
||||||
// if (f.data[i, j]) {
|
}
|
||||||
// b |= (Byte)(1 << (j % 8));
|
outBox.AppendText(str);
|
||||||
// }
|
outBox.AppendText(Environment.NewLine);
|
||||||
// if ( ((j + 1) % 8 == 0) || j+1 == dotHeight ) {
|
}
|
||||||
// if (str.Length > 0) str += " ";
|
|
||||||
// str += "0x" + Convert.ToString(b, 16).PadLeft(2, '0') + ',';
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// outBox.AppendText(str);
|
|
||||||
// outBox.AppendText(Environment.NewLine);
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void button2_Click(object sender, EventArgs e) {
|
private void button2_Click(object sender, EventArgs e) {
|
||||||
//var bmp = new Bitmap(dotWidth, dotHeight);
|
int picSize = (dotWidth > dotHeight) ? dotWidth : dotHeight;
|
||||||
//for (int i=0; i<dotWidth; i++) {
|
var bmp = new Bitmap(picSize, picSize);
|
||||||
// for (int j=0; j<dotHeight; j++) {
|
Color c;
|
||||||
// bmp.SetPixel(i, j, dots[i, j].BackColor);
|
for (int i=0; i<dotWidth; i++) {
|
||||||
// }
|
for (int j=0; j<dotHeight; j++) {
|
||||||
//}
|
c = f.data[i, j] ? Color.Black : Color.White;
|
||||||
//imageList1.Images.RemoveByKey("32");
|
bmp.SetPixel(i, j, c);
|
||||||
//imageList1.Images.Add("32", (Image)bmp);
|
}
|
||||||
//miniList.Items[0].ImageKey = "32";
|
}
|
||||||
//bmp.Dispose();
|
var sizedBMP = new Bitmap(bmp, new Size(50, 50));
|
||||||
|
imageList1.Images.RemoveByKey("32");
|
||||||
|
imageList1.Images.Add("32", (Image)sizedBMP);
|
||||||
|
miniList.Items[0].ImageKey = "32";
|
||||||
|
bmp.Dispose();
|
||||||
|
sizedBMP.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void dotPanel_Paint(object sender, PaintEventArgs e) {
|
private void dotPanel_Paint(object sender, PaintEventArgs e) {
|
||||||
@@ -322,11 +327,6 @@ namespace McBitFont {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void dotPanel_Scroll(object sender, ScrollEventArgs e) {
|
|
||||||
//dotPanel.Invalidate();
|
|
||||||
dotPanel.Refresh();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void hScroll_ValueChanged(object sender, EventArgs e) {
|
private void hScroll_ValueChanged(object sender, EventArgs e) {
|
||||||
label5.Text = hScroll.Value.ToString();
|
label5.Text = hScroll.Value.ToString();
|
||||||
dotPanel.Refresh();
|
dotPanel.Refresh();
|
||||||
@@ -337,29 +337,5 @@ namespace McBitFont {
|
|||||||
dotPanel.Refresh();
|
dotPanel.Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void dotScale() {
|
|
||||||
//bool large = dotWidth * dotHeight > 12 * 12;
|
|
||||||
|
|
||||||
//if (large) {
|
|
||||||
// pbZoom.Maximum = dotWidth * dotHeight;
|
|
||||||
// pbZoom.Value = 0;
|
|
||||||
// pbZoom.Visible = true;
|
|
||||||
// dotPanel.Visible = false;
|
|
||||||
//}
|
|
||||||
//for (int i = 0; i < dotWidth; i++) {
|
|
||||||
// for (int j = 0; j < dotHeight; j++) {
|
|
||||||
// dots[i, j].Width = cellSize; dots[i, j].Height = cellSize;
|
|
||||||
// dots[i, j].Left = pixelOffset + i * (cellSize + gap);
|
|
||||||
// dots[i, j].Top = pixelOffset + j * (cellSize + gap);
|
|
||||||
// if (large) pbZoom.PerformStep();
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
//if (large) {
|
|
||||||
// dotPanel.Visible = true;
|
|
||||||
// pbZoom.Visible = false;
|
|
||||||
//}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -125,7 +125,7 @@
|
|||||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAA8
|
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAA8
|
||||||
BwAAAk1TRnQBSQFMAwEBAAEoAQABKAEAATIBAAEyAQAE/wEFAQAI/wFCAU0BdgcAAXYDAAEoAwAByAMA
|
BwAAAk1TRnQBSQFMAwEBAAEwAQABMAEAATIBAAEyAQAE/wEFAQAI/wFCAU0BdgcAAXYDAAEoAwAByAMA
|
||||||
ATIDAAEBAQABBAUAAYgBExgAAYACAAGAAwACgAEAAYADAAGAAQABgAEAAoACAAPAAQADgAMAAf8CAAH/
|
ATIDAAEBAQABBAUAAYgBExgAAYACAAGAAwACgAEAAYADAAGAAQABgAEAAoACAAPAAQADgAMAAf8CAAH/
|
||||||
AwAC/wEAAf8DAAH/AQAB/wEAAv8CAAP//wA1AAEPAYgB8AEAAQ8BiAHwAQABDwGIAfBZAAEHAQABgAEA
|
AwAC/wEAAf8DAAH/AQAB/wEAAv8CAAP//wA1AAEPAYgB8AEAAQ8BiAHwAQABDwGIAfBZAAEHAQABgAEA
|
||||||
AQcBAAFwAQABCAEAAXBZAAEHAQABgAEAAQcBAAFwAQABCAEAAXBZAAEHAQABgAEAAQcBAAFwAQABCAEA
|
AQcBAAFwAQABCAEAAXBZAAEHAQABgAEAAQcBAAFwAQABCAEAAXBZAAEHAQABgAEAAQcBAAFwAQABCAEA
|
||||||
|
Reference in New Issue
Block a user