Compare commits
15 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
7db0b6d76e | ||
|
2930c42260 | ||
|
ace97302f2 | ||
|
ad15f08233 | ||
|
64531aecf0 | ||
|
4dd4743b21 | ||
|
686ff7b780 | ||
|
30729aca2f | ||
|
6cbc206260 | ||
d70d8d8a3c | |||
e5a4baadb7 | |||
37abcf2c8e | |||
2c2a8d6158 | |||
|
4115455a54 | ||
67be566605 |
@@ -233,7 +233,9 @@ namespace McBitFont {
|
|||||||
if (com && lines != 1 && fcount > 1) {
|
if (com && lines != 1 && fcount > 1) {
|
||||||
// Comments enabled and other than "1 symbol per line" selected
|
// Comments enabled and other than "1 symbol per line" selected
|
||||||
// Print a symbol comment before its data
|
// Print a symbol comment before its data
|
||||||
output += " // " + f.code.ToString() + " --> " + mainForm.DecodeSymbol(f.code) + "\n";
|
output += " // " + f.code.ToString() + " --> " + mainForm.DecodeSymbol(f.code);
|
||||||
|
if (f.note != "" && f.note != null) output += " (" + f.note.ToString() + ")";
|
||||||
|
output += "\n";
|
||||||
}
|
}
|
||||||
if (lines == 1) {
|
if (lines == 1) {
|
||||||
// "1 symbol per line" - new line offset
|
// "1 symbol per line" - new line offset
|
||||||
@@ -370,6 +372,7 @@ namespace McBitFont {
|
|||||||
if (com && fcount > 1) {
|
if (com && fcount > 1) {
|
||||||
//...with a comment
|
//...with a comment
|
||||||
output += " // " + f.code.ToString() + " --> " + mainForm.DecodeSymbol(f.code);
|
output += " // " + f.code.ToString() + " --> " + mainForm.DecodeSymbol(f.code);
|
||||||
|
if (f.note != "" && f.note != null) output += " (" + f.note.ToString() + ")";
|
||||||
}
|
}
|
||||||
output += "\n";
|
output += "\n";
|
||||||
}
|
}
|
||||||
|
109
McBitFont/Form1.Designer.cs
generated
@@ -34,6 +34,7 @@
|
|||||||
cbZoom = new System.Windows.Forms.ComboBox();
|
cbZoom = new System.Windows.Forms.ComboBox();
|
||||||
label4 = new System.Windows.Forms.Label();
|
label4 = new System.Windows.Forms.Label();
|
||||||
panel1 = new System.Windows.Forms.Panel();
|
panel1 = new System.Windows.Forms.Panel();
|
||||||
|
tbFrameNote = new System.Windows.Forms.TextBox();
|
||||||
btnFill = new System.Windows.Forms.Button();
|
btnFill = new System.Windows.Forms.Button();
|
||||||
btnClear = new System.Windows.Forms.Button();
|
btnClear = new System.Windows.Forms.Button();
|
||||||
btnMirrorY = new System.Windows.Forms.Button();
|
btnMirrorY = new System.Windows.Forms.Button();
|
||||||
@@ -69,6 +70,7 @@
|
|||||||
importImageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
importImageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
exportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
exportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
exportFontLayoutPNGToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
exportFontLayoutPNGToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
frameScreenshotToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
|
toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
@@ -122,6 +124,10 @@
|
|||||||
pnlRightButtons = new System.Windows.Forms.Panel();
|
pnlRightButtons = new System.Windows.Forms.Panel();
|
||||||
lblBrush = new System.Windows.Forms.Label();
|
lblBrush = new System.Windows.Forms.Label();
|
||||||
pnlInfo = new System.Windows.Forms.Panel();
|
pnlInfo = new System.Windows.Forms.Panel();
|
||||||
|
cmBaseline = new System.Windows.Forms.ContextMenuStrip(components);
|
||||||
|
tsmiTopline = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
tsmiMidline = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
tsmiBaseline = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
((System.ComponentModel.ISupportInitialize)nudX).BeginInit();
|
((System.ComponentModel.ISupportInitialize)nudX).BeginInit();
|
||||||
((System.ComponentModel.ISupportInitialize)nudY).BeginInit();
|
((System.ComponentModel.ISupportInitialize)nudY).BeginInit();
|
||||||
panel1.SuspendLayout();
|
panel1.SuspendLayout();
|
||||||
@@ -130,6 +136,7 @@
|
|||||||
((System.ComponentModel.ISupportInitialize)nudBrush).BeginInit();
|
((System.ComponentModel.ISupportInitialize)nudBrush).BeginInit();
|
||||||
pnlRightButtons.SuspendLayout();
|
pnlRightButtons.SuspendLayout();
|
||||||
pnlInfo.SuspendLayout();
|
pnlInfo.SuspendLayout();
|
||||||
|
cmBaseline.SuspendLayout();
|
||||||
SuspendLayout();
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// dotPanel
|
// dotPanel
|
||||||
@@ -230,7 +237,7 @@
|
|||||||
// panel1
|
// panel1
|
||||||
//
|
//
|
||||||
panel1.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
|
panel1.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
|
||||||
panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
panel1.Controls.Add(tbFrameNote);
|
||||||
panel1.Controls.Add(btnFill);
|
panel1.Controls.Add(btnFill);
|
||||||
panel1.Controls.Add(btnClear);
|
panel1.Controls.Add(btnClear);
|
||||||
panel1.Controls.Add(btnMirrorY);
|
panel1.Controls.Add(btnMirrorY);
|
||||||
@@ -240,17 +247,28 @@
|
|||||||
panel1.Controls.Add(btnShiftUp);
|
panel1.Controls.Add(btnShiftUp);
|
||||||
panel1.Controls.Add(btnShiftRight);
|
panel1.Controls.Add(btnShiftRight);
|
||||||
panel1.Controls.Add(btnShiftLeft);
|
panel1.Controls.Add(btnShiftLeft);
|
||||||
panel1.Location = new System.Drawing.Point(472, 31);
|
panel1.Location = new System.Drawing.Point(472, 24);
|
||||||
panel1.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
panel1.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
panel1.Name = "panel1";
|
panel1.Name = "panel1";
|
||||||
panel1.Size = new System.Drawing.Size(140, 139);
|
panel1.Size = new System.Drawing.Size(140, 154);
|
||||||
panel1.TabIndex = 9;
|
panel1.TabIndex = 9;
|
||||||
//
|
//
|
||||||
|
// tbFrameNote
|
||||||
|
//
|
||||||
|
tbFrameNote.Location = new System.Drawing.Point(7, 127);
|
||||||
|
tbFrameNote.Name = "tbFrameNote";
|
||||||
|
tbFrameNote.PlaceholderText = "Frame note";
|
||||||
|
tbFrameNote.Size = new System.Drawing.Size(119, 23);
|
||||||
|
tbFrameNote.TabIndex = 9;
|
||||||
|
toolTip1.SetToolTip(tbFrameNote, "Frame note");
|
||||||
|
tbFrameNote.WordWrap = false;
|
||||||
|
tbFrameNote.TextChanged += tbFrameNote_TextChanged;
|
||||||
|
//
|
||||||
// btnFill
|
// btnFill
|
||||||
//
|
//
|
||||||
btnFill.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
btnFill.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
||||||
btnFill.Image = Properties.Resources.Canvas_Fill;
|
btnFill.Image = Properties.Resources.Canvas_Fill;
|
||||||
btnFill.Location = new System.Drawing.Point(92, 9);
|
btnFill.Location = new System.Drawing.Point(91, 3);
|
||||||
btnFill.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
btnFill.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
btnFill.Name = "btnFill";
|
btnFill.Name = "btnFill";
|
||||||
btnFill.Size = new System.Drawing.Size(35, 35);
|
btnFill.Size = new System.Drawing.Size(35, 35);
|
||||||
@@ -263,7 +281,7 @@
|
|||||||
//
|
//
|
||||||
btnClear.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
btnClear.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
||||||
btnClear.Image = Properties.Resources.Canvas_Clear;
|
btnClear.Image = Properties.Resources.Canvas_Clear;
|
||||||
btnClear.Location = new System.Drawing.Point(8, 9);
|
btnClear.Location = new System.Drawing.Point(7, 3);
|
||||||
btnClear.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
btnClear.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
btnClear.Name = "btnClear";
|
btnClear.Name = "btnClear";
|
||||||
btnClear.Size = new System.Drawing.Size(35, 35);
|
btnClear.Size = new System.Drawing.Size(35, 35);
|
||||||
@@ -276,7 +294,7 @@
|
|||||||
//
|
//
|
||||||
btnMirrorY.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
btnMirrorY.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
||||||
btnMirrorY.Image = Properties.Resources.Famfamfam_Silk_Shape_flip_vertical_16;
|
btnMirrorY.Image = Properties.Resources.Famfamfam_Silk_Shape_flip_vertical_16;
|
||||||
btnMirrorY.Location = new System.Drawing.Point(92, 92);
|
btnMirrorY.Location = new System.Drawing.Point(91, 86);
|
||||||
btnMirrorY.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
btnMirrorY.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
btnMirrorY.Name = "btnMirrorY";
|
btnMirrorY.Name = "btnMirrorY";
|
||||||
btnMirrorY.Size = new System.Drawing.Size(35, 35);
|
btnMirrorY.Size = new System.Drawing.Size(35, 35);
|
||||||
@@ -289,7 +307,7 @@
|
|||||||
//
|
//
|
||||||
btnMirrorX.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
btnMirrorX.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
||||||
btnMirrorX.Image = Properties.Resources.Famfamfam_Silk_Shape_flip_horizontal_16;
|
btnMirrorX.Image = Properties.Resources.Famfamfam_Silk_Shape_flip_horizontal_16;
|
||||||
btnMirrorX.Location = new System.Drawing.Point(50, 92);
|
btnMirrorX.Location = new System.Drawing.Point(49, 86);
|
||||||
btnMirrorX.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
btnMirrorX.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
btnMirrorX.Name = "btnMirrorX";
|
btnMirrorX.Name = "btnMirrorX";
|
||||||
btnMirrorX.Size = new System.Drawing.Size(35, 35);
|
btnMirrorX.Size = new System.Drawing.Size(35, 35);
|
||||||
@@ -302,7 +320,7 @@
|
|||||||
//
|
//
|
||||||
btnInvert.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
btnInvert.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
||||||
btnInvert.Image = Properties.Resources.z_contrast;
|
btnInvert.Image = Properties.Resources.z_contrast;
|
||||||
btnInvert.Location = new System.Drawing.Point(8, 92);
|
btnInvert.Location = new System.Drawing.Point(7, 86);
|
||||||
btnInvert.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
btnInvert.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
btnInvert.Name = "btnInvert";
|
btnInvert.Name = "btnInvert";
|
||||||
btnInvert.Size = new System.Drawing.Size(35, 35);
|
btnInvert.Size = new System.Drawing.Size(35, 35);
|
||||||
@@ -315,7 +333,7 @@
|
|||||||
//
|
//
|
||||||
btnShiftDown.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
btnShiftDown.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
||||||
btnShiftDown.Image = Properties.Resources.z_down;
|
btnShiftDown.Image = Properties.Resources.z_down;
|
||||||
btnShiftDown.Location = new System.Drawing.Point(50, 51);
|
btnShiftDown.Location = new System.Drawing.Point(49, 45);
|
||||||
btnShiftDown.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
btnShiftDown.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
btnShiftDown.Name = "btnShiftDown";
|
btnShiftDown.Name = "btnShiftDown";
|
||||||
btnShiftDown.Size = new System.Drawing.Size(35, 35);
|
btnShiftDown.Size = new System.Drawing.Size(35, 35);
|
||||||
@@ -328,7 +346,7 @@
|
|||||||
//
|
//
|
||||||
btnShiftUp.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
btnShiftUp.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
||||||
btnShiftUp.Image = Properties.Resources.z_uo;
|
btnShiftUp.Image = Properties.Resources.z_uo;
|
||||||
btnShiftUp.Location = new System.Drawing.Point(50, 9);
|
btnShiftUp.Location = new System.Drawing.Point(49, 3);
|
||||||
btnShiftUp.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
btnShiftUp.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
btnShiftUp.Name = "btnShiftUp";
|
btnShiftUp.Name = "btnShiftUp";
|
||||||
btnShiftUp.Size = new System.Drawing.Size(35, 35);
|
btnShiftUp.Size = new System.Drawing.Size(35, 35);
|
||||||
@@ -341,7 +359,7 @@
|
|||||||
//
|
//
|
||||||
btnShiftRight.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
btnShiftRight.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
||||||
btnShiftRight.Image = Properties.Resources.z_right;
|
btnShiftRight.Image = Properties.Resources.z_right;
|
||||||
btnShiftRight.Location = new System.Drawing.Point(92, 51);
|
btnShiftRight.Location = new System.Drawing.Point(91, 45);
|
||||||
btnShiftRight.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
btnShiftRight.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
btnShiftRight.Name = "btnShiftRight";
|
btnShiftRight.Name = "btnShiftRight";
|
||||||
btnShiftRight.Size = new System.Drawing.Size(35, 35);
|
btnShiftRight.Size = new System.Drawing.Size(35, 35);
|
||||||
@@ -354,7 +372,7 @@
|
|||||||
//
|
//
|
||||||
btnShiftLeft.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
btnShiftLeft.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
||||||
btnShiftLeft.Image = Properties.Resources.z_left;
|
btnShiftLeft.Image = Properties.Resources.z_left;
|
||||||
btnShiftLeft.Location = new System.Drawing.Point(8, 51);
|
btnShiftLeft.Location = new System.Drawing.Point(7, 45);
|
||||||
btnShiftLeft.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
btnShiftLeft.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
btnShiftLeft.Name = "btnShiftLeft";
|
btnShiftLeft.Name = "btnShiftLeft";
|
||||||
btnShiftLeft.Size = new System.Drawing.Size(35, 35);
|
btnShiftLeft.Size = new System.Drawing.Size(35, 35);
|
||||||
@@ -391,6 +409,7 @@
|
|||||||
miniList.MultiSelect = false;
|
miniList.MultiSelect = false;
|
||||||
miniList.Name = "miniList";
|
miniList.Name = "miniList";
|
||||||
miniList.ShowGroups = false;
|
miniList.ShowGroups = false;
|
||||||
|
miniList.ShowItemToolTips = true;
|
||||||
miniList.Size = new System.Drawing.Size(427, 455);
|
miniList.Size = new System.Drawing.Size(427, 455);
|
||||||
miniList.SmallImageList = ilMiniatures;
|
miniList.SmallImageList = ilMiniatures;
|
||||||
miniList.Sorting = System.Windows.Forms.SortOrder.Ascending;
|
miniList.Sorting = System.Windows.Forms.SortOrder.Ascending;
|
||||||
@@ -543,7 +562,7 @@
|
|||||||
//
|
//
|
||||||
// fileToolStripMenuItem
|
// fileToolStripMenuItem
|
||||||
//
|
//
|
||||||
fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { newToolStripMenuItem, openToolStripMenuItem, saveToolStripMenuItem, saveAsToolStripMenuItem, toolStripSeparator1, importTextToolStripMenuItem1, importImageToolStripMenuItem, exportToolStripMenuItem, exportFontLayoutPNGToolStripMenuItem, toolStripSeparator2, exitToolStripMenuItem });
|
fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { newToolStripMenuItem, openToolStripMenuItem, saveToolStripMenuItem, saveAsToolStripMenuItem, toolStripSeparator1, importTextToolStripMenuItem1, importImageToolStripMenuItem, exportToolStripMenuItem, exportFontLayoutPNGToolStripMenuItem, frameScreenshotToolStripMenuItem, toolStripSeparator2, exitToolStripMenuItem });
|
||||||
fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||||
fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
|
fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
|
||||||
fileToolStripMenuItem.Text = "File";
|
fileToolStripMenuItem.Text = "File";
|
||||||
@@ -628,13 +647,23 @@
|
|||||||
//
|
//
|
||||||
// exportFontLayoutPNGToolStripMenuItem
|
// exportFontLayoutPNGToolStripMenuItem
|
||||||
//
|
//
|
||||||
exportFontLayoutPNGToolStripMenuItem.Image = Properties.Resources.picture_go;
|
exportFontLayoutPNGToolStripMenuItem.Image = Properties.Resources.picture_save;
|
||||||
exportFontLayoutPNGToolStripMenuItem.Name = "exportFontLayoutPNGToolStripMenuItem";
|
exportFontLayoutPNGToolStripMenuItem.Name = "exportFontLayoutPNGToolStripMenuItem";
|
||||||
exportFontLayoutPNGToolStripMenuItem.Size = new System.Drawing.Size(224, 22);
|
exportFontLayoutPNGToolStripMenuItem.Size = new System.Drawing.Size(224, 22);
|
||||||
exportFontLayoutPNGToolStripMenuItem.Text = "Export font layout PNG";
|
exportFontLayoutPNGToolStripMenuItem.Text = "Export font layout PNG";
|
||||||
exportFontLayoutPNGToolStripMenuItem.ToolTipText = "Create an image with all a table showing all 256 symbols";
|
exportFontLayoutPNGToolStripMenuItem.ToolTipText = "Create an image with all a table showing all 256 symbols";
|
||||||
exportFontLayoutPNGToolStripMenuItem.Click += ExportPNG;
|
exportFontLayoutPNGToolStripMenuItem.Click += ExportPNG;
|
||||||
//
|
//
|
||||||
|
// frameScreenshotToolStripMenuItem
|
||||||
|
//
|
||||||
|
frameScreenshotToolStripMenuItem.Image = Properties.Resources.picture_go;
|
||||||
|
frameScreenshotToolStripMenuItem.Name = "frameScreenshotToolStripMenuItem";
|
||||||
|
frameScreenshotToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.P;
|
||||||
|
frameScreenshotToolStripMenuItem.Size = new System.Drawing.Size(224, 22);
|
||||||
|
frameScreenshotToolStripMenuItem.Text = "Frame Screenshot";
|
||||||
|
frameScreenshotToolStripMenuItem.ToolTipText = "Make a screenshot of the current frame and save it to a file or copy to clipboard";
|
||||||
|
frameScreenshotToolStripMenuItem.Click += frameScreenshotToolStripMenuItem_Click;
|
||||||
|
//
|
||||||
// toolStripSeparator2
|
// toolStripSeparator2
|
||||||
//
|
//
|
||||||
toolStripSeparator2.Name = "toolStripSeparator2";
|
toolStripSeparator2.Name = "toolStripSeparator2";
|
||||||
@@ -997,18 +1026,18 @@
|
|||||||
//
|
//
|
||||||
// btnBaseline
|
// btnBaseline
|
||||||
//
|
//
|
||||||
btnBaseline.Image = Properties.Resources.fam_base;
|
btnBaseline.Image = Properties.Resources.fam_lines;
|
||||||
btnBaseline.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
|
|
||||||
btnBaseline.Location = new System.Drawing.Point(94, 81);
|
btnBaseline.Location = new System.Drawing.Point(94, 81);
|
||||||
btnBaseline.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
btnBaseline.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
btnBaseline.Name = "btnBaseline";
|
btnBaseline.Name = "btnBaseline";
|
||||||
btnBaseline.Size = new System.Drawing.Size(88, 27);
|
btnBaseline.Size = new System.Drawing.Size(88, 27);
|
||||||
btnBaseline.TabIndex = 18;
|
btnBaseline.TabIndex = 18;
|
||||||
btnBaseline.Text = " Baseline";
|
btnBaseline.Text = " Lines";
|
||||||
btnBaseline.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
btnBaseline.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||||
toolTip1.SetToolTip(btnBaseline, "Set irtual base line for the font");
|
toolTip1.SetToolTip(btnBaseline, "Set irtual base lines for the font");
|
||||||
btnBaseline.UseVisualStyleBackColor = true;
|
btnBaseline.UseVisualStyleBackColor = true;
|
||||||
btnBaseline.Click += btnBaseline_Click;
|
btnBaseline.Click += btnBaseline_Click;
|
||||||
|
btnBaseline.Paint += btnBaseline_Paint;
|
||||||
//
|
//
|
||||||
// toolTip1
|
// toolTip1
|
||||||
//
|
//
|
||||||
@@ -1183,6 +1212,39 @@
|
|||||||
pnlInfo.Size = new System.Drawing.Size(103, 154);
|
pnlInfo.Size = new System.Drawing.Size(103, 154);
|
||||||
pnlInfo.TabIndex = 28;
|
pnlInfo.TabIndex = 28;
|
||||||
//
|
//
|
||||||
|
// cmBaseline
|
||||||
|
//
|
||||||
|
cmBaseline.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { tsmiTopline, tsmiMidline, tsmiBaseline });
|
||||||
|
cmBaseline.Name = "cmBaseline";
|
||||||
|
cmBaseline.Size = new System.Drawing.Size(181, 92);
|
||||||
|
//
|
||||||
|
// tsmiTopline
|
||||||
|
//
|
||||||
|
tsmiTopline.Image = Properties.Resources.fam_top;
|
||||||
|
tsmiTopline.Name = "tsmiTopline";
|
||||||
|
tsmiTopline.Size = new System.Drawing.Size(180, 22);
|
||||||
|
tsmiTopline.Text = "Top line";
|
||||||
|
tsmiTopline.ToolTipText = "Set top base line";
|
||||||
|
tsmiTopline.Click += tsmiTopline_Click;
|
||||||
|
//
|
||||||
|
// tsmiMidline
|
||||||
|
//
|
||||||
|
tsmiMidline.Image = Properties.Resources.fam_mid;
|
||||||
|
tsmiMidline.Name = "tsmiMidline";
|
||||||
|
tsmiMidline.Size = new System.Drawing.Size(180, 22);
|
||||||
|
tsmiMidline.Text = "Mid line";
|
||||||
|
tsmiMidline.ToolTipText = "Set middle base line";
|
||||||
|
tsmiMidline.Click += tsmiMidline_Click;
|
||||||
|
//
|
||||||
|
// tsmiBaseline
|
||||||
|
//
|
||||||
|
tsmiBaseline.Image = Properties.Resources.fam_base;
|
||||||
|
tsmiBaseline.Name = "tsmiBaseline";
|
||||||
|
tsmiBaseline.Size = new System.Drawing.Size(180, 22);
|
||||||
|
tsmiBaseline.Text = "Base line";
|
||||||
|
tsmiBaseline.ToolTipText = "Set bottom (base) line";
|
||||||
|
tsmiBaseline.Click += tsmiBaseline_Click;
|
||||||
|
//
|
||||||
// MainForm
|
// MainForm
|
||||||
//
|
//
|
||||||
AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||||
@@ -1197,6 +1259,7 @@
|
|||||||
Controls.Add(dotPanel);
|
Controls.Add(dotPanel);
|
||||||
Controls.Add(menuStrip1);
|
Controls.Add(menuStrip1);
|
||||||
Icon = (System.Drawing.Icon)resources.GetObject("$this.Icon");
|
Icon = (System.Drawing.Icon)resources.GetObject("$this.Icon");
|
||||||
|
KeyPreview = true;
|
||||||
MainMenuStrip = menuStrip1;
|
MainMenuStrip = menuStrip1;
|
||||||
Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
MinimumSize = new System.Drawing.Size(931, 686);
|
MinimumSize = new System.Drawing.Size(931, 686);
|
||||||
@@ -1205,9 +1268,12 @@
|
|||||||
Text = "McBitFont";
|
Text = "McBitFont";
|
||||||
FormClosing += MainForm_FormClosing;
|
FormClosing += MainForm_FormClosing;
|
||||||
Load += Form1_Load;
|
Load += Form1_Load;
|
||||||
|
KeyDown += MainForm_KeyDown;
|
||||||
|
KeyUp += MainForm_KeyUp;
|
||||||
((System.ComponentModel.ISupportInitialize)nudX).EndInit();
|
((System.ComponentModel.ISupportInitialize)nudX).EndInit();
|
||||||
((System.ComponentModel.ISupportInitialize)nudY).EndInit();
|
((System.ComponentModel.ISupportInitialize)nudY).EndInit();
|
||||||
panel1.ResumeLayout(false);
|
panel1.ResumeLayout(false);
|
||||||
|
panel1.PerformLayout();
|
||||||
cmMinilist.ResumeLayout(false);
|
cmMinilist.ResumeLayout(false);
|
||||||
menuStrip1.ResumeLayout(false);
|
menuStrip1.ResumeLayout(false);
|
||||||
menuStrip1.PerformLayout();
|
menuStrip1.PerformLayout();
|
||||||
@@ -1216,6 +1282,7 @@
|
|||||||
pnlRightButtons.PerformLayout();
|
pnlRightButtons.PerformLayout();
|
||||||
pnlInfo.ResumeLayout(false);
|
pnlInfo.ResumeLayout(false);
|
||||||
pnlInfo.PerformLayout();
|
pnlInfo.PerformLayout();
|
||||||
|
cmBaseline.ResumeLayout(false);
|
||||||
ResumeLayout(false);
|
ResumeLayout(false);
|
||||||
PerformLayout();
|
PerformLayout();
|
||||||
|
|
||||||
@@ -1320,6 +1387,12 @@
|
|||||||
private System.Windows.Forms.ToolStripMenuItem zerofyWidthToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem zerofyWidthToolStripMenuItem;
|
||||||
public System.Windows.Forms.NumericUpDown nudBrush;
|
public System.Windows.Forms.NumericUpDown nudBrush;
|
||||||
private System.Windows.Forms.Label lblBrush;
|
private System.Windows.Forms.Label lblBrush;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem frameScreenshotToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.TextBox tbFrameNote;
|
||||||
|
private System.Windows.Forms.ContextMenuStrip cmBaseline;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem tsmiBaseline;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem tsmiMidline;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem tsmiTopline;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -18,11 +18,12 @@ namespace McBitFont {
|
|||||||
[Serializable]
|
[Serializable]
|
||||||
[MessagePackObject]
|
[MessagePackObject]
|
||||||
public struct FrameMiniature {
|
public struct FrameMiniature {
|
||||||
public FrameMiniature(int cc, int ww, int hh) {
|
public FrameMiniature(int cc, int ww, int hh, string frameNote = "") {
|
||||||
code = cc;
|
code = cc;
|
||||||
width = ww;
|
width = ww;
|
||||||
height = hh;
|
height = hh;
|
||||||
data = new bool[ww, hh];
|
data = new bool[ww, hh];
|
||||||
|
note = frameNote;
|
||||||
}
|
}
|
||||||
[Key(0)]
|
[Key(0)]
|
||||||
public int code;
|
public int code;
|
||||||
@@ -32,6 +33,8 @@ namespace McBitFont {
|
|||||||
public int height;
|
public int height;
|
||||||
[Key(3)]
|
[Key(3)]
|
||||||
public bool[,] data;
|
public bool[,] data;
|
||||||
|
[Key(8)]
|
||||||
|
public string note;
|
||||||
};
|
};
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
@@ -42,11 +45,22 @@ namespace McBitFont {
|
|||||||
[Key(5)]
|
[Key(5)]
|
||||||
public int codepage;
|
public int codepage;
|
||||||
[Key(6)]
|
[Key(6)]
|
||||||
public int baseline;
|
public int baseline1;
|
||||||
|
[Key(9)]
|
||||||
|
public int baseline2;
|
||||||
|
[Key(10)]
|
||||||
|
public int baseline3;
|
||||||
[Key(7)]
|
[Key(7)]
|
||||||
public List<FrameMiniature> frames;
|
public List<FrameMiniature> frames;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public enum SetLines {
|
||||||
|
SL_None = 0,
|
||||||
|
SL_Base,
|
||||||
|
SL_Mid,
|
||||||
|
SL_Top
|
||||||
|
}
|
||||||
|
|
||||||
public FrameMiniature f;
|
public FrameMiniature f;
|
||||||
public List<FrameMiniature> frames = new List<FrameMiniature>();
|
public List<FrameMiniature> frames = new List<FrameMiniature>();
|
||||||
//private CanvasHistory history = new();
|
//private CanvasHistory history = new();
|
||||||
@@ -59,14 +73,14 @@ namespace McBitFont {
|
|||||||
public bool monospaced = false;
|
public bool monospaced = false;
|
||||||
private bool modified = false;
|
private bool modified = false;
|
||||||
private bool prjModified = false;
|
private bool prjModified = false;
|
||||||
public const string version = "2.7";
|
public const string version = "2.9";
|
||||||
public string prjName = "Untitled";
|
public string prjName = "Untitled";
|
||||||
public string prjFileName = "";
|
public string prjFileName = "";
|
||||||
public int codepage = 1251;
|
public int codepage = 1251;
|
||||||
private FrameMiniature fbuf;
|
private FrameMiniature fbuf;
|
||||||
private readonly DataFormats.Format clpbFormat = DataFormats.GetFormat("McBitFontFrame");
|
private readonly DataFormats.Format clpbFormat = DataFormats.GetFormat("McBitFontFrame");
|
||||||
private int baseline = 0;
|
private int baseline1 = 0, baseline2 = 0, baseline3 = 0;
|
||||||
private bool set_base = false;
|
private SetLines set_lines = SetLines.SL_None;
|
||||||
private Point selection1, selection2;
|
private Point selection1, selection2;
|
||||||
private Point[,] sidebarLocs = new Point[2, 3];
|
private Point[,] sidebarLocs = new Point[2, 3];
|
||||||
|
|
||||||
@@ -112,12 +126,12 @@ namespace McBitFont {
|
|||||||
// Remember sidebar panels locations
|
// Remember sidebar panels locations
|
||||||
private void SideBarRecalc() {
|
private void SideBarRecalc() {
|
||||||
|
|
||||||
sidebarLocs[0, 0] = new Point(this.Width - 459, 31);
|
sidebarLocs[0, 0] = new Point(this.Width - 459, 24); // tool panel
|
||||||
sidebarLocs[0, 1] = new Point(this.Width - 316, 24);
|
sidebarLocs[0, 1] = new Point(this.Width - 316, 24); // info panel
|
||||||
sidebarLocs[0, 2] = new Point(this.Width - 487, 31);
|
sidebarLocs[0, 2] = new Point(this.Width - 487, 31); // vertical scroll
|
||||||
sidebarLocs[1, 0] = new Point(this.Width - panel1.Width - 70, 180);
|
sidebarLocs[1, 0] = new Point(this.Width - panel1.Width - 70, 180); // tool panel
|
||||||
sidebarLocs[1, 1] = new Point(this.Width - pnlInfo.Width - 110, 320);
|
sidebarLocs[1, 1] = new Point(this.Width - pnlInfo.Width - 110, 340); // info panel
|
||||||
sidebarLocs[1, 2] = new Point(dotPanel.Width + 17, 31);
|
sidebarLocs[1, 2] = new Point(dotPanel.Width + 17, 31); // vertical scroll
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -170,7 +184,7 @@ namespace McBitFont {
|
|||||||
SideBarRecalc();
|
SideBarRecalc();
|
||||||
|
|
||||||
// Create default cursor
|
// Create default cursor
|
||||||
dotPanel.Cursor = McCursor.GetCursor((int)nudBrush.Value, cellSize, gap);
|
SetPanelCursor();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -191,8 +205,10 @@ namespace McBitFont {
|
|||||||
for (int j = 0; j <= selection2.Y - selection1.Y; j++) {
|
for (int j = 0; j <= selection2.Y - selection1.Y; j++) {
|
||||||
ff.data[i, j] = frame.data[i + selection1.X, j + selection1.Y];
|
ff.data[i, j] = frame.data[i + selection1.X, j + selection1.Y];
|
||||||
}
|
}
|
||||||
} else
|
} else {
|
||||||
Array.Copy(frame.data, ff.data, frame.data.Length);
|
Array.Copy(frame.data, ff.data, frame.data.Length);
|
||||||
|
ff.note = frame.note;
|
||||||
|
}
|
||||||
|
|
||||||
return ff;
|
return ff;
|
||||||
}
|
}
|
||||||
@@ -346,7 +362,7 @@ namespace McBitFont {
|
|||||||
vScroll.Enabled = true;
|
vScroll.Enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!chkRectSelect.Checked) dotPanel.Cursor = McCursor.GetCursor((int)nudBrush.Value, cellSize, gap);
|
SetPanelCursor();
|
||||||
dotPanel.Refresh();
|
dotPanel.Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -485,16 +501,22 @@ namespace McBitFont {
|
|||||||
mouseDownMiddle = true;
|
mouseDownMiddle = true;
|
||||||
mouseX = e.X;
|
mouseX = e.X;
|
||||||
mouseY = e.Y;
|
mouseY = e.Y;
|
||||||
|
SetPanelCursor();
|
||||||
}
|
}
|
||||||
if (mouseDownMiddle && e.Button == MouseButtons.None) {
|
if (mouseDownMiddle && e.Button == MouseButtons.None) {
|
||||||
mouseDownMiddle = false;
|
mouseDownMiddle = false;
|
||||||
|
SetPanelCursor();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Moving baseline
|
// Moving baseline
|
||||||
Rectangle rect1, rect2;
|
Rectangle rect1, rect2;
|
||||||
if (set_base) {
|
if (set_lines > SetLines.SL_None) {
|
||||||
|
int baseline = 0;
|
||||||
|
if (set_lines == SetLines.SL_Base) baseline = baseline1;
|
||||||
|
if (set_lines == SetLines.SL_Mid) baseline = baseline2;
|
||||||
|
if (set_lines == SetLines.SL_Top) baseline = baseline3;
|
||||||
|
|
||||||
int yy = pixelOffset + baseline * (cellSize + gap) - vScroll.Value - 1;
|
int yy = pixelOffset + baseline * (cellSize + gap) - vScroll.Value - 1;
|
||||||
rect1 = new Rectangle(pixelOffset, yy, w, 2);
|
rect1 = new Rectangle(pixelOffset, yy, w, 2);
|
||||||
@@ -506,11 +528,17 @@ namespace McBitFont {
|
|||||||
yy = pixelOffset + baseline * (cellSize + gap) - vScroll.Value - 1;
|
yy = pixelOffset + baseline * (cellSize + gap) - vScroll.Value - 1;
|
||||||
rect2 = new Rectangle(pixelOffset, yy, w, 2);
|
rect2 = new Rectangle(pixelOffset, yy, w, 2);
|
||||||
|
|
||||||
|
if (set_lines == SetLines.SL_Base) baseline1 = baseline;
|
||||||
|
if (set_lines == SetLines.SL_Mid) baseline2 = baseline;
|
||||||
|
if (set_lines == SetLines.SL_Top) baseline3 = baseline;
|
||||||
|
|
||||||
dotPanel.Invalidate(rect1);
|
dotPanel.Invalidate(rect1);
|
||||||
dotPanel.Invalidate(rect2);
|
dotPanel.Invalidate(rect2);
|
||||||
|
|
||||||
if (e.Button == MouseButtons.Left) {
|
if (e.Button == MouseButtons.Left) {
|
||||||
set_base = false;
|
set_lines = SetLines.SL_None;
|
||||||
|
SetPanelCursor();
|
||||||
|
SetModified(true, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -529,7 +557,7 @@ namespace McBitFont {
|
|||||||
selection2.Y = j;
|
selection2.Y = j;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (e.Button != MouseButtons.None && !mouseDown) {
|
if ((e.Button == MouseButtons.Left || e.Button == MouseButtons.Right) && !mouseDown) {
|
||||||
// Started to move a mouse with button held
|
// Started to move a mouse with button held
|
||||||
mouseDown = true;
|
mouseDown = true;
|
||||||
if (rectSel) {
|
if (rectSel) {
|
||||||
@@ -589,7 +617,7 @@ namespace McBitFont {
|
|||||||
// Check for Shift / Ctrl keys for straight lines
|
// Check for Shift / Ctrl keys for straight lines
|
||||||
if (ModifierKeys.HasFlag(Keys.Shift) && mouseDown) {
|
if (ModifierKeys.HasFlag(Keys.Shift) && mouseDown) {
|
||||||
j = lastY;
|
j = lastY;
|
||||||
} else if (ModifierKeys.HasFlag(Keys.Control) && mouseDown) {
|
} else if (ModifierKeys.HasFlag(Keys.Control) && mouseDown && !CAKeyDown) {
|
||||||
i = lastX;
|
i = lastX;
|
||||||
}
|
}
|
||||||
lastX = i;
|
lastX = i;
|
||||||
@@ -621,7 +649,7 @@ namespace McBitFont {
|
|||||||
SetModified();
|
SetModified();
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return changed;
|
return changed;
|
||||||
@@ -717,6 +745,7 @@ namespace McBitFont {
|
|||||||
string s = f.code.ToString().PadLeft(3, '0');
|
string s = f.code.ToString().PadLeft(3, '0');
|
||||||
ilMiniatures.Images.RemoveByKey(s);
|
ilMiniatures.Images.RemoveByKey(s);
|
||||||
ilMiniatures.Images.Add(s, (Image)sizedBMP);
|
ilMiniatures.Images.Add(s, (Image)sizedBMP);
|
||||||
|
miniList.Items[miniList.Items.IndexOfKey(s)].ToolTipText = f.note;
|
||||||
sizedBMP.Dispose();
|
sizedBMP.Dispose();
|
||||||
SetModified(false);
|
SetModified(false);
|
||||||
SetModified(true, true);
|
SetModified(true, true);
|
||||||
@@ -768,21 +797,36 @@ namespace McBitFont {
|
|||||||
// Fill the cell with color
|
// Fill the cell with color
|
||||||
if (f.data[i, j]) sb = sbb;
|
if (f.data[i, j]) sb = sbb;
|
||||||
else sb = sbw;
|
else sb = sbw;
|
||||||
g.FillRectangle(sb, x, (baseline == j ? y + 1 : y), cellSize, (baseline == j ? cellSize - 1 : cellSize));
|
g.FillRectangle(sb, x, ((baseline1 == j || baseline2 == j || baseline3 == j) ? y + 1 : y), cellSize, ((baseline1 == j || baseline2 == j || baseline3 == j) ? cellSize - 1 : cellSize));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw the baseline
|
// Draw the base lines
|
||||||
if (baseline > 0 && gap > 0) {
|
if (baseline1 > 0 || baseline2 > 0 || baseline3 > 0) {
|
||||||
x = pixelOffset - hScroll.Value;
|
x = pixelOffset - hScroll.Value;
|
||||||
y = pixelOffset + baseline * (cellSize + gap) - vScroll.Value;
|
// Base line
|
||||||
|
if (baseline1 > 0) {
|
||||||
Pen sbBase = new(Color.Blue, 2);
|
Pen sbBase = new(Color.Blue, gap > 0 ? 2 : 1);
|
||||||
g.DrawLine(sbBase, x, y, w, y);
|
y = pixelOffset + baseline1 * (cellSize + gap) - vScroll.Value;
|
||||||
|
g.DrawLine(sbBase, x, y, w, y);
|
||||||
|
}
|
||||||
|
// Mid line
|
||||||
|
if (baseline2 > 0) {
|
||||||
|
Pen sbBase = new(Color.MediumPurple, gap > 0 ? 2 : 1);
|
||||||
|
y = pixelOffset + baseline2 * (cellSize + gap) - vScroll.Value;
|
||||||
|
g.DrawLine(sbBase, x, y, w, y);
|
||||||
|
}
|
||||||
|
// Top line
|
||||||
|
if (baseline3 > 0) {
|
||||||
|
Pen sbBase = new(Color.FromArgb(0x16, 0x8b, 0x76), gap > 0 ? 2 : 1);
|
||||||
|
y = pixelOffset + baseline3 * (cellSize + gap) - vScroll.Value;
|
||||||
|
g.DrawLine(sbBase, x, y, w, y);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Draw the Rect selection
|
// Draw the Rect selection
|
||||||
if (chkRectSelect.Checked) {
|
if (chkRectSelect.Checked || CAKeyDown) {
|
||||||
Point p1 = new(selection1.X, selection1.Y);
|
Point p1 = new(selection1.X, selection1.Y);
|
||||||
Point p2 = new(selection2.X, selection2.Y);
|
Point p2 = new(selection2.X, selection2.Y);
|
||||||
NormPoints(ref p1, ref p2);
|
NormPoints(ref p1, ref p2);
|
||||||
@@ -897,7 +941,9 @@ namespace McBitFont {
|
|||||||
f = CopyFrame(frames.First());
|
f = CopyFrame(frames.First());
|
||||||
form.Dispose();
|
form.Dispose();
|
||||||
|
|
||||||
baseline = 0;
|
baseline1 = 0;
|
||||||
|
baseline2 = 0;
|
||||||
|
baseline3 = 0;
|
||||||
|
|
||||||
prjName = "Untitled";
|
prjName = "Untitled";
|
||||||
prjFileName = "";
|
prjFileName = "";
|
||||||
@@ -935,6 +981,7 @@ namespace McBitFont {
|
|||||||
nudX.Value = ff.width;
|
nudX.Value = ff.width;
|
||||||
nudY.Value = ff.height;
|
nudY.Value = ff.height;
|
||||||
f = ff;
|
f = ff;
|
||||||
|
tbFrameNote.Text = ff.note;
|
||||||
|
|
||||||
|
|
||||||
history.Add(code);
|
history.Add(code);
|
||||||
@@ -983,7 +1030,7 @@ namespace McBitFont {
|
|||||||
var sHex = 'x' + Convert.ToString(f.code, 16).PadLeft(2, '0').ToUpper();
|
var sHex = 'x' + Convert.ToString(f.code, 16).PadLeft(2, '0').ToUpper();
|
||||||
var sss = DecodeSymbol(f.code);
|
var sss = DecodeSymbol(f.code);
|
||||||
ilMiniatures.Images.Add(s, (Image)GetMiniPictue(f));
|
ilMiniatures.Images.Add(s, (Image)GetMiniPictue(f));
|
||||||
miniList.Items.Add(s, (chkHexCodes.Checked ? sHex : s) + ' ' + sss, s);
|
miniList.Items.Add(s, (chkHexCodes.Checked ? sHex : s) + ' ' + sss, s).ToolTipText = f.note;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -997,7 +1044,9 @@ namespace McBitFont {
|
|||||||
}
|
}
|
||||||
monospaced = sav.monospaced;
|
monospaced = sav.monospaced;
|
||||||
codepage = sav.codepage;
|
codepage = sav.codepage;
|
||||||
baseline = sav.baseline;
|
baseline1 = sav.baseline1;
|
||||||
|
baseline2 = sav.baseline2;
|
||||||
|
baseline3 = sav.baseline3;
|
||||||
lblType.Text = monospaced ? "Monospaced" : "Variable width / Single";
|
lblType.Text = monospaced ? "Monospaced" : "Variable width / Single";
|
||||||
frames = sav.frames;
|
frames = sav.frames;
|
||||||
makeVarWidthToolStripMenuItem.Visible = monospaced;
|
makeVarWidthToolStripMenuItem.Visible = monospaced;
|
||||||
@@ -1015,10 +1064,9 @@ namespace McBitFont {
|
|||||||
nudX.ValueChanged += nudX_ValueChanged;
|
nudX.ValueChanged += nudX_ValueChanged;
|
||||||
nudY.ValueChanged += nudY_ValueChanged;
|
nudY.ValueChanged += nudY_ValueChanged;
|
||||||
f = CopyFrame(frames.First());
|
f = CopyFrame(frames.First());
|
||||||
|
tbFrameNote.Text = frames.First().note;
|
||||||
dotPanel.Refresh();
|
dotPanel.Refresh();
|
||||||
miniList.Refresh();
|
miniList.Refresh();
|
||||||
SetModified(false);
|
|
||||||
SetModified(false, true);
|
|
||||||
|
|
||||||
prjFileName = filename;
|
prjFileName = filename;
|
||||||
prjName = Path.GetFileNameWithoutExtension(filename);
|
prjName = Path.GetFileNameWithoutExtension(filename);
|
||||||
@@ -1037,6 +1085,8 @@ namespace McBitFont {
|
|||||||
zerofyWidthToolStripMenuItem.Enabled = !monospaced;
|
zerofyWidthToolStripMenuItem.Enabled = !monospaced;
|
||||||
tsmiCodeShift.Visible = frames.Count > 1;
|
tsmiCodeShift.Visible = frames.Count > 1;
|
||||||
CodeShiftToolStripMenuItem.Visible = frames.Count > 1;
|
CodeShiftToolStripMenuItem.Visible = frames.Count > 1;
|
||||||
|
SetModified(false);
|
||||||
|
SetModified(false, true);
|
||||||
Cursor.Current = Cursors.Default;
|
Cursor.Current = Cursors.Default;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1045,7 +1095,9 @@ namespace McBitFont {
|
|||||||
sav.monospaced = monospaced;
|
sav.monospaced = monospaced;
|
||||||
sav.frames = frames;
|
sav.frames = frames;
|
||||||
sav.codepage = codepage;
|
sav.codepage = codepage;
|
||||||
sav.baseline = baseline;
|
sav.baseline1 = baseline1;
|
||||||
|
sav.baseline2 = baseline2;
|
||||||
|
sav.baseline3 = baseline3;
|
||||||
|
|
||||||
using (Stream ms = File.OpenWrite(filename)) {
|
using (Stream ms = File.OpenWrite(filename)) {
|
||||||
MessagePackSerializer.Serialize(ms, sav);
|
MessagePackSerializer.Serialize(ms, sav);
|
||||||
@@ -1179,7 +1231,7 @@ namespace McBitFont {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void btnBaseline_Click(object sender, EventArgs e) {
|
private void btnBaseline_Click(object sender, EventArgs e) {
|
||||||
set_base = !set_base;
|
cmBaseline.Show(btnBaseline, new Point(0, btnBaseline.Height));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check modified / Save frame
|
// Check modified / Save frame
|
||||||
@@ -1187,8 +1239,8 @@ namespace McBitFont {
|
|||||||
if (modified) {
|
if (modified) {
|
||||||
if (MessageBox.Show("Current symbol is modified.\nDo you want to save the changes?", "Symbol was modified!", MessageBoxButtons.YesNo) == DialogResult.Yes) {
|
if (MessageBox.Show("Current symbol is modified.\nDo you want to save the changes?", "Symbol was modified!", MessageBoxButtons.YesNo) == DialogResult.Yes) {
|
||||||
SaveFrame();
|
SaveFrame();
|
||||||
|
SetModified(false);
|
||||||
}
|
}
|
||||||
SetModified(false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1395,8 +1447,7 @@ namespace McBitFont {
|
|||||||
lblSelection.Visible = lblSelectionLabel.Visible = chkRectSelect.Checked;
|
lblSelection.Visible = lblSelectionLabel.Visible = chkRectSelect.Checked;
|
||||||
selectAllToolStripMenuItem.Enabled = chkRectSelect.Checked;
|
selectAllToolStripMenuItem.Enabled = chkRectSelect.Checked;
|
||||||
|
|
||||||
if (chkRectSelect.Checked) dotPanel.Cursor = McCursor.GetCursorSelect();
|
SetPanelCursor();
|
||||||
else dotPanel.Cursor = McCursor.GetCursor((int)nudBrush.Value, cellSize, gap);
|
|
||||||
|
|
||||||
dotPanel.Refresh();
|
dotPanel.Refresh();
|
||||||
}
|
}
|
||||||
@@ -1526,7 +1577,7 @@ namespace McBitFont {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void TestFont_Click(object sender, EventArgs e) {
|
private void TestFont_Click(object sender, EventArgs e) {
|
||||||
var tester = new FontTester(codepage, dotHeight, baseline, frames);
|
var tester = new FontTester(codepage, dotHeight, baseline1, frames);
|
||||||
tester.ShowDialog();
|
tester.ShowDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1692,7 +1743,78 @@ namespace McBitFont {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void nudBrush_ValueChanged(object sender, EventArgs e) {
|
private void nudBrush_ValueChanged(object sender, EventArgs e) {
|
||||||
if (!chkRectSelect.Checked) dotPanel.Cursor = McCursor.GetCursor((int)nudBrush.Value, cellSize, gap);
|
SetPanelCursor();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void frameScreenshotToolStripMenuItem_Click(object sender, EventArgs e) {
|
||||||
|
FrameScreenshot iform = new(f);
|
||||||
|
iform.ShowDialog();
|
||||||
|
iform.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void tbFrameNote_TextChanged(object sender, EventArgs e) {
|
||||||
|
if (tbFrameNote.Focused) {
|
||||||
|
f.note = tbFrameNote.Text;
|
||||||
|
SetModified();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool CAKeyDown = false;
|
||||||
|
private void MainForm_KeyDown(object sender, KeyEventArgs e) {
|
||||||
|
if (CAKeyDown) return;
|
||||||
|
if (chkRectSelect.Checked && e.Control && e.Alt) {
|
||||||
|
chkRectSelect.Checked = false;
|
||||||
|
CAKeyDown = true;
|
||||||
|
dotPanel.Invalidate();
|
||||||
|
e.Handled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void MainForm_KeyUp(object sender, KeyEventArgs e) {
|
||||||
|
if (CAKeyDown && !e.Control && !e.Alt) {
|
||||||
|
chkRectSelect.Checked = true;
|
||||||
|
CAKeyDown = false;
|
||||||
|
e.Handled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnBaseline_Paint(object sender, PaintEventArgs e) {
|
||||||
|
Button btn = (sender as Button);
|
||||||
|
int arrowX = btn.ClientRectangle.Width - btn.Padding.Right - 14;
|
||||||
|
int arrowY = btn.ClientRectangle.Height / 2 - 1;
|
||||||
|
|
||||||
|
Color color = btn.Enabled ? ForeColor : SystemColors.ControlDark;
|
||||||
|
using Brush brush = new SolidBrush(color);
|
||||||
|
using Pen pen = new Pen(color);
|
||||||
|
Point[] arrow = [new Point(arrowX, arrowY), new Point(arrowX + 7, arrowY), new Point(arrowX + 3, arrowY + 4)];
|
||||||
|
|
||||||
|
e.Graphics.FillPolygon(brush, arrow);
|
||||||
|
e.Graphics.DrawLine(pen, arrowX - 5, btn.ClientRectangle.Top + 4, arrowX - 5, btn.ClientRectangle.Bottom - 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void tsmiBaseline_Click(object sender, EventArgs e) {
|
||||||
|
if (set_lines == SetLines.SL_Base) set_lines = SetLines.SL_None;
|
||||||
|
else set_lines = SetLines.SL_Base;
|
||||||
|
SetPanelCursor();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void tsmiMidline_Click(object sender, EventArgs e) {
|
||||||
|
if (set_lines == SetLines.SL_Mid) set_lines = SetLines.SL_None;
|
||||||
|
else set_lines = SetLines.SL_Mid;
|
||||||
|
SetPanelCursor();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void tsmiTopline_Click(object sender, EventArgs e) {
|
||||||
|
if (set_lines == SetLines.SL_Top) set_lines = SetLines.SL_None;
|
||||||
|
else set_lines = SetLines.SL_Top;
|
||||||
|
SetPanelCursor();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SetPanelCursor() {
|
||||||
|
if (mouseDownMiddle) dotPanel.Cursor = McCursor.GetCursorDrag();
|
||||||
|
else if (set_lines > SetLines.SL_None) dotPanel.Cursor = McCursor.GetCursorLines();
|
||||||
|
else if (chkRectSelect.Checked) dotPanel.Cursor = McCursor.GetCursorSelect();
|
||||||
|
else dotPanel.Cursor = McCursor.GetCursor((int)nudBrush.Value, cellSize, gap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -138,6 +138,9 @@
|
|||||||
<metadata name="dlgSavePNG.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="dlgSavePNG.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>644, 17</value>
|
<value>644, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
<metadata name="cmBaseline.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>763, 17</value>
|
||||||
|
</metadata>
|
||||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>
|
<value>
|
||||||
|
169
McBitFont/FrameScreenshot.Designer.cs
generated
Normal file
@@ -0,0 +1,169 @@
|
|||||||
|
namespace McBitFont {
|
||||||
|
partial class FrameScreenshot {
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing) {
|
||||||
|
if (disposing && (components != null)) {
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent() {
|
||||||
|
components = new System.ComponentModel.Container();
|
||||||
|
btnClose = new System.Windows.Forms.Button();
|
||||||
|
btnOK = new System.Windows.Forms.Button();
|
||||||
|
toolTip1 = new System.Windows.Forms.ToolTip(components);
|
||||||
|
nudUpscale = new System.Windows.Forms.NumericUpDown();
|
||||||
|
chkTransparent = new System.Windows.Forms.CheckBox();
|
||||||
|
chkBlackBG = new System.Windows.Forms.CheckBox();
|
||||||
|
btnCopy = new System.Windows.Forms.Button();
|
||||||
|
dlgSaveImage = new System.Windows.Forms.SaveFileDialog();
|
||||||
|
lblUpscale = new System.Windows.Forms.Label();
|
||||||
|
((System.ComponentModel.ISupportInitialize)nudUpscale).BeginInit();
|
||||||
|
SuspendLayout();
|
||||||
|
//
|
||||||
|
// btnClose
|
||||||
|
//
|
||||||
|
btnClose.Location = new System.Drawing.Point(234, 67);
|
||||||
|
btnClose.Name = "btnClose";
|
||||||
|
btnClose.Size = new System.Drawing.Size(88, 27);
|
||||||
|
btnClose.TabIndex = 3;
|
||||||
|
btnClose.Text = "Close";
|
||||||
|
toolTip1.SetToolTip(btnClose, "Close the dialog");
|
||||||
|
btnClose.UseVisualStyleBackColor = true;
|
||||||
|
btnClose.Click += btnClose_Click;
|
||||||
|
//
|
||||||
|
// btnOK
|
||||||
|
//
|
||||||
|
btnOK.Image = Properties.Resources.Famfamfam_Silk_Disk_16;
|
||||||
|
btnOK.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||||
|
btnOK.Location = new System.Drawing.Point(12, 67);
|
||||||
|
btnOK.Name = "btnOK";
|
||||||
|
btnOK.Size = new System.Drawing.Size(88, 27);
|
||||||
|
btnOK.TabIndex = 1;
|
||||||
|
btnOK.Text = "Save";
|
||||||
|
btnOK.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||||
|
toolTip1.SetToolTip(btnOK, "Save to file");
|
||||||
|
btnOK.UseVisualStyleBackColor = true;
|
||||||
|
btnOK.Click += btnOK_Click;
|
||||||
|
//
|
||||||
|
// toolTip1
|
||||||
|
//
|
||||||
|
toolTip1.AutoPopDelay = 10000;
|
||||||
|
toolTip1.InitialDelay = 500;
|
||||||
|
toolTip1.ReshowDelay = 100;
|
||||||
|
//
|
||||||
|
// nudUpscale
|
||||||
|
//
|
||||||
|
nudUpscale.Location = new System.Drawing.Point(71, 27);
|
||||||
|
nudUpscale.Maximum = new decimal(new int[] { 255, 0, 0, 0 });
|
||||||
|
nudUpscale.Minimum = new decimal(new int[] { 1, 0, 0, 0 });
|
||||||
|
nudUpscale.Name = "nudUpscale";
|
||||||
|
nudUpscale.Size = new System.Drawing.Size(51, 23);
|
||||||
|
nudUpscale.TabIndex = 2;
|
||||||
|
toolTip1.SetToolTip(nudUpscale, "Pixel upscale factor (4 means that for each frame pixel there will be 4x4 pixels generated)");
|
||||||
|
nudUpscale.Value = new decimal(new int[] { 4, 0, 0, 0 });
|
||||||
|
//
|
||||||
|
// chkTransparent
|
||||||
|
//
|
||||||
|
chkTransparent.AutoSize = true;
|
||||||
|
chkTransparent.Location = new System.Drawing.Point(144, 18);
|
||||||
|
chkTransparent.Name = "chkTransparent";
|
||||||
|
chkTransparent.Size = new System.Drawing.Size(155, 19);
|
||||||
|
chkTransparent.TabIndex = 5;
|
||||||
|
chkTransparent.Text = "Transparent background";
|
||||||
|
toolTip1.SetToolTip(chkTransparent, "Make background transparent (Doesn't work with clipboard - background will be gray)");
|
||||||
|
chkTransparent.UseVisualStyleBackColor = true;
|
||||||
|
chkTransparent.CheckedChanged += chkTransparent_CheckedChanged;
|
||||||
|
//
|
||||||
|
// chkBlackBG
|
||||||
|
//
|
||||||
|
chkBlackBG.AutoSize = true;
|
||||||
|
chkBlackBG.Enabled = false;
|
||||||
|
chkBlackBG.Location = new System.Drawing.Point(144, 35);
|
||||||
|
chkBlackBG.Name = "chkBlackBG";
|
||||||
|
chkBlackBG.Size = new System.Drawing.Size(132, 19);
|
||||||
|
chkBlackBG.TabIndex = 6;
|
||||||
|
chkBlackBG.Text = "Background is black";
|
||||||
|
toolTip1.SetToolTip(chkBlackBG, "White color is considered as background by default. Check this to invert that");
|
||||||
|
chkBlackBG.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// btnCopy
|
||||||
|
//
|
||||||
|
btnCopy.Image = Properties.Resources.Famfamfam_Silk_Page_copy_16;
|
||||||
|
btnCopy.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||||
|
btnCopy.Location = new System.Drawing.Point(122, 67);
|
||||||
|
btnCopy.Name = "btnCopy";
|
||||||
|
btnCopy.Size = new System.Drawing.Size(88, 27);
|
||||||
|
btnCopy.TabIndex = 7;
|
||||||
|
btnCopy.Text = "Copy";
|
||||||
|
btnCopy.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||||
|
toolTip1.SetToolTip(btnCopy, "Copy to clipboard");
|
||||||
|
btnCopy.UseVisualStyleBackColor = true;
|
||||||
|
btnCopy.Click += btnCopy_Click;
|
||||||
|
//
|
||||||
|
// dlgSaveImage
|
||||||
|
//
|
||||||
|
dlgSaveImage.DefaultExt = "png";
|
||||||
|
dlgSaveImage.Filter = "PNG Image|*.png;*.PNG";
|
||||||
|
//
|
||||||
|
// lblUpscale
|
||||||
|
//
|
||||||
|
lblUpscale.AutoSize = true;
|
||||||
|
lblUpscale.Location = new System.Drawing.Point(71, 9);
|
||||||
|
lblUpscale.Name = "lblUpscale";
|
||||||
|
lblUpscale.Size = new System.Drawing.Size(51, 15);
|
||||||
|
lblUpscale.TabIndex = 4;
|
||||||
|
lblUpscale.Text = "Upscale:";
|
||||||
|
//
|
||||||
|
// FrameScreenshot
|
||||||
|
//
|
||||||
|
AcceptButton = btnClose;
|
||||||
|
AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||||
|
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
CancelButton = btnClose;
|
||||||
|
ClientSize = new System.Drawing.Size(334, 111);
|
||||||
|
Controls.Add(btnCopy);
|
||||||
|
Controls.Add(chkBlackBG);
|
||||||
|
Controls.Add(chkTransparent);
|
||||||
|
Controls.Add(nudUpscale);
|
||||||
|
Controls.Add(lblUpscale);
|
||||||
|
Controls.Add(btnClose);
|
||||||
|
Controls.Add(btnOK);
|
||||||
|
FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||||
|
Name = "FrameScreenshot";
|
||||||
|
StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||||
|
Text = "Frame Screenshot";
|
||||||
|
Load += FrameScreenshot_Load;
|
||||||
|
((System.ComponentModel.ISupportInitialize)nudUpscale).EndInit();
|
||||||
|
ResumeLayout(false);
|
||||||
|
PerformLayout();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Button btnClose;
|
||||||
|
private System.Windows.Forms.Button btnOK;
|
||||||
|
private System.Windows.Forms.ToolTip toolTip1;
|
||||||
|
private System.Windows.Forms.SaveFileDialog dlgSaveImage;
|
||||||
|
private System.Windows.Forms.Label lblUpscale;
|
||||||
|
private System.Windows.Forms.NumericUpDown nudUpscale;
|
||||||
|
private System.Windows.Forms.CheckBox chkTransparent;
|
||||||
|
private System.Windows.Forms.CheckBox chkBlackBG;
|
||||||
|
private System.Windows.Forms.Button btnCopy;
|
||||||
|
}
|
||||||
|
}
|
87
McBitFont/FrameScreenshot.cs
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Drawing.Imaging;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Security.Policy;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using static McBitFont.MainForm;
|
||||||
|
|
||||||
|
namespace McBitFont {
|
||||||
|
public partial class FrameScreenshot : Form {
|
||||||
|
|
||||||
|
private FrameMiniature f;
|
||||||
|
|
||||||
|
public FrameScreenshot(FrameMiniature frame) {
|
||||||
|
InitializeComponent();
|
||||||
|
f = frame;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Bitmap GenerateScreenshot() {
|
||||||
|
int upscale = (int)nudUpscale.Value;
|
||||||
|
int x, y;
|
||||||
|
bool transp = chkTransparent.Checked;
|
||||||
|
bool blackBG = chkBlackBG.Checked;
|
||||||
|
|
||||||
|
Bitmap bmp = new(f.width * upscale, f.height * upscale);
|
||||||
|
SolidBrush bb = new(Color.Black);
|
||||||
|
SolidBrush bw = new(Color.White);
|
||||||
|
using (Graphics g = Graphics.FromImage(bmp)) {
|
||||||
|
for (x = 0; x < f.width; x++) {
|
||||||
|
for (y = 0; y < f.height; y++) {
|
||||||
|
if (f.data[x, y]) {
|
||||||
|
if (!transp || (transp && !blackBG)) g.FillRectangle(bb, x * upscale, y * upscale, upscale, upscale);
|
||||||
|
} else
|
||||||
|
if (!transp || (transp && blackBG)) g.FillRectangle(bw, x * upscale, y * upscale, upscale, upscale);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return bmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnOK_Click(object sender, EventArgs e) {
|
||||||
|
if (dlgSaveImage.ShowDialog() == DialogResult.OK) {
|
||||||
|
|
||||||
|
Bitmap bmp = GenerateScreenshot();
|
||||||
|
|
||||||
|
bool err = false;
|
||||||
|
try {
|
||||||
|
bmp.Save(dlgSaveImage.FileName, ImageFormat.Png);
|
||||||
|
}
|
||||||
|
catch (Exception ex) {
|
||||||
|
err = true;
|
||||||
|
MessageBox.Show("There was an error during image save: " + ex.Message, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
}
|
||||||
|
if (!err) MessageBox.Show("Screenshot has been saved!", "Success!", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void FrameScreenshot_Load(object sender, EventArgs e) {
|
||||||
|
btnOK.Focus();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnClose_Click(object sender, EventArgs e) {
|
||||||
|
DialogResult = DialogResult.OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void chkTransparent_CheckedChanged(object sender, EventArgs e) {
|
||||||
|
chkBlackBG.Enabled = chkTransparent.Checked;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnCopy_Click(object sender, EventArgs e) {
|
||||||
|
Bitmap bmp = GenerateScreenshot();
|
||||||
|
using MemoryStream stream = new();
|
||||||
|
bmp.Save(stream, ImageFormat.Png);
|
||||||
|
DataObject data = new("PNG", stream);
|
||||||
|
data.SetImage(bmp);
|
||||||
|
Clipboard.SetDataObject(data, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
126
McBitFont/FrameScreenshot.resx
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>17, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="dlgSaveImage.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>115, 17</value>
|
||||||
|
</metadata>
|
||||||
|
</root>
|
@@ -20,9 +20,9 @@
|
|||||||
<UseWindowsForms>true</UseWindowsForms>
|
<UseWindowsForms>true</UseWindowsForms>
|
||||||
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
|
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
|
||||||
<ApplicationIcon>icon_64.ico</ApplicationIcon>
|
<ApplicationIcon>icon_64.ico</ApplicationIcon>
|
||||||
<AssemblyVersion>2.7.0.0</AssemblyVersion>
|
<AssemblyVersion>2.9.0.0</AssemblyVersion>
|
||||||
<FileVersion>2.7.0.0</FileVersion>
|
<FileVersion>2.9.0.0</FileVersion>
|
||||||
<Version>$(VersionPrefix)2.7.0</Version>
|
<Version>$(VersionPrefix)2.9.0</Version>
|
||||||
<Copyright>Anton Mukhin</Copyright>
|
<Copyright>Anton Mukhin</Copyright>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||||
|
@@ -127,5 +127,46 @@ namespace McBitFont {
|
|||||||
return CreateCursorNoResize(bmp, 1, 1);
|
return CreateCursorNoResize(bmp, 1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Cursor GetCursorLines() {
|
||||||
|
Point[] arrow = { new(1, 1), new(12, 12), new(11, 13), new(6, 13), new(2, 17), new(1, 16) };
|
||||||
|
Rectangle line = new(0, 18, 20, 5);
|
||||||
|
|
||||||
|
Bitmap bmp = new(21, 24);
|
||||||
|
Pen pb = new(Color.Black, 1);
|
||||||
|
Pen pw = new(Color.White, 1);
|
||||||
|
SolidBrush bw = new(Color.White);
|
||||||
|
SolidBrush bb = new(Color.Black);
|
||||||
|
using (Graphics g = Graphics.FromImage(bmp)) {
|
||||||
|
g.FillPolygon(bw, arrow);
|
||||||
|
g.DrawPolygon(pb, arrow);
|
||||||
|
g.FillRectangle(bb, line);
|
||||||
|
g.DrawRectangle(pw, line);
|
||||||
|
}
|
||||||
|
|
||||||
|
return CreateCursorNoResize(bmp, 1, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Cursor GetCursorDrag() {
|
||||||
|
Point[] arrow1 = { new(11, 0), new(15, 4), new(13, 4), new(13, 7), new(9, 7), new(9, 4), new(7, 4) };
|
||||||
|
Point[] arrow2 = { new(22, 11), new(18, 15), new(18, 13), new(15, 13), new(15, 9), new(18, 9), new(18, 7) };
|
||||||
|
Point[] arrow3 = { new(11, 22), new(7, 18), new(9, 18), new(9, 15), new(13, 15), new(13, 18), new(15, 18) };
|
||||||
|
Point[] arrow4 = { new(0, 11), new(4, 7), new(4, 9), new(7, 9), new(7, 13), new(4, 13), new(4, 15) };
|
||||||
|
|
||||||
|
Bitmap bmp = new(23, 23);
|
||||||
|
Pen pb = new(Color.Black, 1);
|
||||||
|
SolidBrush bw = new(Color.White);
|
||||||
|
using (Graphics g = Graphics.FromImage(bmp)) {
|
||||||
|
g.FillPolygon(bw, arrow1);
|
||||||
|
g.DrawPolygon(pb, arrow1);
|
||||||
|
g.FillPolygon(bw, arrow2);
|
||||||
|
g.DrawPolygon(pb, arrow2);
|
||||||
|
g.FillPolygon(bw, arrow3);
|
||||||
|
g.DrawPolygon(pb, arrow3);
|
||||||
|
g.FillPolygon(bw, arrow4);
|
||||||
|
g.DrawPolygon(pb, arrow4);
|
||||||
|
}
|
||||||
|
return CreateCursorNoResize(bmp, 11, 11);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
40
McBitFont/Properties/Resources.Designer.cs
generated
@@ -180,6 +180,26 @@ namespace McBitFont.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap fam_lines {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("fam_lines", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap fam_mid {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("fam_mid", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -190,6 +210,16 @@ namespace McBitFont.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap fam_top {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("fam_top", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -340,6 +370,16 @@ namespace McBitFont.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap picture_save {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("picture_save", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@@ -118,6 +118,9 @@
|
|||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||||
|
<data name="fam_mid" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\fam_mid.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
<data name="z_left" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="z_left" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\arrow_left.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\arrow_left.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -130,6 +133,9 @@
|
|||||||
<data name="Famfamfam-Silk-Page-paste.16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="Famfamfam-Silk-Page-paste.16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\Famfamfam-Silk-Page-paste.16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\Famfamfam-Silk-Page-paste.16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="folder_table" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\folder_table.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
<data name="folder_open" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="folder_open" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\folder_open.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\folder_open.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -145,6 +151,9 @@
|
|||||||
<data name="font" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="font" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\font.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\font.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="picture_save" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\picture_save.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
<data name="arrow_redo" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="arrow_redo" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\redo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\redo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -190,6 +199,9 @@
|
|||||||
<data name="icon_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="icon_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\icon_32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\icon_32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="fam_lines" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\fam_lines.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
<data name="z_tick" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="z_tick" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\tick.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\tick.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -217,8 +229,8 @@
|
|||||||
<data name="Famfamfam-Silk-Disk.16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="Famfamfam-Silk-Disk.16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\Famfamfam-Silk-Disk.16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\Famfamfam-Silk-Disk.16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="folder_table" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="text_letterspacing2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\folder_table.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\text_letterspacing2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Canvas_Fill" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="Canvas_Fill" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\Canvas_Fill.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\Canvas_Fill.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
@@ -241,7 +253,7 @@
|
|||||||
<data name="icon_64" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="icon_64" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\icon_64.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\icon_64.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="text_letterspacing2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="fam_top" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\text_letterspacing2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\fam_top.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
</root>
|
</root>
|
BIN
McBitFont/Resources/fam_lines.png
Normal file
After Width: | Height: | Size: 174 B |
BIN
McBitFont/Resources/fam_mid.png
Normal file
After Width: | Height: | Size: 137 B |
BIN
McBitFont/Resources/fam_top.png
Normal file
After Width: | Height: | Size: 136 B |
BIN
McBitFont/Resources/picture_save.png
Normal file
After Width: | Height: | Size: 755 B |
@@ -26,6 +26,7 @@ Some basic hints on the interface:
|
|||||||
- Shift + scroll to scroll left and right
|
- Shift + scroll to scroll left and right
|
||||||
- Crtl + scroll to zoom
|
- Crtl + scroll to zoom
|
||||||
- Alt + Scroll to change painting brush size
|
- Alt + Scroll to change painting brush size
|
||||||
|
- When Rectangle selection tool is active hold Ctrl+Alt to temporary disable it to be able to draw
|
||||||
|
|
||||||
Download in the [Releases](https://gitea.mcflyer.ru/McFLY/McBitFont/releases) section!
|
Download in the [Releases](https://gitea.mcflyer.ru/McFLY/McBitFont/releases) section!
|
||||||
|
|
||||||
@@ -64,3 +65,8 @@ Code Shift dialog
|
|||||||
Font PNG export example
|
Font PNG export example
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
Frame screenshot dialog
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
12
TODO.txt
@@ -1,10 +1,14 @@
|
|||||||
Application:
|
Application:
|
||||||
- Consider migrating to WPF in order to make DPI aware UI
|
- Consider migrating to WPF in order to make DPI aware UI
|
||||||
V Cursor for rectangular selection tool
|
V Special cursor to indicate baseline set
|
||||||
V Icons for tool buttons
|
V Special cursor when dragging canvas with middle mouse button
|
||||||
V Tooltips now has keyboard shortcuts info
|
|
||||||
|
|
||||||
Functionality:
|
Functionality:
|
||||||
|
V Show note field in Export comments
|
||||||
|
V When Rectangle selection tool is active hold Ctrl+Alt to temporary disable it to be able to draw
|
||||||
|
V Frame screenshot can be copied to clipboard with some limitations (no transparency)
|
||||||
|
V Beside Baseline, also make top and mid lines
|
||||||
|
|
||||||
Bugs:
|
Bugs:
|
||||||
V Fix selection info: change comma to x
|
V Fixed "Frame modified" check. It leaves modified flag if user refused to save changes.
|
||||||
|
V Middle mouse button tries to change selection while dragging canvas with rectSelection tool active
|
BIN
examples/Cursors.mbfont
Normal file
BIN
icons/famfamfam/fam_lines.png
Normal file
After Width: | Height: | Size: 174 B |
BIN
icons/famfamfam/fam_mid.png
Normal file
After Width: | Height: | Size: 137 B |
BIN
icons/famfamfam/fam_top.png
Normal file
After Width: | Height: | Size: 136 B |
BIN
icons/famfamfam/picture_save.png
Normal file
After Width: | Height: | Size: 755 B |
BIN
images/Screenshot_Frame-screenshot.png
Normal file
After Width: | Height: | Size: 8.7 KiB |
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 52 KiB |