Compare commits
50 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
7db0b6d76e | ||
|
2930c42260 | ||
|
ace97302f2 | ||
|
ad15f08233 | ||
|
64531aecf0 | ||
|
4dd4743b21 | ||
|
686ff7b780 | ||
|
30729aca2f | ||
|
6cbc206260 | ||
d70d8d8a3c | |||
e5a4baadb7 | |||
37abcf2c8e | |||
2c2a8d6158 | |||
|
4115455a54 | ||
67be566605 | |||
7aa75224ee | |||
4fe2af03b0 | |||
|
fc4822065a | ||
|
3778a753fb | ||
|
20bd7095dd | ||
8ed1e33f22 | |||
|
1eb463c94f | ||
30142fda26 | |||
|
70a4d34d69 | ||
|
c913525b31 | ||
|
42c72b907f | ||
|
32a8ffd749 | ||
|
c092aebeca | ||
|
346088b532 | ||
|
ac7981d40a | ||
|
dd3ecfcf3e | ||
|
6ba4a56197 | ||
|
87b46ec714 | ||
|
12593ef7ad | ||
|
b01bff86b9 | ||
3e734432f4 | |||
aa5b8354d6 | |||
|
7952263595 | ||
07906b8abc | |||
25e54c35e7 | |||
fc3ef33f3e | |||
|
780f92ccf5 | ||
|
cebbdc63c8 | ||
|
8ca83b7edc | ||
|
9cfe8ef5c3 | ||
76ca7ccf35 | |||
|
3c656b36a7 | ||
|
9f6f5ba5d7 | ||
|
4fa3d9bc49 | ||
|
1a26a2d16b |
@@ -15,7 +15,7 @@ namespace McBitFont {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void About_Load(object sender, EventArgs e) {
|
private void About_Load(object sender, EventArgs e) {
|
||||||
lblVersion.Text = "Version: v" + MainForm.version;
|
lblVersion.Text = "Version: " + MainForm.version;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) {
|
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) {
|
||||||
|
@@ -61,7 +61,7 @@ namespace McBitFont {
|
|||||||
public FrameMiniature? Canvas { get; set; } = canvas;
|
public FrameMiniature? Canvas { get; set; } = canvas;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static FrameMiniature CopyFrameSimple(FrameMiniature f) {
|
public static FrameMiniature CopyFrameSimple(FrameMiniature f) {
|
||||||
FrameMiniature newf = new(f.code, f.width, f.height);
|
FrameMiniature newf = new(f.code, f.width, f.height);
|
||||||
Array.Copy(f.data, newf.data, f.data.Length);
|
Array.Copy(f.data, newf.data, f.data.Length);
|
||||||
return newf;
|
return newf;
|
||||||
|
@@ -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";
|
||||||
}
|
}
|
||||||
|
35
McBitFont/FontTester.Designer.cs
generated
@@ -34,6 +34,7 @@
|
|||||||
lblZoom = new System.Windows.Forms.Label();
|
lblZoom = new System.Windows.Forms.Label();
|
||||||
cbZoom = new System.Windows.Forms.ComboBox();
|
cbZoom = new System.Windows.Forms.ComboBox();
|
||||||
toolTip1 = new System.Windows.Forms.ToolTip(components);
|
toolTip1 = new System.Windows.Forms.ToolTip(components);
|
||||||
|
btnCopy = new System.Windows.Forms.Button();
|
||||||
chkBaseline = new System.Windows.Forms.CheckBox();
|
chkBaseline = new System.Windows.Forms.CheckBox();
|
||||||
((System.ComponentModel.ISupportInitialize)nudSpace).BeginInit();
|
((System.ComponentModel.ISupportInitialize)nudSpace).BeginInit();
|
||||||
SuspendLayout();
|
SuspendLayout();
|
||||||
@@ -53,7 +54,7 @@
|
|||||||
nudSpace.Maximum = new decimal(new int[] { 255, 0, 0, 0 });
|
nudSpace.Maximum = new decimal(new int[] { 255, 0, 0, 0 });
|
||||||
nudSpace.Name = "nudSpace";
|
nudSpace.Name = "nudSpace";
|
||||||
nudSpace.Size = new System.Drawing.Size(40, 23);
|
nudSpace.Size = new System.Drawing.Size(40, 23);
|
||||||
nudSpace.TabIndex = 1;
|
nudSpace.TabIndex = 2;
|
||||||
toolTip1.SetToolTip(nudSpace, "Space between symbols in pixels");
|
toolTip1.SetToolTip(nudSpace, "Space between symbols in pixels");
|
||||||
nudSpace.Value = new decimal(new int[] { 1, 0, 0, 0 });
|
nudSpace.Value = new decimal(new int[] { 1, 0, 0, 0 });
|
||||||
nudSpace.ValueChanged += Scrolling;
|
nudSpace.ValueChanged += Scrolling;
|
||||||
@@ -74,7 +75,7 @@
|
|||||||
tbText.Location = new System.Drawing.Point(12, 55);
|
tbText.Location = new System.Drawing.Point(12, 55);
|
||||||
tbText.Name = "tbText";
|
tbText.Name = "tbText";
|
||||||
tbText.Size = new System.Drawing.Size(260, 29);
|
tbText.Size = new System.Drawing.Size(260, 29);
|
||||||
tbText.TabIndex = 3;
|
tbText.TabIndex = 1;
|
||||||
toolTip1.SetToolTip(tbText, "Text to test the font with");
|
toolTip1.SetToolTip(tbText, "Text to test the font with");
|
||||||
tbText.TextChanged += Text_Changed;
|
tbText.TextChanged += Text_Changed;
|
||||||
//
|
//
|
||||||
@@ -98,7 +99,7 @@
|
|||||||
vScroll.LargeChange = 25;
|
vScroll.LargeChange = 25;
|
||||||
vScroll.Location = new System.Drawing.Point(251, 84);
|
vScroll.Location = new System.Drawing.Point(251, 84);
|
||||||
vScroll.Name = "vScroll";
|
vScroll.Name = "vScroll";
|
||||||
vScroll.Size = new System.Drawing.Size(21, 125);
|
vScroll.Size = new System.Drawing.Size(21, 104);
|
||||||
vScroll.TabIndex = 17;
|
vScroll.TabIndex = 17;
|
||||||
vScroll.ValueChanged += Scrolling;
|
vScroll.ValueChanged += Scrolling;
|
||||||
//
|
//
|
||||||
@@ -124,12 +125,12 @@
|
|||||||
//
|
//
|
||||||
cbZoom.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
cbZoom.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
cbZoom.FormattingEnabled = true;
|
cbZoom.FormattingEnabled = true;
|
||||||
cbZoom.Items.AddRange(new object[] { "2", "3", "5", "10", "15", "20", "25", "30", "35", "40", "45", "50" });
|
cbZoom.Items.AddRange(new object[] { "1", "2", "3", "5", "10", "15", "20", "25", "30", "35", "40", "45", "50" });
|
||||||
cbZoom.Location = new System.Drawing.Point(222, 6);
|
cbZoom.Location = new System.Drawing.Point(222, 6);
|
||||||
cbZoom.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
cbZoom.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
cbZoom.Name = "cbZoom";
|
cbZoom.Name = "cbZoom";
|
||||||
cbZoom.Size = new System.Drawing.Size(50, 23);
|
cbZoom.Size = new System.Drawing.Size(50, 23);
|
||||||
cbZoom.TabIndex = 19;
|
cbZoom.TabIndex = 3;
|
||||||
cbZoom.TabStop = false;
|
cbZoom.TabStop = false;
|
||||||
toolTip1.SetToolTip(cbZoom, "Zoom level");
|
toolTip1.SetToolTip(cbZoom, "Zoom level");
|
||||||
cbZoom.SelectedIndexChanged += ZoomChanged;
|
cbZoom.SelectedIndexChanged += ZoomChanged;
|
||||||
@@ -140,13 +141,28 @@
|
|||||||
toolTip1.InitialDelay = 500;
|
toolTip1.InitialDelay = 500;
|
||||||
toolTip1.ReshowDelay = 100;
|
toolTip1.ReshowDelay = 100;
|
||||||
//
|
//
|
||||||
|
// btnCopy
|
||||||
|
//
|
||||||
|
btnCopy.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
|
||||||
|
btnCopy.Image = Properties.Resources.Famfamfam_Silk_Page_copy_16;
|
||||||
|
btnCopy.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||||
|
btnCopy.Location = new System.Drawing.Point(110, 214);
|
||||||
|
btnCopy.Name = "btnCopy";
|
||||||
|
btnCopy.Size = new System.Drawing.Size(80, 30);
|
||||||
|
btnCopy.TabIndex = 5;
|
||||||
|
btnCopy.Text = " Copy";
|
||||||
|
btnCopy.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||||
|
toolTip1.SetToolTip(btnCopy, "Copy BitPixels you see to Clipboard");
|
||||||
|
btnCopy.UseVisualStyleBackColor = true;
|
||||||
|
btnCopy.MouseClick += Copy_Click;
|
||||||
|
//
|
||||||
// chkBaseline
|
// chkBaseline
|
||||||
//
|
//
|
||||||
chkBaseline.AutoSize = true;
|
chkBaseline.AutoSize = true;
|
||||||
chkBaseline.Location = new System.Drawing.Point(203, 36);
|
chkBaseline.Location = new System.Drawing.Point(203, 36);
|
||||||
chkBaseline.Name = "chkBaseline";
|
chkBaseline.Name = "chkBaseline";
|
||||||
chkBaseline.Size = new System.Drawing.Size(69, 19);
|
chkBaseline.Size = new System.Drawing.Size(69, 19);
|
||||||
chkBaseline.TabIndex = 20;
|
chkBaseline.TabIndex = 4;
|
||||||
chkBaseline.Text = "Baseline";
|
chkBaseline.Text = "Baseline";
|
||||||
chkBaseline.UseVisualStyleBackColor = true;
|
chkBaseline.UseVisualStyleBackColor = true;
|
||||||
chkBaseline.CheckedChanged += Scrolling;
|
chkBaseline.CheckedChanged += Scrolling;
|
||||||
@@ -155,7 +171,8 @@
|
|||||||
//
|
//
|
||||||
AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||||
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
ClientSize = new System.Drawing.Size(284, 221);
|
ClientSize = new System.Drawing.Size(284, 251);
|
||||||
|
Controls.Add(btnCopy);
|
||||||
Controls.Add(chkBaseline);
|
Controls.Add(chkBaseline);
|
||||||
Controls.Add(cbZoom);
|
Controls.Add(cbZoom);
|
||||||
Controls.Add(lblZoom);
|
Controls.Add(lblZoom);
|
||||||
@@ -168,13 +185,14 @@
|
|||||||
Controls.Add(lblSpace);
|
Controls.Add(lblSpace);
|
||||||
MaximizeBox = false;
|
MaximizeBox = false;
|
||||||
MinimizeBox = false;
|
MinimizeBox = false;
|
||||||
MinimumSize = new System.Drawing.Size(260, 260);
|
MinimumSize = new System.Drawing.Size(300, 290);
|
||||||
Name = "FontTester";
|
Name = "FontTester";
|
||||||
ShowIcon = false;
|
ShowIcon = false;
|
||||||
ShowInTaskbar = false;
|
ShowInTaskbar = false;
|
||||||
StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||||
Text = "Font Tester";
|
Text = "Font Tester";
|
||||||
Load += FontTester_Load;
|
Load += FontTester_Load;
|
||||||
|
Resize += Form_Resize;
|
||||||
((System.ComponentModel.ISupportInitialize)nudSpace).EndInit();
|
((System.ComponentModel.ISupportInitialize)nudSpace).EndInit();
|
||||||
ResumeLayout(false);
|
ResumeLayout(false);
|
||||||
PerformLayout();
|
PerformLayout();
|
||||||
@@ -193,5 +211,6 @@
|
|||||||
private System.Windows.Forms.ToolTip toolTip1;
|
private System.Windows.Forms.ToolTip toolTip1;
|
||||||
private System.Windows.Forms.ComboBox cbZoom;
|
private System.Windows.Forms.ComboBox cbZoom;
|
||||||
private System.Windows.Forms.CheckBox chkBaseline;
|
private System.Windows.Forms.CheckBox chkBaseline;
|
||||||
|
private System.Windows.Forms.Button btnCopy;
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using MessagePack;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
@@ -24,6 +25,8 @@ namespace McBitFont {
|
|||||||
private int cellSize;
|
private int cellSize;
|
||||||
private int width;
|
private int width;
|
||||||
|
|
||||||
|
private readonly DataFormats.Format clpbFormat = DataFormats.GetFormat("McBitFontFrame");
|
||||||
|
|
||||||
public FontTester(int codepage, int height, int baseline, List<MainForm.FrameMiniature> frames) {
|
public FontTester(int codepage, int height, int baseline, List<MainForm.FrameMiniature> frames) {
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
|
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
|
||||||
@@ -53,7 +56,7 @@ namespace McBitFont {
|
|||||||
int space = (int)nudSpace.Value;
|
int space = (int)nudSpace.Value;
|
||||||
int index = 0;
|
int index = 0;
|
||||||
for (int c = 0; c < encoded.Length; c++) {
|
for (int c = 0; c < encoded.Length; c++) {
|
||||||
// Check if we have suck symbol
|
// Check if we have such symbol
|
||||||
var f = frames.FindAll(x => x.code == encoded[c]);
|
var f = frames.FindAll(x => x.code == encoded[c]);
|
||||||
if (f.Count == 1) {
|
if (f.Count == 1) {
|
||||||
// Draw the symbol
|
// Draw the symbol
|
||||||
@@ -160,6 +163,42 @@ namespace McBitFont {
|
|||||||
private void Scrolling(object sender, EventArgs e) {
|
private void Scrolling(object sender, EventArgs e) {
|
||||||
dotPanel.Invalidate();
|
dotPanel.Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void Form_Resize(object sender, EventArgs e) {
|
||||||
|
btnCopy.Left = this.Width / 2 - 40;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Copy_Click(object sender, MouseEventArgs e) {
|
||||||
|
if (encoded.Length < 1) {
|
||||||
|
MessageBox.Show("Nothing to copy! Type some symbols first.", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// Sycle through ecoded bytes of test text
|
||||||
|
int space = (int)nudSpace.Value;
|
||||||
|
int index = 0;
|
||||||
|
int i, j;
|
||||||
|
MainForm.FrameMiniature ff = new(0, width, frames[0].height);
|
||||||
|
for (int c = 0; c < encoded.Length; c++) {
|
||||||
|
// Check if we have such symbol
|
||||||
|
var f = frames.FindAll(x => x.code == encoded[c]);
|
||||||
|
if (f.Count == 1) {
|
||||||
|
// Draw the symbol
|
||||||
|
for (i = 0; i < f[0].width; i++) {
|
||||||
|
for (j = 0; j < f[0].height; j++) {
|
||||||
|
// Fill the frame with data
|
||||||
|
ff.data[index + i, j] = f[0].data[i, j];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
index += (f[0].width > 0 ? f[0].width + space : 0);
|
||||||
|
} else {
|
||||||
|
index += 5 + space;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Copy the frame we made into Clipboard
|
||||||
|
var bb = MessagePackSerializer.Serialize(ChangeHistory.CopyFrameSimple(ff));
|
||||||
|
DataObject clpbObj = new DataObject(clpbFormat.Name, bb);
|
||||||
|
Clipboard.SetDataObject(clpbObj, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
424
McBitFont/Form1.Designer.cs
generated
@@ -28,12 +28,13 @@
|
|||||||
dotPanel = new System.Windows.Forms.Panel();
|
dotPanel = new System.Windows.Forms.Panel();
|
||||||
nudX = new System.Windows.Forms.NumericUpDown();
|
nudX = new System.Windows.Forms.NumericUpDown();
|
||||||
nudY = new System.Windows.Forms.NumericUpDown();
|
nudY = new System.Windows.Forms.NumericUpDown();
|
||||||
label1 = new System.Windows.Forms.Label();
|
lblWidth = new System.Windows.Forms.Label();
|
||||||
label2 = new System.Windows.Forms.Label();
|
lblHeight = new System.Windows.Forms.Label();
|
||||||
lblType = new System.Windows.Forms.Label();
|
lblType = new System.Windows.Forms.Label();
|
||||||
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();
|
||||||
@@ -85,8 +87,12 @@
|
|||||||
removeSymbolToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
removeSymbolToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
removeBeforeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
removeBeforeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
removeAfterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
removeAfterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
zerofyWidthToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
CodeShiftToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
CodeShiftToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
|
toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
|
previousSymbolToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
nextSymbolToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
testFontToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
testFontToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
canvasToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
canvasToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
ClearToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
ClearToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
@@ -100,6 +106,7 @@
|
|||||||
mirrorYToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
mirrorYToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
applyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
applyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
toggleBarToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
dlgSave = new System.Windows.Forms.SaveFileDialog();
|
dlgSave = new System.Windows.Forms.SaveFileDialog();
|
||||||
dlgOpen = new System.Windows.Forms.OpenFileDialog();
|
dlgOpen = new System.Windows.Forms.OpenFileDialog();
|
||||||
btnBaseline = new System.Windows.Forms.Button();
|
btnBaseline = new System.Windows.Forms.Button();
|
||||||
@@ -108,16 +115,28 @@
|
|||||||
chkTopSide = new System.Windows.Forms.CheckBox();
|
chkTopSide = new System.Windows.Forms.CheckBox();
|
||||||
chkHexCodes = new System.Windows.Forms.CheckBox();
|
chkHexCodes = new System.Windows.Forms.CheckBox();
|
||||||
chkRectSelect = new System.Windows.Forms.CheckBox();
|
chkRectSelect = new System.Windows.Forms.CheckBox();
|
||||||
|
nudBrush = new System.Windows.Forms.NumericUpDown();
|
||||||
label3 = new System.Windows.Forms.Label();
|
label3 = new System.Windows.Forms.Label();
|
||||||
lblSelectionLabel = new System.Windows.Forms.Label();
|
lblSelectionLabel = new System.Windows.Forms.Label();
|
||||||
lblSelection = new System.Windows.Forms.Label();
|
lblSelection = new System.Windows.Forms.Label();
|
||||||
lblModified = new System.Windows.Forms.Label();
|
lblModified = new System.Windows.Forms.Label();
|
||||||
dlgSavePNG = new System.Windows.Forms.SaveFileDialog();
|
dlgSavePNG = new System.Windows.Forms.SaveFileDialog();
|
||||||
|
pnlRightButtons = new System.Windows.Forms.Panel();
|
||||||
|
lblBrush = new System.Windows.Forms.Label();
|
||||||
|
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();
|
||||||
cmMinilist.SuspendLayout();
|
cmMinilist.SuspendLayout();
|
||||||
menuStrip1.SuspendLayout();
|
menuStrip1.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)nudBrush).BeginInit();
|
||||||
|
pnlRightButtons.SuspendLayout();
|
||||||
|
pnlInfo.SuspendLayout();
|
||||||
|
cmBaseline.SuspendLayout();
|
||||||
SuspendLayout();
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// dotPanel
|
// dotPanel
|
||||||
@@ -137,8 +156,7 @@
|
|||||||
//
|
//
|
||||||
// nudX
|
// nudX
|
||||||
//
|
//
|
||||||
nudX.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
|
nudX.Location = new System.Drawing.Point(59, 3);
|
||||||
nudX.Location = new System.Drawing.Point(777, 31);
|
|
||||||
nudX.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
nudX.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
nudX.Maximum = new decimal(new int[] { 255, 0, 0, 0 });
|
nudX.Maximum = new decimal(new int[] { 255, 0, 0, 0 });
|
||||||
nudX.Name = "nudX";
|
nudX.Name = "nudX";
|
||||||
@@ -150,8 +168,7 @@
|
|||||||
//
|
//
|
||||||
// nudY
|
// nudY
|
||||||
//
|
//
|
||||||
nudY.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
|
nudY.Location = new System.Drawing.Point(59, 27);
|
||||||
nudY.Location = new System.Drawing.Point(777, 57);
|
|
||||||
nudY.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
nudY.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
nudY.Maximum = new decimal(new int[] { 255, 0, 0, 0 });
|
nudY.Maximum = new decimal(new int[] { 255, 0, 0, 0 });
|
||||||
nudY.Minimum = new decimal(new int[] { 1, 0, 0, 0 });
|
nudY.Minimum = new decimal(new int[] { 1, 0, 0, 0 });
|
||||||
@@ -162,32 +179,29 @@
|
|||||||
nudY.Value = new decimal(new int[] { 32, 0, 0, 0 });
|
nudY.Value = new decimal(new int[] { 32, 0, 0, 0 });
|
||||||
nudY.ValueChanged += nudY_ValueChanged;
|
nudY.ValueChanged += nudY_ValueChanged;
|
||||||
//
|
//
|
||||||
// label1
|
// lblWidth
|
||||||
//
|
//
|
||||||
label1.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
|
lblWidth.AutoSize = true;
|
||||||
label1.AutoSize = true;
|
lblWidth.Location = new System.Drawing.Point(8, 5);
|
||||||
label1.Location = new System.Drawing.Point(726, 33);
|
lblWidth.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||||
label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
lblWidth.Name = "lblWidth";
|
||||||
label1.Name = "label1";
|
lblWidth.Size = new System.Drawing.Size(42, 15);
|
||||||
label1.Size = new System.Drawing.Size(42, 15);
|
lblWidth.TabIndex = 3;
|
||||||
label1.TabIndex = 3;
|
lblWidth.Text = "Width:";
|
||||||
label1.Text = "Width:";
|
|
||||||
//
|
//
|
||||||
// label2
|
// lblHeight
|
||||||
//
|
//
|
||||||
label2.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
|
lblHeight.AutoSize = true;
|
||||||
label2.AutoSize = true;
|
lblHeight.Location = new System.Drawing.Point(4, 29);
|
||||||
label2.Location = new System.Drawing.Point(722, 59);
|
lblHeight.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||||
label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
lblHeight.Name = "lblHeight";
|
||||||
label2.Name = "label2";
|
lblHeight.Size = new System.Drawing.Size(46, 15);
|
||||||
label2.Size = new System.Drawing.Size(46, 15);
|
lblHeight.TabIndex = 4;
|
||||||
label2.TabIndex = 4;
|
lblHeight.Text = "Height:";
|
||||||
label2.Text = "Height:";
|
|
||||||
//
|
//
|
||||||
// lblType
|
// lblType
|
||||||
//
|
//
|
||||||
lblType.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
|
lblType.Location = new System.Drawing.Point(2, 136);
|
||||||
lblType.Location = new System.Drawing.Point(718, 159);
|
|
||||||
lblType.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
lblType.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||||
lblType.Name = "lblType";
|
lblType.Name = "lblType";
|
||||||
lblType.Size = new System.Drawing.Size(181, 15);
|
lblType.Size = new System.Drawing.Size(181, 15);
|
||||||
@@ -201,19 +215,19 @@
|
|||||||
cbZoom.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
cbZoom.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
cbZoom.FormattingEnabled = true;
|
cbZoom.FormattingEnabled = true;
|
||||||
cbZoom.Items.AddRange(new object[] { "2", "3", "5", "10", "15", "20", "25", "30", "35", "40", "45", "50" });
|
cbZoom.Items.AddRange(new object[] { "2", "3", "5", "10", "15", "20", "25", "30", "35", "40", "45", "50" });
|
||||||
cbZoom.Location = new System.Drawing.Point(619, 52);
|
cbZoom.Location = new System.Drawing.Point(7, 28);
|
||||||
cbZoom.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
cbZoom.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
cbZoom.Name = "cbZoom";
|
cbZoom.Name = "cbZoom";
|
||||||
cbZoom.Size = new System.Drawing.Size(75, 23);
|
cbZoom.Size = new System.Drawing.Size(75, 23);
|
||||||
cbZoom.TabIndex = 6;
|
cbZoom.TabIndex = 6;
|
||||||
cbZoom.TabStop = false;
|
cbZoom.TabStop = false;
|
||||||
toolTip1.SetToolTip(cbZoom, "Canvas zoom level");
|
toolTip1.SetToolTip(cbZoom, "Canvas zoom level (Ctrl+Scroll)");
|
||||||
//
|
//
|
||||||
// label4
|
// label4
|
||||||
//
|
//
|
||||||
label4.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
|
label4.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
|
||||||
label4.AutoSize = true;
|
label4.AutoSize = true;
|
||||||
label4.Location = new System.Drawing.Point(618, 33);
|
label4.Location = new System.Drawing.Point(6, 9);
|
||||||
label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||||
label4.Name = "label4";
|
label4.Name = "label4";
|
||||||
label4.Size = new System.Drawing.Size(69, 15);
|
label4.Size = new System.Drawing.Size(69, 15);
|
||||||
@@ -223,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);
|
||||||
@@ -233,47 +247,58 @@
|
|||||||
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.Location = new System.Drawing.Point(92, 9);
|
btnFill.Image = Properties.Resources.Canvas_Fill;
|
||||||
|
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);
|
||||||
btnFill.TabIndex = 8;
|
btnFill.TabIndex = 8;
|
||||||
btnFill.Text = "⬤";
|
toolTip1.SetToolTip(btnFill, "Paint canvas black (Ctrl+B)");
|
||||||
toolTip1.SetToolTip(btnFill, "Paint canvas black");
|
|
||||||
btnFill.UseVisualStyleBackColor = true;
|
btnFill.UseVisualStyleBackColor = true;
|
||||||
btnFill.Click += btnFill_Click;
|
btnFill.Click += btnFill_Click;
|
||||||
//
|
//
|
||||||
// btnClear
|
// btnClear
|
||||||
//
|
//
|
||||||
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.Location = new System.Drawing.Point(8, 9);
|
btnClear.Image = Properties.Resources.Canvas_Clear;
|
||||||
|
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);
|
||||||
btnClear.TabIndex = 7;
|
btnClear.TabIndex = 7;
|
||||||
btnClear.Text = "○";
|
toolTip1.SetToolTip(btnClear, "Paint canvas white (Ctrl+W)");
|
||||||
toolTip1.SetToolTip(btnClear, "Paint canvas white");
|
|
||||||
btnClear.UseVisualStyleBackColor = true;
|
btnClear.UseVisualStyleBackColor = true;
|
||||||
btnClear.Click += btnClear_Click;
|
btnClear.Click += btnClear_Click;
|
||||||
//
|
//
|
||||||
// btnMirrorY
|
// btnMirrorY
|
||||||
//
|
//
|
||||||
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.Location = new System.Drawing.Point(92, 92);
|
btnMirrorY.Image = Properties.Resources.Famfamfam_Silk_Shape_flip_vertical_16;
|
||||||
|
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);
|
||||||
btnMirrorY.TabIndex = 6;
|
btnMirrorY.TabIndex = 6;
|
||||||
btnMirrorY.Text = "⩥";
|
|
||||||
toolTip1.SetToolTip(btnMirrorY, "Mirror by Y axis (vertical)");
|
toolTip1.SetToolTip(btnMirrorY, "Mirror by Y axis (vertical)");
|
||||||
btnMirrorY.UseVisualStyleBackColor = true;
|
btnMirrorY.UseVisualStyleBackColor = true;
|
||||||
btnMirrorY.Click += btnMirrorY_Click;
|
btnMirrorY.Click += btnMirrorY_Click;
|
||||||
@@ -281,12 +306,12 @@
|
|||||||
// btnMirrorX
|
// btnMirrorX
|
||||||
//
|
//
|
||||||
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.Location = new System.Drawing.Point(50, 92);
|
btnMirrorX.Image = Properties.Resources.Famfamfam_Silk_Shape_flip_horizontal_16;
|
||||||
|
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);
|
||||||
btnMirrorX.TabIndex = 5;
|
btnMirrorX.TabIndex = 5;
|
||||||
btnMirrorX.Text = "◮";
|
|
||||||
toolTip1.SetToolTip(btnMirrorX, "Mirror by X axis (horizontal)");
|
toolTip1.SetToolTip(btnMirrorX, "Mirror by X axis (horizontal)");
|
||||||
btnMirrorX.UseVisualStyleBackColor = true;
|
btnMirrorX.UseVisualStyleBackColor = true;
|
||||||
btnMirrorX.Click += btnMirrorX_Click;
|
btnMirrorX.Click += btnMirrorX_Click;
|
||||||
@@ -294,73 +319,72 @@
|
|||||||
// btnInvert
|
// btnInvert
|
||||||
//
|
//
|
||||||
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.Location = new System.Drawing.Point(8, 92);
|
btnInvert.Image = Properties.Resources.z_contrast;
|
||||||
|
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);
|
||||||
btnInvert.TabIndex = 4;
|
btnInvert.TabIndex = 4;
|
||||||
btnInvert.Text = "◪";
|
toolTip1.SetToolTip(btnInvert, "Invert pixel colors (Ctrl+I)");
|
||||||
toolTip1.SetToolTip(btnInvert, "Invert pixel colors");
|
|
||||||
btnInvert.UseVisualStyleBackColor = true;
|
btnInvert.UseVisualStyleBackColor = true;
|
||||||
btnInvert.Click += btnInvert_Click;
|
btnInvert.Click += btnInvert_Click;
|
||||||
//
|
//
|
||||||
// btnShiftDown
|
// btnShiftDown
|
||||||
//
|
//
|
||||||
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.Location = new System.Drawing.Point(50, 51);
|
btnShiftDown.Image = Properties.Resources.z_down;
|
||||||
|
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);
|
||||||
btnShiftDown.TabIndex = 3;
|
btnShiftDown.TabIndex = 3;
|
||||||
btnShiftDown.Text = "▼";
|
toolTip1.SetToolTip(btnShiftDown, "Shift pixels down (Ctrl+Down)");
|
||||||
toolTip1.SetToolTip(btnShiftDown, "Shift pixels down");
|
|
||||||
btnShiftDown.UseVisualStyleBackColor = true;
|
btnShiftDown.UseVisualStyleBackColor = true;
|
||||||
btnShiftDown.Click += btnShiftDown_Click;
|
btnShiftDown.Click += btnShiftDown_Click;
|
||||||
//
|
//
|
||||||
// btnShiftUp
|
// btnShiftUp
|
||||||
//
|
//
|
||||||
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.Location = new System.Drawing.Point(50, 9);
|
btnShiftUp.Image = Properties.Resources.z_uo;
|
||||||
|
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);
|
||||||
btnShiftUp.TabIndex = 2;
|
btnShiftUp.TabIndex = 2;
|
||||||
btnShiftUp.Text = "▲";
|
toolTip1.SetToolTip(btnShiftUp, "Shift pixels up (Ctrl+Up)");
|
||||||
toolTip1.SetToolTip(btnShiftUp, "Shift pixels up");
|
|
||||||
btnShiftUp.UseVisualStyleBackColor = true;
|
btnShiftUp.UseVisualStyleBackColor = true;
|
||||||
btnShiftUp.Click += btnShiftUp_Click;
|
btnShiftUp.Click += btnShiftUp_Click;
|
||||||
//
|
//
|
||||||
// btnShiftRight
|
// btnShiftRight
|
||||||
//
|
//
|
||||||
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.Location = new System.Drawing.Point(92, 51);
|
btnShiftRight.Image = Properties.Resources.z_right;
|
||||||
|
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);
|
||||||
btnShiftRight.TabIndex = 1;
|
btnShiftRight.TabIndex = 1;
|
||||||
btnShiftRight.Text = "▶";
|
toolTip1.SetToolTip(btnShiftRight, "Shift pixels right (Ctrl+Right)");
|
||||||
toolTip1.SetToolTip(btnShiftRight, "Shift pixels right");
|
|
||||||
btnShiftRight.UseVisualStyleBackColor = true;
|
btnShiftRight.UseVisualStyleBackColor = true;
|
||||||
btnShiftRight.Click += btnShiftRight_Click;
|
btnShiftRight.Click += btnShiftRight_Click;
|
||||||
//
|
//
|
||||||
// btnShiftLeft
|
// btnShiftLeft
|
||||||
//
|
//
|
||||||
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.Location = new System.Drawing.Point(8, 51);
|
btnShiftLeft.Image = Properties.Resources.z_left;
|
||||||
|
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);
|
||||||
btnShiftLeft.TabIndex = 0;
|
btnShiftLeft.TabIndex = 0;
|
||||||
btnShiftLeft.Text = "◀";
|
toolTip1.SetToolTip(btnShiftLeft, "Shift pixels left (Ctrl+Left)");
|
||||||
toolTip1.SetToolTip(btnShiftLeft, "Shift pixels left");
|
|
||||||
btnShiftLeft.UseVisualStyleBackColor = true;
|
btnShiftLeft.UseVisualStyleBackColor = true;
|
||||||
btnShiftLeft.Click += btnShiftLeft_Click;
|
btnShiftLeft.Click += btnShiftLeft_Click;
|
||||||
//
|
//
|
||||||
// btnExport
|
// btnExport
|
||||||
//
|
//
|
||||||
btnExport.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
|
|
||||||
btnExport.Image = Properties.Resources.z_export;
|
btnExport.Image = Properties.Resources.z_export;
|
||||||
btnExport.Location = new System.Drawing.Point(812, 126);
|
btnExport.Location = new System.Drawing.Point(94, 109);
|
||||||
btnExport.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
btnExport.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
btnExport.Name = "btnExport";
|
btnExport.Name = "btnExport";
|
||||||
btnExport.Size = new System.Drawing.Size(88, 27);
|
btnExport.Size = new System.Drawing.Size(88, 27);
|
||||||
@@ -368,7 +392,7 @@
|
|||||||
btnExport.Text = " Export";
|
btnExport.Text = " Export";
|
||||||
btnExport.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
btnExport.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||||
btnExport.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
btnExport.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||||
toolTip1.SetToolTip(btnExport, "Configure and export data");
|
toolTip1.SetToolTip(btnExport, "Configure and export data (Ctrl+E)");
|
||||||
btnExport.UseVisualStyleBackColor = true;
|
btnExport.UseVisualStyleBackColor = true;
|
||||||
btnExport.Click += Export_Click;
|
btnExport.Click += Export_Click;
|
||||||
//
|
//
|
||||||
@@ -385,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;
|
||||||
@@ -476,9 +501,8 @@
|
|||||||
//
|
//
|
||||||
// btnApply
|
// btnApply
|
||||||
//
|
//
|
||||||
btnApply.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
|
|
||||||
btnApply.Image = Properties.Resources.z_tick;
|
btnApply.Image = Properties.Resources.z_tick;
|
||||||
btnApply.Location = new System.Drawing.Point(718, 126);
|
btnApply.Location = new System.Drawing.Point(4, 109);
|
||||||
btnApply.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
btnApply.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
btnApply.Name = "btnApply";
|
btnApply.Name = "btnApply";
|
||||||
btnApply.Size = new System.Drawing.Size(88, 27);
|
btnApply.Size = new System.Drawing.Size(88, 27);
|
||||||
@@ -486,14 +510,17 @@
|
|||||||
btnApply.Text = " Apply";
|
btnApply.Text = " Apply";
|
||||||
btnApply.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
btnApply.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||||
btnApply.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
btnApply.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||||
toolTip1.SetToolTip(btnApply, "Apply changes made to the symbol");
|
toolTip1.SetToolTip(btnApply, "Apply changes made to the symbol (Ctrl+Space)");
|
||||||
btnApply.UseVisualStyleBackColor = true;
|
btnApply.UseVisualStyleBackColor = true;
|
||||||
btnApply.Click += button2_Click;
|
btnApply.Click += button2_Click;
|
||||||
//
|
//
|
||||||
// hScroll
|
// hScroll
|
||||||
//
|
//
|
||||||
hScroll.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
|
hScroll.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
|
||||||
|
hScroll.Enabled = false;
|
||||||
|
hScroll.LargeChange = 2;
|
||||||
hScroll.Location = new System.Drawing.Point(14, 609);
|
hScroll.Location = new System.Drawing.Point(14, 609);
|
||||||
|
hScroll.Maximum = 1;
|
||||||
hScroll.Name = "hScroll";
|
hScroll.Name = "hScroll";
|
||||||
hScroll.Size = new System.Drawing.Size(427, 21);
|
hScroll.Size = new System.Drawing.Size(427, 21);
|
||||||
hScroll.TabIndex = 14;
|
hScroll.TabIndex = 14;
|
||||||
@@ -502,8 +529,10 @@
|
|||||||
// vScroll
|
// vScroll
|
||||||
//
|
//
|
||||||
vScroll.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right;
|
vScroll.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right;
|
||||||
vScroll.LargeChange = 25;
|
vScroll.Enabled = false;
|
||||||
|
vScroll.LargeChange = 2;
|
||||||
vScroll.Location = new System.Drawing.Point(444, 31);
|
vScroll.Location = new System.Drawing.Point(444, 31);
|
||||||
|
vScroll.Maximum = 1;
|
||||||
vScroll.Name = "vScroll";
|
vScroll.Name = "vScroll";
|
||||||
vScroll.Size = new System.Drawing.Size(21, 575);
|
vScroll.Size = new System.Drawing.Size(21, 575);
|
||||||
vScroll.TabIndex = 15;
|
vScroll.TabIndex = 15;
|
||||||
@@ -513,7 +542,7 @@
|
|||||||
//
|
//
|
||||||
lblCoords.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
|
lblCoords.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
|
||||||
lblCoords.AutoSize = true;
|
lblCoords.AutoSize = true;
|
||||||
lblCoords.Location = new System.Drawing.Point(616, 138);
|
lblCoords.Location = new System.Drawing.Point(4, 114);
|
||||||
lblCoords.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
lblCoords.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||||
lblCoords.Name = "lblCoords";
|
lblCoords.Name = "lblCoords";
|
||||||
lblCoords.Size = new System.Drawing.Size(24, 15);
|
lblCoords.Size = new System.Drawing.Size(24, 15);
|
||||||
@@ -523,7 +552,7 @@
|
|||||||
//
|
//
|
||||||
// menuStrip1
|
// menuStrip1
|
||||||
//
|
//
|
||||||
menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { fileToolStripMenuItem, editToolStripMenuItem, fontToolStripMenuItem, canvasToolStripMenuItem, aboutToolStripMenuItem });
|
menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { fileToolStripMenuItem, editToolStripMenuItem, fontToolStripMenuItem, canvasToolStripMenuItem, aboutToolStripMenuItem, toggleBarToolStripMenuItem });
|
||||||
menuStrip1.Location = new System.Drawing.Point(0, 0);
|
menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||||
menuStrip1.Name = "menuStrip1";
|
menuStrip1.Name = "menuStrip1";
|
||||||
menuStrip1.Padding = new System.Windows.Forms.Padding(7, 2, 0, 2);
|
menuStrip1.Padding = new System.Windows.Forms.Padding(7, 2, 0, 2);
|
||||||
@@ -533,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";
|
||||||
@@ -618,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";
|
||||||
@@ -714,16 +753,17 @@
|
|||||||
//
|
//
|
||||||
// fontToolStripMenuItem
|
// fontToolStripMenuItem
|
||||||
//
|
//
|
||||||
fontToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { makeVarWidthToolStripMenuItem, prependSymbolToolStripMenuItem, appendSymbolToolStripMenuItem, removeSymbolToolStripMenuItem, removeBeforeToolStripMenuItem, removeAfterToolStripMenuItem, CodeShiftToolStripMenuItem, toolStripSeparator3, testFontToolStripMenuItem });
|
fontToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { makeVarWidthToolStripMenuItem, prependSymbolToolStripMenuItem, appendSymbolToolStripMenuItem, removeSymbolToolStripMenuItem, removeBeforeToolStripMenuItem, removeAfterToolStripMenuItem, zerofyWidthToolStripMenuItem, CodeShiftToolStripMenuItem, toolStripSeparator3, previousSymbolToolStripMenuItem, nextSymbolToolStripMenuItem, toolStripSeparator4, testFontToolStripMenuItem });
|
||||||
fontToolStripMenuItem.Name = "fontToolStripMenuItem";
|
fontToolStripMenuItem.Name = "fontToolStripMenuItem";
|
||||||
fontToolStripMenuItem.Size = new System.Drawing.Size(43, 20);
|
fontToolStripMenuItem.Size = new System.Drawing.Size(43, 20);
|
||||||
fontToolStripMenuItem.Text = "Font";
|
fontToolStripMenuItem.Text = "Font";
|
||||||
|
fontToolStripMenuItem.DropDownOpening += fontToolStripMenuItem_DropDownOpening;
|
||||||
//
|
//
|
||||||
// makeVarWidthToolStripMenuItem
|
// makeVarWidthToolStripMenuItem
|
||||||
//
|
//
|
||||||
makeVarWidthToolStripMenuItem.Image = Properties.Resources.z_asterisk;
|
makeVarWidthToolStripMenuItem.Image = Properties.Resources.z_asterisk;
|
||||||
makeVarWidthToolStripMenuItem.Name = "makeVarWidthToolStripMenuItem";
|
makeVarWidthToolStripMenuItem.Name = "makeVarWidthToolStripMenuItem";
|
||||||
makeVarWidthToolStripMenuItem.Size = new System.Drawing.Size(215, 22);
|
makeVarWidthToolStripMenuItem.Size = new System.Drawing.Size(241, 22);
|
||||||
makeVarWidthToolStripMenuItem.Text = "Make Variable Width";
|
makeVarWidthToolStripMenuItem.Text = "Make Variable Width";
|
||||||
makeVarWidthToolStripMenuItem.ToolTipText = "Make Font Variable width one";
|
makeVarWidthToolStripMenuItem.ToolTipText = "Make Font Variable width one";
|
||||||
makeVarWidthToolStripMenuItem.Visible = false;
|
makeVarWidthToolStripMenuItem.Visible = false;
|
||||||
@@ -736,7 +776,7 @@
|
|||||||
prependSymbolToolStripMenuItem.Name = "prependSymbolToolStripMenuItem";
|
prependSymbolToolStripMenuItem.Name = "prependSymbolToolStripMenuItem";
|
||||||
prependSymbolToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+Ins";
|
prependSymbolToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+Ins";
|
||||||
prependSymbolToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Insert;
|
prependSymbolToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Insert;
|
||||||
prependSymbolToolStripMenuItem.Size = new System.Drawing.Size(215, 22);
|
prependSymbolToolStripMenuItem.Size = new System.Drawing.Size(241, 22);
|
||||||
prependSymbolToolStripMenuItem.Text = "Prepend symbol";
|
prependSymbolToolStripMenuItem.Text = "Prepend symbol";
|
||||||
prependSymbolToolStripMenuItem.ToolTipText = "Add a symbol to the beginning of the sequence";
|
prependSymbolToolStripMenuItem.ToolTipText = "Add a symbol to the beginning of the sequence";
|
||||||
prependSymbolToolStripMenuItem.Click += prependSymbolToolStripMenuItem_Click;
|
prependSymbolToolStripMenuItem.Click += prependSymbolToolStripMenuItem_Click;
|
||||||
@@ -748,7 +788,7 @@
|
|||||||
appendSymbolToolStripMenuItem.Name = "appendSymbolToolStripMenuItem";
|
appendSymbolToolStripMenuItem.Name = "appendSymbolToolStripMenuItem";
|
||||||
appendSymbolToolStripMenuItem.ShortcutKeyDisplayString = "";
|
appendSymbolToolStripMenuItem.ShortcutKeyDisplayString = "";
|
||||||
appendSymbolToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.End;
|
appendSymbolToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.End;
|
||||||
appendSymbolToolStripMenuItem.Size = new System.Drawing.Size(215, 22);
|
appendSymbolToolStripMenuItem.Size = new System.Drawing.Size(241, 22);
|
||||||
appendSymbolToolStripMenuItem.Text = "Append symbol";
|
appendSymbolToolStripMenuItem.Text = "Append symbol";
|
||||||
appendSymbolToolStripMenuItem.ToolTipText = "Add a symbol to the end of the sequence";
|
appendSymbolToolStripMenuItem.ToolTipText = "Add a symbol to the end of the sequence";
|
||||||
appendSymbolToolStripMenuItem.Click += prependSymbolToolStripMenuItem_Click;
|
appendSymbolToolStripMenuItem.Click += prependSymbolToolStripMenuItem_Click;
|
||||||
@@ -760,7 +800,7 @@
|
|||||||
removeSymbolToolStripMenuItem.Name = "removeSymbolToolStripMenuItem";
|
removeSymbolToolStripMenuItem.Name = "removeSymbolToolStripMenuItem";
|
||||||
removeSymbolToolStripMenuItem.ShortcutKeyDisplayString = "";
|
removeSymbolToolStripMenuItem.ShortcutKeyDisplayString = "";
|
||||||
removeSymbolToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Delete;
|
removeSymbolToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Delete;
|
||||||
removeSymbolToolStripMenuItem.Size = new System.Drawing.Size(215, 22);
|
removeSymbolToolStripMenuItem.Size = new System.Drawing.Size(241, 22);
|
||||||
removeSymbolToolStripMenuItem.Text = "Remove symbol";
|
removeSymbolToolStripMenuItem.Text = "Remove symbol";
|
||||||
removeSymbolToolStripMenuItem.ToolTipText = "Remove current symbol (works only for first or last symbol in the sequence)";
|
removeSymbolToolStripMenuItem.ToolTipText = "Remove current symbol (works only for first or last symbol in the sequence)";
|
||||||
removeSymbolToolStripMenuItem.Click += removeSymbolToolStripMenuItem_Click;
|
removeSymbolToolStripMenuItem.Click += removeSymbolToolStripMenuItem_Click;
|
||||||
@@ -770,7 +810,7 @@
|
|||||||
removeBeforeToolStripMenuItem.Enabled = false;
|
removeBeforeToolStripMenuItem.Enabled = false;
|
||||||
removeBeforeToolStripMenuItem.Image = Properties.Resources.delete;
|
removeBeforeToolStripMenuItem.Image = Properties.Resources.delete;
|
||||||
removeBeforeToolStripMenuItem.Name = "removeBeforeToolStripMenuItem";
|
removeBeforeToolStripMenuItem.Name = "removeBeforeToolStripMenuItem";
|
||||||
removeBeforeToolStripMenuItem.Size = new System.Drawing.Size(215, 22);
|
removeBeforeToolStripMenuItem.Size = new System.Drawing.Size(241, 22);
|
||||||
removeBeforeToolStripMenuItem.Text = "Remove all before selected";
|
removeBeforeToolStripMenuItem.Text = "Remove all before selected";
|
||||||
removeBeforeToolStripMenuItem.ToolTipText = "Remove all symbols before current one";
|
removeBeforeToolStripMenuItem.ToolTipText = "Remove all symbols before current one";
|
||||||
removeBeforeToolStripMenuItem.Click += removeBeforeToolStripMenuItem_Click;
|
removeBeforeToolStripMenuItem.Click += removeBeforeToolStripMenuItem_Click;
|
||||||
@@ -780,16 +820,26 @@
|
|||||||
removeAfterToolStripMenuItem.Enabled = false;
|
removeAfterToolStripMenuItem.Enabled = false;
|
||||||
removeAfterToolStripMenuItem.Image = Properties.Resources.delete;
|
removeAfterToolStripMenuItem.Image = Properties.Resources.delete;
|
||||||
removeAfterToolStripMenuItem.Name = "removeAfterToolStripMenuItem";
|
removeAfterToolStripMenuItem.Name = "removeAfterToolStripMenuItem";
|
||||||
removeAfterToolStripMenuItem.Size = new System.Drawing.Size(215, 22);
|
removeAfterToolStripMenuItem.Size = new System.Drawing.Size(241, 22);
|
||||||
removeAfterToolStripMenuItem.Text = "Remove all after selected";
|
removeAfterToolStripMenuItem.Text = "Remove all after selected";
|
||||||
removeAfterToolStripMenuItem.ToolTipText = "Remove all symbols after current one";
|
removeAfterToolStripMenuItem.ToolTipText = "Remove all symbols after current one";
|
||||||
removeAfterToolStripMenuItem.Click += removeAfterToolStripMenuItem_Click;
|
removeAfterToolStripMenuItem.Click += removeAfterToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
|
// zerofyWidthToolStripMenuItem
|
||||||
|
//
|
||||||
|
zerofyWidthToolStripMenuItem.Enabled = false;
|
||||||
|
zerofyWidthToolStripMenuItem.Image = Properties.Resources.text_letterspacing2;
|
||||||
|
zerofyWidthToolStripMenuItem.Name = "zerofyWidthToolStripMenuItem";
|
||||||
|
zerofyWidthToolStripMenuItem.Size = new System.Drawing.Size(241, 22);
|
||||||
|
zerofyWidthToolStripMenuItem.Text = "Make all blank symbols 0-width";
|
||||||
|
zerofyWidthToolStripMenuItem.ToolTipText = "Make width equals zero for all blank symbols (except code 32 (space))";
|
||||||
|
zerofyWidthToolStripMenuItem.Click += ZerofyBlankWidth;
|
||||||
|
//
|
||||||
// CodeShiftToolStripMenuItem
|
// CodeShiftToolStripMenuItem
|
||||||
//
|
//
|
||||||
CodeShiftToolStripMenuItem.Image = Properties.Resources.z_align_center;
|
CodeShiftToolStripMenuItem.Image = Properties.Resources.z_align_center;
|
||||||
CodeShiftToolStripMenuItem.Name = "CodeShiftToolStripMenuItem";
|
CodeShiftToolStripMenuItem.Name = "CodeShiftToolStripMenuItem";
|
||||||
CodeShiftToolStripMenuItem.Size = new System.Drawing.Size(215, 22);
|
CodeShiftToolStripMenuItem.Size = new System.Drawing.Size(241, 22);
|
||||||
CodeShiftToolStripMenuItem.Text = "Code shift";
|
CodeShiftToolStripMenuItem.Text = "Code shift";
|
||||||
CodeShiftToolStripMenuItem.ToolTipText = "Shift the font on the code line";
|
CodeShiftToolStripMenuItem.ToolTipText = "Shift the font on the code line";
|
||||||
CodeShiftToolStripMenuItem.Click += CodeShiftToolStripMenuItem_Click;
|
CodeShiftToolStripMenuItem.Click += CodeShiftToolStripMenuItem_Click;
|
||||||
@@ -797,13 +847,38 @@
|
|||||||
// toolStripSeparator3
|
// toolStripSeparator3
|
||||||
//
|
//
|
||||||
toolStripSeparator3.Name = "toolStripSeparator3";
|
toolStripSeparator3.Name = "toolStripSeparator3";
|
||||||
toolStripSeparator3.Size = new System.Drawing.Size(212, 6);
|
toolStripSeparator3.Size = new System.Drawing.Size(238, 6);
|
||||||
|
//
|
||||||
|
// previousSymbolToolStripMenuItem
|
||||||
|
//
|
||||||
|
previousSymbolToolStripMenuItem.Image = Properties.Resources.arrow_turn_left;
|
||||||
|
previousSymbolToolStripMenuItem.Name = "previousSymbolToolStripMenuItem";
|
||||||
|
previousSymbolToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.Left;
|
||||||
|
previousSymbolToolStripMenuItem.Size = new System.Drawing.Size(241, 22);
|
||||||
|
previousSymbolToolStripMenuItem.Text = "Previous Symbol";
|
||||||
|
previousSymbolToolStripMenuItem.ToolTipText = "Select previous symbol";
|
||||||
|
previousSymbolToolStripMenuItem.Click += previousSymbolToolStripMenuItem_Click;
|
||||||
|
//
|
||||||
|
// nextSymbolToolStripMenuItem
|
||||||
|
//
|
||||||
|
nextSymbolToolStripMenuItem.Image = Properties.Resources.arrow_turn_right;
|
||||||
|
nextSymbolToolStripMenuItem.Name = "nextSymbolToolStripMenuItem";
|
||||||
|
nextSymbolToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.Right;
|
||||||
|
nextSymbolToolStripMenuItem.Size = new System.Drawing.Size(241, 22);
|
||||||
|
nextSymbolToolStripMenuItem.Text = "Next symbol";
|
||||||
|
nextSymbolToolStripMenuItem.ToolTipText = "Select next symbol";
|
||||||
|
nextSymbolToolStripMenuItem.Click += nextSymbolToolStripMenuItem_Click;
|
||||||
|
//
|
||||||
|
// toolStripSeparator4
|
||||||
|
//
|
||||||
|
toolStripSeparator4.Name = "toolStripSeparator4";
|
||||||
|
toolStripSeparator4.Size = new System.Drawing.Size(238, 6);
|
||||||
//
|
//
|
||||||
// testFontToolStripMenuItem
|
// testFontToolStripMenuItem
|
||||||
//
|
//
|
||||||
testFontToolStripMenuItem.Image = Properties.Resources.font;
|
testFontToolStripMenuItem.Image = Properties.Resources.font;
|
||||||
testFontToolStripMenuItem.Name = "testFontToolStripMenuItem";
|
testFontToolStripMenuItem.Name = "testFontToolStripMenuItem";
|
||||||
testFontToolStripMenuItem.Size = new System.Drawing.Size(215, 22);
|
testFontToolStripMenuItem.Size = new System.Drawing.Size(241, 22);
|
||||||
testFontToolStripMenuItem.Text = "Test font";
|
testFontToolStripMenuItem.Text = "Test font";
|
||||||
testFontToolStripMenuItem.ToolTipText = "Open dialog where you can test the font with any text you type";
|
testFontToolStripMenuItem.ToolTipText = "Open dialog where you can test the font with any text you type";
|
||||||
testFontToolStripMenuItem.Click += TestFont_Click;
|
testFontToolStripMenuItem.Click += TestFont_Click;
|
||||||
@@ -929,6 +1004,16 @@
|
|||||||
aboutToolStripMenuItem.Text = "About";
|
aboutToolStripMenuItem.Text = "About";
|
||||||
aboutToolStripMenuItem.Click += aboutToolStripMenuItem_Click;
|
aboutToolStripMenuItem.Click += aboutToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
|
// toggleBarToolStripMenuItem
|
||||||
|
//
|
||||||
|
toggleBarToolStripMenuItem.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
|
||||||
|
toggleBarToolStripMenuItem.CheckOnClick = true;
|
||||||
|
toggleBarToolStripMenuItem.Name = "toggleBarToolStripMenuItem";
|
||||||
|
toggleBarToolStripMenuItem.Size = new System.Drawing.Size(35, 20);
|
||||||
|
toggleBarToolStripMenuItem.Text = ">>";
|
||||||
|
toggleBarToolStripMenuItem.ToolTipText = "Toggle side bar state";
|
||||||
|
toggleBarToolStripMenuItem.Click += toggleBarToolStripMenuItem_Click;
|
||||||
|
//
|
||||||
// dlgSave
|
// dlgSave
|
||||||
//
|
//
|
||||||
dlgSave.DefaultExt = "mbf";
|
dlgSave.DefaultExt = "mbf";
|
||||||
@@ -941,19 +1026,18 @@
|
|||||||
//
|
//
|
||||||
// btnBaseline
|
// btnBaseline
|
||||||
//
|
//
|
||||||
btnBaseline.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
|
btnBaseline.Image = Properties.Resources.fam_lines;
|
||||||
btnBaseline.Image = Properties.Resources.fam_base;
|
btnBaseline.Location = new System.Drawing.Point(94, 81);
|
||||||
btnBaseline.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
|
|
||||||
btnBaseline.Location = new System.Drawing.Point(812, 93);
|
|
||||||
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
|
||||||
//
|
//
|
||||||
@@ -963,9 +1047,8 @@
|
|||||||
//
|
//
|
||||||
// chkLeftSide
|
// chkLeftSide
|
||||||
//
|
//
|
||||||
chkLeftSide.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
|
|
||||||
chkLeftSide.AutoSize = true;
|
chkLeftSide.AutoSize = true;
|
||||||
chkLeftSide.Location = new System.Drawing.Point(831, 33);
|
chkLeftSide.Location = new System.Drawing.Point(113, 5);
|
||||||
chkLeftSide.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
chkLeftSide.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
chkLeftSide.Name = "chkLeftSide";
|
chkLeftSide.Name = "chkLeftSide";
|
||||||
chkLeftSide.Size = new System.Drawing.Size(70, 19);
|
chkLeftSide.Size = new System.Drawing.Size(70, 19);
|
||||||
@@ -976,9 +1059,8 @@
|
|||||||
//
|
//
|
||||||
// chkTopSide
|
// chkTopSide
|
||||||
//
|
//
|
||||||
chkTopSide.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
|
|
||||||
chkTopSide.AutoSize = true;
|
chkTopSide.AutoSize = true;
|
||||||
chkTopSide.Location = new System.Drawing.Point(831, 58);
|
chkTopSide.Location = new System.Drawing.Point(113, 28);
|
||||||
chkTopSide.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
chkTopSide.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
chkTopSide.Name = "chkTopSide";
|
chkTopSide.Name = "chkTopSide";
|
||||||
chkTopSide.Size = new System.Drawing.Size(70, 19);
|
chkTopSide.Size = new System.Drawing.Size(70, 19);
|
||||||
@@ -991,7 +1073,7 @@
|
|||||||
//
|
//
|
||||||
chkHexCodes.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
|
chkHexCodes.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
|
||||||
chkHexCodes.AutoSize = true;
|
chkHexCodes.AutoSize = true;
|
||||||
chkHexCodes.Location = new System.Drawing.Point(618, 155);
|
chkHexCodes.Location = new System.Drawing.Point(6, 131);
|
||||||
chkHexCodes.Name = "chkHexCodes";
|
chkHexCodes.Name = "chkHexCodes";
|
||||||
chkHexCodes.Size = new System.Drawing.Size(95, 19);
|
chkHexCodes.Size = new System.Drawing.Size(95, 19);
|
||||||
chkHexCodes.TabIndex = 22;
|
chkHexCodes.TabIndex = 22;
|
||||||
@@ -1002,26 +1084,38 @@
|
|||||||
//
|
//
|
||||||
// chkRectSelect
|
// chkRectSelect
|
||||||
//
|
//
|
||||||
chkRectSelect.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
|
|
||||||
chkRectSelect.Appearance = System.Windows.Forms.Appearance.Button;
|
chkRectSelect.Appearance = System.Windows.Forms.Appearance.Button;
|
||||||
chkRectSelect.Image = Properties.Resources.fam_rectt;
|
chkRectSelect.Image = Properties.Resources.fam_rectt;
|
||||||
chkRectSelect.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
|
chkRectSelect.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||||
chkRectSelect.Location = new System.Drawing.Point(718, 93);
|
chkRectSelect.Location = new System.Drawing.Point(4, 81);
|
||||||
chkRectSelect.Name = "chkRectSelect";
|
chkRectSelect.Name = "chkRectSelect";
|
||||||
chkRectSelect.Size = new System.Drawing.Size(87, 27);
|
chkRectSelect.Size = new System.Drawing.Size(88, 27);
|
||||||
chkRectSelect.TabIndex = 23;
|
chkRectSelect.TabIndex = 23;
|
||||||
chkRectSelect.Text = " Select";
|
chkRectSelect.Text = " Select";
|
||||||
chkRectSelect.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
chkRectSelect.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||||
chkRectSelect.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
chkRectSelect.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||||
toolTip1.SetToolTip(chkRectSelect, "Turn on/off rectangle selection");
|
toolTip1.SetToolTip(chkRectSelect, "Turn on/off rectangle selection (Ctrl+R)");
|
||||||
chkRectSelect.UseVisualStyleBackColor = true;
|
chkRectSelect.UseVisualStyleBackColor = true;
|
||||||
chkRectSelect.CheckedChanged += chkRectSelect_CheckedChanged;
|
chkRectSelect.CheckedChanged += chkRectSelect_CheckedChanged;
|
||||||
//
|
//
|
||||||
|
// nudBrush
|
||||||
|
//
|
||||||
|
nudBrush.Location = new System.Drawing.Point(59, 51);
|
||||||
|
nudBrush.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
|
nudBrush.Maximum = new decimal(new int[] { 32, 0, 0, 0 });
|
||||||
|
nudBrush.Minimum = new decimal(new int[] { 1, 0, 0, 0 });
|
||||||
|
nudBrush.Name = "nudBrush";
|
||||||
|
nudBrush.Size = new System.Drawing.Size(47, 23);
|
||||||
|
nudBrush.TabIndex = 24;
|
||||||
|
toolTip1.SetToolTip(nudBrush, "Symbol height (Alt+Scroll)");
|
||||||
|
nudBrush.Value = new decimal(new int[] { 1, 0, 0, 0 });
|
||||||
|
nudBrush.ValueChanged += nudBrush_ValueChanged;
|
||||||
|
//
|
||||||
// label3
|
// label3
|
||||||
//
|
//
|
||||||
label3.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
|
label3.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
|
||||||
label3.AutoSize = true;
|
label3.AutoSize = true;
|
||||||
label3.Location = new System.Drawing.Point(615, 123);
|
label3.Location = new System.Drawing.Point(3, 99);
|
||||||
label3.Name = "label3";
|
label3.Name = "label3";
|
||||||
label3.Size = new System.Drawing.Size(45, 15);
|
label3.Size = new System.Drawing.Size(45, 15);
|
||||||
label3.TabIndex = 21;
|
label3.TabIndex = 21;
|
||||||
@@ -1031,7 +1125,7 @@
|
|||||||
//
|
//
|
||||||
lblSelectionLabel.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
|
lblSelectionLabel.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
|
||||||
lblSelectionLabel.AutoSize = true;
|
lblSelectionLabel.AutoSize = true;
|
||||||
lblSelectionLabel.Location = new System.Drawing.Point(616, 93);
|
lblSelectionLabel.Location = new System.Drawing.Point(4, 69);
|
||||||
lblSelectionLabel.Name = "lblSelectionLabel";
|
lblSelectionLabel.Name = "lblSelectionLabel";
|
||||||
lblSelectionLabel.Size = new System.Drawing.Size(58, 15);
|
lblSelectionLabel.Size = new System.Drawing.Size(58, 15);
|
||||||
lblSelectionLabel.TabIndex = 25;
|
lblSelectionLabel.TabIndex = 25;
|
||||||
@@ -1042,12 +1136,12 @@
|
|||||||
//
|
//
|
||||||
lblSelection.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
|
lblSelection.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
|
||||||
lblSelection.AutoSize = true;
|
lblSelection.AutoSize = true;
|
||||||
lblSelection.Location = new System.Drawing.Point(617, 108);
|
lblSelection.Location = new System.Drawing.Point(5, 84);
|
||||||
lblSelection.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
lblSelection.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||||
lblSelection.Name = "lblSelection";
|
lblSelection.Name = "lblSelection";
|
||||||
lblSelection.Size = new System.Drawing.Size(30, 15);
|
lblSelection.Size = new System.Drawing.Size(32, 15);
|
||||||
lblSelection.TabIndex = 24;
|
lblSelection.TabIndex = 24;
|
||||||
lblSelection.Text = "W,H";
|
lblSelection.Text = "WxH";
|
||||||
lblSelection.TextAlign = System.Drawing.ContentAlignment.TopRight;
|
lblSelection.TextAlign = System.Drawing.ContentAlignment.TopRight;
|
||||||
lblSelection.Visible = false;
|
lblSelection.Visible = false;
|
||||||
//
|
//
|
||||||
@@ -1057,7 +1151,7 @@
|
|||||||
lblModified.AutoSize = true;
|
lblModified.AutoSize = true;
|
||||||
lblModified.Font = new System.Drawing.Font("Segoe UI Semibold", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
lblModified.Font = new System.Drawing.Font("Segoe UI Semibold", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
||||||
lblModified.ForeColor = System.Drawing.SystemColors.Highlight;
|
lblModified.ForeColor = System.Drawing.SystemColors.Highlight;
|
||||||
lblModified.Location = new System.Drawing.Point(616, 78);
|
lblModified.Location = new System.Drawing.Point(4, 54);
|
||||||
lblModified.Name = "lblModified";
|
lblModified.Name = "lblModified";
|
||||||
lblModified.Size = new System.Drawing.Size(91, 15);
|
lblModified.Size = new System.Drawing.Size(91, 15);
|
||||||
lblModified.TabIndex = 26;
|
lblModified.TabIndex = 26;
|
||||||
@@ -1069,37 +1163,103 @@
|
|||||||
dlgSavePNG.DefaultExt = "png";
|
dlgSavePNG.DefaultExt = "png";
|
||||||
dlgSavePNG.Filter = "PNG Image|*.png;*.PNG";
|
dlgSavePNG.Filter = "PNG Image|*.png;*.PNG";
|
||||||
//
|
//
|
||||||
|
// pnlRightButtons
|
||||||
|
//
|
||||||
|
pnlRightButtons.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
|
||||||
|
pnlRightButtons.Controls.Add(nudBrush);
|
||||||
|
pnlRightButtons.Controls.Add(lblBrush);
|
||||||
|
pnlRightButtons.Controls.Add(chkLeftSide);
|
||||||
|
pnlRightButtons.Controls.Add(nudX);
|
||||||
|
pnlRightButtons.Controls.Add(nudY);
|
||||||
|
pnlRightButtons.Controls.Add(lblWidth);
|
||||||
|
pnlRightButtons.Controls.Add(lblHeight);
|
||||||
|
pnlRightButtons.Controls.Add(chkRectSelect);
|
||||||
|
pnlRightButtons.Controls.Add(lblType);
|
||||||
|
pnlRightButtons.Controls.Add(btnExport);
|
||||||
|
pnlRightButtons.Controls.Add(btnApply);
|
||||||
|
pnlRightButtons.Controls.Add(chkTopSide);
|
||||||
|
pnlRightButtons.Controls.Add(btnBaseline);
|
||||||
|
pnlRightButtons.Location = new System.Drawing.Point(715, 24);
|
||||||
|
pnlRightButtons.Margin = new System.Windows.Forms.Padding(0);
|
||||||
|
pnlRightButtons.Name = "pnlRightButtons";
|
||||||
|
pnlRightButtons.Size = new System.Drawing.Size(184, 154);
|
||||||
|
pnlRightButtons.TabIndex = 27;
|
||||||
|
//
|
||||||
|
// lblBrush
|
||||||
|
//
|
||||||
|
lblBrush.AutoSize = true;
|
||||||
|
lblBrush.Location = new System.Drawing.Point(10, 54);
|
||||||
|
lblBrush.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||||
|
lblBrush.Name = "lblBrush";
|
||||||
|
lblBrush.Size = new System.Drawing.Size(40, 15);
|
||||||
|
lblBrush.TabIndex = 25;
|
||||||
|
lblBrush.Text = "Brush:";
|
||||||
|
//
|
||||||
|
// pnlInfo
|
||||||
|
//
|
||||||
|
pnlInfo.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
|
||||||
|
pnlInfo.Controls.Add(label4);
|
||||||
|
pnlInfo.Controls.Add(cbZoom);
|
||||||
|
pnlInfo.Controls.Add(lblCoords);
|
||||||
|
pnlInfo.Controls.Add(lblModified);
|
||||||
|
pnlInfo.Controls.Add(label3);
|
||||||
|
pnlInfo.Controls.Add(lblSelectionLabel);
|
||||||
|
pnlInfo.Controls.Add(chkHexCodes);
|
||||||
|
pnlInfo.Controls.Add(lblSelection);
|
||||||
|
pnlInfo.Location = new System.Drawing.Point(615, 24);
|
||||||
|
pnlInfo.Margin = new System.Windows.Forms.Padding(0);
|
||||||
|
pnlInfo.Name = "pnlInfo";
|
||||||
|
pnlInfo.Size = new System.Drawing.Size(103, 154);
|
||||||
|
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);
|
||||||
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
ClientSize = new System.Drawing.Size(915, 647);
|
ClientSize = new System.Drawing.Size(915, 647);
|
||||||
Controls.Add(lblModified);
|
Controls.Add(pnlInfo);
|
||||||
Controls.Add(lblSelectionLabel);
|
Controls.Add(pnlRightButtons);
|
||||||
Controls.Add(lblSelection);
|
|
||||||
Controls.Add(chkRectSelect);
|
|
||||||
Controls.Add(chkHexCodes);
|
|
||||||
Controls.Add(label3);
|
|
||||||
Controls.Add(chkTopSide);
|
|
||||||
Controls.Add(chkLeftSide);
|
|
||||||
Controls.Add(btnBaseline);
|
|
||||||
Controls.Add(btnApply);
|
|
||||||
Controls.Add(btnExport);
|
|
||||||
Controls.Add(lblCoords);
|
|
||||||
Controls.Add(vScroll);
|
Controls.Add(vScroll);
|
||||||
Controls.Add(hScroll);
|
Controls.Add(hScroll);
|
||||||
Controls.Add(miniList);
|
Controls.Add(miniList);
|
||||||
Controls.Add(panel1);
|
Controls.Add(panel1);
|
||||||
Controls.Add(label4);
|
|
||||||
Controls.Add(cbZoom);
|
|
||||||
Controls.Add(lblType);
|
|
||||||
Controls.Add(label2);
|
|
||||||
Controls.Add(label1);
|
|
||||||
Controls.Add(nudY);
|
|
||||||
Controls.Add(nudX);
|
|
||||||
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);
|
||||||
@@ -1108,12 +1268,21 @@
|
|||||||
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();
|
||||||
|
((System.ComponentModel.ISupportInitialize)nudBrush).EndInit();
|
||||||
|
pnlRightButtons.ResumeLayout(false);
|
||||||
|
pnlRightButtons.PerformLayout();
|
||||||
|
pnlInfo.ResumeLayout(false);
|
||||||
|
pnlInfo.PerformLayout();
|
||||||
|
cmBaseline.ResumeLayout(false);
|
||||||
ResumeLayout(false);
|
ResumeLayout(false);
|
||||||
PerformLayout();
|
PerformLayout();
|
||||||
|
|
||||||
@@ -1122,8 +1291,8 @@
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
private System.Windows.Forms.Panel dotPanel;
|
private System.Windows.Forms.Panel dotPanel;
|
||||||
private System.Windows.Forms.Label label1;
|
private System.Windows.Forms.Label lblWidth;
|
||||||
private System.Windows.Forms.Label label2;
|
private System.Windows.Forms.Label lblHeight;
|
||||||
private System.Windows.Forms.Label lblType;
|
private System.Windows.Forms.Label lblType;
|
||||||
private System.Windows.Forms.ComboBox cbZoom;
|
private System.Windows.Forms.ComboBox cbZoom;
|
||||||
private System.Windows.Forms.Label label4;
|
private System.Windows.Forms.Label label4;
|
||||||
@@ -1209,6 +1378,21 @@
|
|||||||
public System.Windows.Forms.ImageList ilMiniatures;
|
public System.Windows.Forms.ImageList ilMiniatures;
|
||||||
public System.Windows.Forms.NumericUpDown nudX;
|
public System.Windows.Forms.NumericUpDown nudX;
|
||||||
public System.Windows.Forms.NumericUpDown nudY;
|
public System.Windows.Forms.NumericUpDown nudY;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem previousSymbolToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem nextSymbolToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.Panel pnlRightButtons;
|
||||||
|
private System.Windows.Forms.Panel pnlInfo;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem toggleBarToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem zerofyWidthToolStripMenuItem;
|
||||||
|
public System.Windows.Forms.NumericUpDown nudBrush;
|
||||||
|
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,15 +73,16 @@ 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.4";
|
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];
|
||||||
|
|
||||||
|
|
||||||
public MainForm() {
|
public MainForm() {
|
||||||
@@ -82,7 +97,7 @@ namespace McBitFont {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateSelectionLabel(int width, int height) {
|
private void UpdateSelectionLabel(int width, int height) {
|
||||||
lblSelection.Text = width.ToString() + ',' + height.ToString();
|
lblSelection.Text = width.ToString() + 'x' + height.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetModified(bool modif = true, bool prj = false) {
|
public void SetModified(bool modif = true, bool prj = false) {
|
||||||
@@ -97,6 +112,30 @@ namespace McBitFont {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if a frame is "blank"
|
||||||
|
private static bool IsFrameBlank(FrameMiniature frame) {
|
||||||
|
if (frame.code == 32) return false; // Space character is always blank, so skip it
|
||||||
|
for (int i = 0; i < frame.width; i++) {
|
||||||
|
for (int j = 0; j < frame.height; j++) {
|
||||||
|
if (frame.data[i, j]) return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remember sidebar panels locations
|
||||||
|
private void SideBarRecalc() {
|
||||||
|
|
||||||
|
sidebarLocs[0, 0] = new Point(this.Width - 459, 24); // tool panel
|
||||||
|
sidebarLocs[0, 1] = new Point(this.Width - 316, 24); // info panel
|
||||||
|
sidebarLocs[0, 2] = new Point(this.Width - 487, 31); // vertical scroll
|
||||||
|
sidebarLocs[1, 0] = new Point(this.Width - panel1.Width - 70, 180); // tool panel
|
||||||
|
sidebarLocs[1, 1] = new Point(this.Width - pnlInfo.Width - 110, 340); // info panel
|
||||||
|
sidebarLocs[1, 2] = new Point(dotPanel.Width + 17, 31); // vertical scroll
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void Form1_Load(object sender, EventArgs e) {
|
private void Form1_Load(object sender, EventArgs e) {
|
||||||
lblType.Text = monospaced ? "Monospaced" : "Variable width / Single";
|
lblType.Text = monospaced ? "Monospaced" : "Variable width / Single";
|
||||||
tsmiMakeVarWidth.Visible = monospaced;
|
tsmiMakeVarWidth.Visible = monospaced;
|
||||||
@@ -128,6 +167,8 @@ namespace McBitFont {
|
|||||||
|
|
||||||
fbuf = new FrameMiniature(0, dotWidth, dotHeight);
|
fbuf = new FrameMiniature(0, dotWidth, dotHeight);
|
||||||
|
|
||||||
|
history = new(this);
|
||||||
|
|
||||||
// Chek for arguments
|
// Chek for arguments
|
||||||
if (Environment.GetCommandLineArgs().Length > 1) {
|
if (Environment.GetCommandLineArgs().Length > 1) {
|
||||||
LoadProject(Environment.GetCommandLineArgs()[1]);
|
LoadProject(Environment.GetCommandLineArgs()[1]);
|
||||||
@@ -140,7 +181,11 @@ namespace McBitFont {
|
|||||||
|
|
||||||
CheckForAdd();
|
CheckForAdd();
|
||||||
|
|
||||||
history = new(this);
|
SideBarRecalc();
|
||||||
|
|
||||||
|
// Create default cursor
|
||||||
|
SetPanelCursor();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[DllImport("user32.dll")]
|
[DllImport("user32.dll")]
|
||||||
@@ -160,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;
|
||||||
}
|
}
|
||||||
@@ -187,6 +234,12 @@ namespace McBitFont {
|
|||||||
if (t > hScroll.Maximum) t = hScroll.Maximum;
|
if (t > hScroll.Maximum) t = hScroll.Maximum;
|
||||||
hScroll.Value = t;
|
hScroll.Value = t;
|
||||||
}
|
}
|
||||||
|
} else if (ModifierKeys.HasFlag(Keys.Alt)) {
|
||||||
|
t += (int)nudBrush.Value;
|
||||||
|
if (t < nudBrush.Minimum) t = (int)nudBrush.Minimum;
|
||||||
|
if (t > nudBrush.Maximum) t = (int)nudBrush.Maximum;
|
||||||
|
if (t > dotWidth || t > dotHeight) t = dotWidth < dotHeight ? dotWidth : dotHeight;
|
||||||
|
nudBrush.Value = t;
|
||||||
} else {
|
} else {
|
||||||
if (vScroll.Enabled) {
|
if (vScroll.Enabled) {
|
||||||
t = t * -1 * (cellSize + gap) + vScroll.Value;
|
t = t * -1 * (cellSize + gap) + vScroll.Value;
|
||||||
@@ -200,14 +253,8 @@ namespace McBitFont {
|
|||||||
public void nudX_ValueChanged(object sender, EventArgs e) {
|
public void nudX_ValueChanged(object sender, EventArgs e) {
|
||||||
Cursor.Current = Cursors.WaitCursor;
|
Cursor.Current = Cursors.WaitCursor;
|
||||||
if (monospaced) {
|
if (monospaced) {
|
||||||
Bitmap bmp;
|
|
||||||
for (int i = 0; i < frames.Count; i++) {
|
for (int i = 0; i < frames.Count; i++) {
|
||||||
frames[i] = FrameResize(frames[i], (int)nudX.Value, dotHeight);
|
frames[i] = FrameResize(frames[i], (int)nudX.Value, dotHeight, true);
|
||||||
bmp = GetMiniPictue(frames[i]);
|
|
||||||
string s = frames[i].code.ToString().PadLeft(3, '0');
|
|
||||||
ilMiniatures.Images.RemoveByKey(s);
|
|
||||||
ilMiniatures.Images.Add(s, (Image)bmp);
|
|
||||||
miniList.Items[s].ImageKey = s;
|
|
||||||
}
|
}
|
||||||
SetModified(true, true);
|
SetModified(true, true);
|
||||||
}
|
}
|
||||||
@@ -218,20 +265,14 @@ namespace McBitFont {
|
|||||||
DotResize((int)nudX.Value, dotHeight);
|
DotResize((int)nudX.Value, dotHeight);
|
||||||
if (monospaced) history.Add(frames);
|
if (monospaced) history.Add(frames);
|
||||||
else history.Add(f);
|
else history.Add(f);
|
||||||
|
|
||||||
Cursor.Current = Cursors.Default;
|
Cursor.Current = Cursors.Default;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void nudY_ValueChanged(object sender, EventArgs e) {
|
public void nudY_ValueChanged(object sender, EventArgs e) {
|
||||||
Cursor.Current = Cursors.WaitCursor;
|
Cursor.Current = Cursors.WaitCursor;
|
||||||
Bitmap bmp;
|
|
||||||
for (int i = 0; i < frames.Count; i++) {
|
for (int i = 0; i < frames.Count; i++) {
|
||||||
frames[i] = FrameResize(frames[i], frames[i].width, (int)nudY.Value);
|
frames[i] = FrameResize(frames[i], frames[i].width, (int)nudY.Value, true);
|
||||||
bmp = GetMiniPictue(frames[i]);
|
|
||||||
string s = frames[i].code.ToString().PadLeft(3, '0');
|
|
||||||
ilMiniatures.Images.RemoveByKey(s);
|
|
||||||
ilMiniatures.Images.Add(s, (Image)bmp);
|
|
||||||
miniList.Items[s].ImageKey = s;
|
|
||||||
}
|
}
|
||||||
if (nudY.Focused) {
|
if (nudY.Focused) {
|
||||||
SetModified();
|
SetModified();
|
||||||
@@ -243,7 +284,7 @@ namespace McBitFont {
|
|||||||
Cursor.Current = Cursors.Default;
|
Cursor.Current = Cursors.Default;
|
||||||
}
|
}
|
||||||
|
|
||||||
private FrameMiniature FrameResize(FrameMiniature ff, int neww, int newh) {
|
private FrameMiniature FrameResize(FrameMiniature ff, int neww, int newh, bool updateMiniList = false) {
|
||||||
int oldw = ff.width;
|
int oldw = ff.width;
|
||||||
int oldh = ff.height;
|
int oldh = ff.height;
|
||||||
int di = 0, dj = 0;
|
int di = 0, dj = 0;
|
||||||
@@ -268,6 +309,15 @@ namespace McBitFont {
|
|||||||
}
|
}
|
||||||
ff.data = t;
|
ff.data = t;
|
||||||
|
|
||||||
|
// update miniList with images
|
||||||
|
if (updateMiniList) {
|
||||||
|
Bitmap bmp = GetMiniPictue(ff);
|
||||||
|
string s = ff.code.ToString().PadLeft(3, '0');
|
||||||
|
ilMiniatures.Images.RemoveByKey(s);
|
||||||
|
ilMiniatures.Images.Add(s, (Image)bmp);
|
||||||
|
miniList.Items[s].ImageKey = s;
|
||||||
|
}
|
||||||
|
|
||||||
return ff;
|
return ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -285,9 +335,6 @@ namespace McBitFont {
|
|||||||
}
|
}
|
||||||
SetNewWH();
|
SetNewWH();
|
||||||
cbZoom_SelectedIndexChanged(cbZoom, null);
|
cbZoom_SelectedIndexChanged(cbZoom, null);
|
||||||
|
|
||||||
// Re-create history object
|
|
||||||
//history = new CanvasHistory();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void cbZoom_SelectedIndexChanged(object sender, EventArgs e) {
|
private void cbZoom_SelectedIndexChanged(object sender, EventArgs e) {
|
||||||
@@ -298,6 +345,7 @@ namespace McBitFont {
|
|||||||
if (w <= dotPanel.Width) {
|
if (w <= dotPanel.Width) {
|
||||||
hScroll.Enabled = false;
|
hScroll.Enabled = false;
|
||||||
hScroll.Value = 0;
|
hScroll.Value = 0;
|
||||||
|
vScroll.Maximum = 0;
|
||||||
} else {
|
} else {
|
||||||
hScroll.Maximum = w - dotPanel.Width + 12;
|
hScroll.Maximum = w - dotPanel.Width + 12;
|
||||||
hScroll.Minimum = 0;
|
hScroll.Minimum = 0;
|
||||||
@@ -307,12 +355,14 @@ namespace McBitFont {
|
|||||||
if (h <= dotPanel.Height) {
|
if (h <= dotPanel.Height) {
|
||||||
vScroll.Enabled = false;
|
vScroll.Enabled = false;
|
||||||
vScroll.Value = 0;
|
vScroll.Value = 0;
|
||||||
|
vScroll.Maximum = 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SetPanelCursor();
|
||||||
dotPanel.Refresh();
|
dotPanel.Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -335,7 +385,6 @@ namespace McBitFont {
|
|||||||
|
|
||||||
(x, y, x2, y2) = RectSelCoords();
|
(x, y, x2, y2) = RectSelCoords();
|
||||||
|
|
||||||
//history.AddPre(f);
|
|
||||||
for (int i = x; i <= x2; i++) {
|
for (int i = x; i <= x2; i++) {
|
||||||
c = f.data[i, y];
|
c = f.data[i, y];
|
||||||
for (int j = y; j <= y2; j++) {
|
for (int j = y; j <= y2; j++) {
|
||||||
@@ -346,7 +395,6 @@ namespace McBitFont {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//history.AddPost(f);
|
|
||||||
history.Add(f);
|
history.Add(f);
|
||||||
CheckHistoryButtons();
|
CheckHistoryButtons();
|
||||||
SetModified();
|
SetModified();
|
||||||
@@ -359,7 +407,6 @@ namespace McBitFont {
|
|||||||
|
|
||||||
(x, y, x2, y2) = RectSelCoords();
|
(x, y, x2, y2) = RectSelCoords();
|
||||||
|
|
||||||
//history.AddPre(f);
|
|
||||||
for (int i = x; i <= x2; i++) {
|
for (int i = x; i <= x2; i++) {
|
||||||
c = f.data[i, y2];
|
c = f.data[i, y2];
|
||||||
for (int j = y2; j >= y; j--) {
|
for (int j = y2; j >= y; j--) {
|
||||||
@@ -370,7 +417,6 @@ namespace McBitFont {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//history.AddPost(f);
|
|
||||||
history.Add(f);
|
history.Add(f);
|
||||||
CheckHistoryButtons();
|
CheckHistoryButtons();
|
||||||
SetModified();
|
SetModified();
|
||||||
@@ -383,7 +429,6 @@ namespace McBitFont {
|
|||||||
|
|
||||||
(x, y, x2, y2) = RectSelCoords();
|
(x, y, x2, y2) = RectSelCoords();
|
||||||
|
|
||||||
//history.AddPre(f);
|
|
||||||
for (int j = y; j <= y2; j++) {
|
for (int j = y; j <= y2; j++) {
|
||||||
c = f.data[x, j];
|
c = f.data[x, j];
|
||||||
for (int i = x; i <= x2; i++) {
|
for (int i = x; i <= x2; i++) {
|
||||||
@@ -394,7 +439,6 @@ namespace McBitFont {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//history.AddPost(f);
|
|
||||||
history.Add(f);
|
history.Add(f);
|
||||||
CheckHistoryButtons();
|
CheckHistoryButtons();
|
||||||
SetModified();
|
SetModified();
|
||||||
@@ -406,7 +450,6 @@ namespace McBitFont {
|
|||||||
bool c;
|
bool c;
|
||||||
(x, y, x2, y2) = RectSelCoords();
|
(x, y, x2, y2) = RectSelCoords();
|
||||||
|
|
||||||
//history.AddPre(f);
|
|
||||||
for (int j = y; j <= y2; j++) {
|
for (int j = y; j <= y2; j++) {
|
||||||
c = f.data[x2, j];
|
c = f.data[x2, j];
|
||||||
for (int i = x2; i >= x; i--) {
|
for (int i = x2; i >= x; i--) {
|
||||||
@@ -417,22 +460,63 @@ namespace McBitFont {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//history.AddPost(f);
|
|
||||||
history.Add(f);
|
history.Add(f);
|
||||||
CheckHistoryButtons();
|
CheckHistoryButtons();
|
||||||
SetModified();
|
SetModified();
|
||||||
dotPanel.Refresh();
|
dotPanel.Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool mouseDown = false;
|
private bool mouseDown = false; // Used in canvas history tracking and rectangle selection logics
|
||||||
private bool fChanged = false;
|
private bool fChanged = false; // Used in canvas history (undo / redo) tracking
|
||||||
|
private bool mouseDownMiddle = false; // Used in middle mouse dragging logic
|
||||||
|
private int mouseX, mouseY; // To remember last mouse X and Y (used in middle mouse dragging logic)
|
||||||
|
private int lastX = 0, lastY = 0; // Used for drawing straight lines
|
||||||
private void dotPanel_MouseMove(object sender, MouseEventArgs e) {
|
private void dotPanel_MouseMove(object sender, MouseEventArgs e) {
|
||||||
var rectSel = chkRectSelect.Checked;
|
var rectSel = chkRectSelect.Checked;
|
||||||
bool rectSelUpdated = false;
|
bool rectSelUpdated = false;
|
||||||
|
|
||||||
|
// Drag with middle mouse button
|
||||||
|
if (vScroll.Enabled || hScroll.Enabled) {
|
||||||
|
if (mouseDownMiddle) {
|
||||||
|
var dY = mouseY - e.Y <= -cellSize - gap || mouseY - e.Y >= cellSize + gap;
|
||||||
|
var dX = mouseX - e.X <= -cellSize - gap || mouseX - e.X >= cellSize + gap;
|
||||||
|
int newY = vScroll.Value;
|
||||||
|
int newX = hScroll.Value;
|
||||||
|
if (dX) {
|
||||||
|
newX += (mouseX - e.X);
|
||||||
|
if (newX < hScroll.Minimum) newX = hScroll.Minimum;
|
||||||
|
if (newX > hScroll.Maximum) newX = hScroll.Maximum;
|
||||||
|
mouseX = e.X;
|
||||||
|
hScroll.Value = newX;
|
||||||
|
}
|
||||||
|
if (dY) {
|
||||||
|
newY += (mouseY - e.Y);
|
||||||
|
if (newY < vScroll.Minimum) newY = vScroll.Minimum;
|
||||||
|
if (newY > vScroll.Maximum) newY = vScroll.Maximum;
|
||||||
|
mouseY = e.Y;
|
||||||
|
vScroll.Value = newY;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!mouseDownMiddle && e.Button == MouseButtons.Middle) {
|
||||||
|
mouseDownMiddle = true;
|
||||||
|
mouseX = e.X;
|
||||||
|
mouseY = e.Y;
|
||||||
|
SetPanelCursor();
|
||||||
|
}
|
||||||
|
if (mouseDownMiddle && e.Button == MouseButtons.None) {
|
||||||
|
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);
|
||||||
@@ -444,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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -467,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) {
|
||||||
@@ -476,7 +566,7 @@ namespace McBitFont {
|
|||||||
selection2.X = i;
|
selection2.X = i;
|
||||||
selection2.Y = j;
|
selection2.Y = j;
|
||||||
dotPanel.Invalidate();
|
dotPanel.Invalidate();
|
||||||
} //else history.AddPre(f, false);
|
}
|
||||||
}
|
}
|
||||||
if (e.Button == MouseButtons.None && mouseDown) {
|
if (e.Button == MouseButtons.None && mouseDown) {
|
||||||
// Released a mouse button
|
// Released a mouse button
|
||||||
@@ -485,13 +575,8 @@ namespace McBitFont {
|
|||||||
NormPoints(ref selection1, ref selection2);
|
NormPoints(ref selection1, ref selection2);
|
||||||
dotPanel.Invalidate();
|
dotPanel.Invalidate();
|
||||||
} else {
|
} else {
|
||||||
//if (!fChanged) {
|
if (fChanged) {
|
||||||
// history.Remove(false);
|
|
||||||
//} else {
|
|
||||||
if (fChanged) {
|
|
||||||
fChanged = false;
|
fChanged = false;
|
||||||
//history.ApplyAdded();
|
|
||||||
//history.AddPost(f);
|
|
||||||
history.Add(f);
|
history.Add(f);
|
||||||
}
|
}
|
||||||
CheckHistoryButtons();
|
CheckHistoryButtons();
|
||||||
@@ -529,33 +614,50 @@ namespace McBitFont {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Paint black / white
|
// Check for Shift / Ctrl keys for straight lines
|
||||||
if (e.Button == MouseButtons.Left && !f.data[i, j]) {
|
if (ModifierKeys.HasFlag(Keys.Shift) && mouseDown) {
|
||||||
f.data[i, j] = true;
|
j = lastY;
|
||||||
fChanged = true;
|
} else if (ModifierKeys.HasFlag(Keys.Control) && mouseDown && !CAKeyDown) {
|
||||||
int x = pixelOffset + i * (cellSize + gap) - hScroll.Value;
|
i = lastX;
|
||||||
int y = pixelOffset + j * (cellSize + gap) - vScroll.Value;
|
|
||||||
SetModified();
|
|
||||||
rect1 = new Rectangle(x, y, cellSize, cellSize);
|
|
||||||
dotPanel.Invalidate(rect1);
|
|
||||||
}
|
}
|
||||||
if (e.Button == MouseButtons.Right && f.data[i, j]) {
|
lastX = i;
|
||||||
f.data[i, j] = false;
|
lastY = j;
|
||||||
fChanged = true;
|
|
||||||
int x = pixelOffset + i * (cellSize + gap) - hScroll.Value;
|
// Paint black / white
|
||||||
int y = pixelOffset + j * (cellSize + gap) - vScroll.Value;
|
if (e.Button == MouseButtons.Left) {
|
||||||
SetModified();
|
if (PaintPixel(i, j, true)) fChanged = true;
|
||||||
rect1 = new Rectangle(x, y, cellSize, cellSize);
|
|
||||||
dotPanel.Invalidate(rect1);
|
}
|
||||||
|
if (e.Button == MouseButtons.Right) {
|
||||||
|
if (PaintPixel(i, j, false)) fChanged = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool PaintPixel(int i, int j, bool color) {
|
||||||
|
bool changed = false;
|
||||||
|
for (int a = 0; a < (int)nudBrush.Value; a++) {
|
||||||
|
if (i + a >= f.width) break;
|
||||||
|
for (int b = 0; b < (int)nudBrush.Value; b++) {
|
||||||
|
if (j + b >= f.height) break;
|
||||||
|
if (f.data[i + a, j + b] != color) {
|
||||||
|
f.data[i + a, j + b] = color;
|
||||||
|
int x = pixelOffset + (i + a) * (cellSize + gap) - hScroll.Value;
|
||||||
|
int y = pixelOffset + (j + b) * (cellSize + gap) - vScroll.Value;
|
||||||
|
Rectangle rect1 = new(x, y, cellSize, cellSize);
|
||||||
|
dotPanel.Invalidate(rect1);
|
||||||
|
SetModified();
|
||||||
|
changed = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return changed;
|
||||||
|
}
|
||||||
|
|
||||||
private void btnInvert_Click(object sender, EventArgs e) {
|
private void btnInvert_Click(object sender, EventArgs e) {
|
||||||
int x, y, x2, y2;
|
int x, y, x2, y2;
|
||||||
|
|
||||||
//history.AddPre(f);
|
|
||||||
|
|
||||||
(x, y, x2, y2) = RectSelCoords();
|
(x, y, x2, y2) = RectSelCoords();
|
||||||
|
|
||||||
for (int i = x; i <= x2; i++) {
|
for (int i = x; i <= x2; i++) {
|
||||||
@@ -564,7 +666,6 @@ namespace McBitFont {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//history.AddPost(f);
|
|
||||||
history.Add(f);
|
history.Add(f);
|
||||||
CheckHistoryButtons();
|
CheckHistoryButtons();
|
||||||
SetModified();
|
SetModified();
|
||||||
@@ -577,7 +678,6 @@ namespace McBitFont {
|
|||||||
|
|
||||||
(x, y, x2, y2) = RectSelCoords();
|
(x, y, x2, y2) = RectSelCoords();
|
||||||
|
|
||||||
//history.AddPre(f);
|
|
||||||
for (j = y; j <= y2; j++) {
|
for (j = y; j <= y2; j++) {
|
||||||
a = x;
|
a = x;
|
||||||
b = x2;
|
b = x2;
|
||||||
@@ -589,7 +689,6 @@ namespace McBitFont {
|
|||||||
b--;
|
b--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//history.AddPost(f);
|
|
||||||
history.Add(f);
|
history.Add(f);
|
||||||
CheckHistoryButtons();
|
CheckHistoryButtons();
|
||||||
SetModified();
|
SetModified();
|
||||||
@@ -602,7 +701,6 @@ namespace McBitFont {
|
|||||||
|
|
||||||
(x, y, x2, y2) = RectSelCoords();
|
(x, y, x2, y2) = RectSelCoords();
|
||||||
|
|
||||||
//history.AddPre(f);
|
|
||||||
for (i = x; i <= x2; i++) {
|
for (i = x; i <= x2; i++) {
|
||||||
a = y;
|
a = y;
|
||||||
b = y2;
|
b = y2;
|
||||||
@@ -614,7 +712,6 @@ namespace McBitFont {
|
|||||||
b--;
|
b--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//history.AddPost(f);
|
|
||||||
history.Add(f);
|
history.Add(f);
|
||||||
CheckHistoryButtons();
|
CheckHistoryButtons();
|
||||||
SetModified();
|
SetModified();
|
||||||
@@ -648,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);
|
||||||
@@ -699,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);
|
||||||
@@ -786,7 +899,6 @@ namespace McBitFont {
|
|||||||
FrameMiniature newf;
|
FrameMiniature newf;
|
||||||
if (form.cbSingle.Checked) {
|
if (form.cbSingle.Checked) {
|
||||||
frames.Add(new FrameMiniature(0, neww, newh));
|
frames.Add(new FrameMiniature(0, neww, newh));
|
||||||
//f = frames.Find(x => x.code == 0);
|
|
||||||
append = "Single";
|
append = "Single";
|
||||||
monospaced = false;
|
monospaced = false;
|
||||||
} else {
|
} else {
|
||||||
@@ -815,6 +927,7 @@ namespace McBitFont {
|
|||||||
}
|
}
|
||||||
makeVarWidthToolStripMenuItem.Visible = monospaced;
|
makeVarWidthToolStripMenuItem.Visible = monospaced;
|
||||||
tsmiMakeVarWidth.Visible = monospaced;
|
tsmiMakeVarWidth.Visible = monospaced;
|
||||||
|
zerofyWidthToolStripMenuItem.Enabled = !monospaced;
|
||||||
CodeShiftToolStripMenuItem.Visible = !form.cbSingle.Checked;
|
CodeShiftToolStripMenuItem.Visible = !form.cbSingle.Checked;
|
||||||
tsmiCodeShift.Visible = !form.cbSingle.Checked;
|
tsmiCodeShift.Visible = !form.cbSingle.Checked;
|
||||||
lblType.Text = monospaced ? "Monospaced" : "Variable width / Single";
|
lblType.Text = monospaced ? "Monospaced" : "Variable width / Single";
|
||||||
@@ -828,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 = "";
|
||||||
@@ -839,8 +954,6 @@ namespace McBitFont {
|
|||||||
miniList.Refresh();
|
miniList.Refresh();
|
||||||
dotPanel.Refresh();
|
dotPanel.Refresh();
|
||||||
|
|
||||||
// Re-create history object
|
|
||||||
//history = new CanvasHistory();
|
|
||||||
history.Clear();
|
history.Clear();
|
||||||
|
|
||||||
Cursor.Current = Cursors.Default;
|
Cursor.Current = Cursors.Default;
|
||||||
@@ -861,8 +974,6 @@ namespace McBitFont {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
dotPanel.SuspendLayout();
|
dotPanel.SuspendLayout();
|
||||||
// Clear history
|
|
||||||
//history.Clear();
|
|
||||||
|
|
||||||
var sel = miniList.SelectedItems[0];
|
var sel = miniList.SelectedItems[0];
|
||||||
int code = Convert.ToInt32(sel.ImageKey);
|
int code = Convert.ToInt32(sel.ImageKey);
|
||||||
@@ -870,7 +981,8 @@ 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);
|
||||||
|
|
||||||
@@ -918,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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -932,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;
|
||||||
@@ -950,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);
|
||||||
@@ -965,14 +1078,15 @@ namespace McBitFont {
|
|||||||
|
|
||||||
CheckForAdd();
|
CheckForAdd();
|
||||||
|
|
||||||
// Re-create history object
|
|
||||||
//history = new CanvasHistory();
|
|
||||||
history.Clear();
|
history.Clear();
|
||||||
|
|
||||||
tsmiMakeVarWidth.Visible = monospaced;
|
tsmiMakeVarWidth.Visible = monospaced;
|
||||||
makeVarWidthToolStripMenuItem.Visible = monospaced;
|
makeVarWidthToolStripMenuItem.Visible = 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -981,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);
|
||||||
@@ -1017,9 +1133,11 @@ namespace McBitFont {
|
|||||||
var sel = miniList.SelectedItems[0].ImageKey;
|
var sel = miniList.SelectedItems[0].ImageKey;
|
||||||
int code = Convert.ToInt32(miniList.SelectedItems[0].ImageKey);
|
int code = Convert.ToInt32(miniList.SelectedItems[0].ImageKey);
|
||||||
FrameMiniature ff = frames.Find(x => x.code == code);
|
FrameMiniature ff = frames.Find(x => x.code == code);
|
||||||
|
bool isLast = frames.Last().Equals(ff);
|
||||||
frames.Remove(ff);
|
frames.Remove(ff);
|
||||||
miniList.SelectedItems[0].Remove();
|
miniList.SelectedItems[0].Remove();
|
||||||
//miniList.Items[0].Selected = true;
|
|
||||||
|
miniList.Items[isLast ? miniList.Items.Count - 1 : 0].Selected = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void prependSymbolToolStripMenuItem_Click(object sender, EventArgs e) {
|
private void prependSymbolToolStripMenuItem_Click(object sender, EventArgs e) {
|
||||||
@@ -1080,7 +1198,6 @@ namespace McBitFont {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//history.AddPre(f);
|
|
||||||
int di, dj, wmax, hmax, selw, selh;
|
int di, dj, wmax, hmax, selw, selh;
|
||||||
if (chkRectSelect.Checked) {
|
if (chkRectSelect.Checked) {
|
||||||
di = selection1.X;
|
di = selection1.X;
|
||||||
@@ -1102,7 +1219,6 @@ namespace McBitFont {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//history.AddPost(f);
|
|
||||||
history.Add(f);
|
history.Add(f);
|
||||||
CheckHistoryButtons();
|
CheckHistoryButtons();
|
||||||
dotPanel.Refresh();
|
dotPanel.Refresh();
|
||||||
@@ -1115,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
|
||||||
@@ -1123,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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1152,8 +1268,6 @@ namespace McBitFont {
|
|||||||
private void FillFrame(bool val) {
|
private void FillFrame(bool val) {
|
||||||
int x, y, x2, y2;
|
int x, y, x2, y2;
|
||||||
|
|
||||||
//history.AddPre(f);
|
|
||||||
|
|
||||||
(x, y, x2, y2) = RectSelCoords();
|
(x, y, x2, y2) = RectSelCoords();
|
||||||
|
|
||||||
for (int i = x; i <= x2; i++) {
|
for (int i = x; i <= x2; i++) {
|
||||||
@@ -1162,7 +1276,6 @@ namespace McBitFont {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//history.AddPost(f);
|
|
||||||
history.Add(f);
|
history.Add(f);
|
||||||
CheckHistoryButtons();
|
CheckHistoryButtons();
|
||||||
SetModified();
|
SetModified();
|
||||||
@@ -1227,6 +1340,7 @@ namespace McBitFont {
|
|||||||
monospaced = false;
|
monospaced = false;
|
||||||
makeVarWidthToolStripMenuItem.Visible = false;
|
makeVarWidthToolStripMenuItem.Visible = false;
|
||||||
tsmiMakeVarWidth.Visible = false;
|
tsmiMakeVarWidth.Visible = false;
|
||||||
|
zerofyWidthToolStripMenuItem.Enabled = true;
|
||||||
lblType.Text = "Variable width / Single";
|
lblType.Text = "Variable width / Single";
|
||||||
SetModified(true, true);
|
SetModified(true, true);
|
||||||
}
|
}
|
||||||
@@ -1244,14 +1358,12 @@ namespace McBitFont {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void undoToolStripMenuItem_Click(object sender, EventArgs e) {
|
private void undoToolStripMenuItem_Click(object sender, EventArgs e) {
|
||||||
//history.Undo(f);
|
|
||||||
history.Undo();
|
history.Undo();
|
||||||
dotPanel.Refresh();
|
dotPanel.Refresh();
|
||||||
CheckHistoryButtons();
|
CheckHistoryButtons();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void redoToolStripMenuItem_Click(object sender, EventArgs e) {
|
private void redoToolStripMenuItem_Click(object sender, EventArgs e) {
|
||||||
//history.Redo(f);
|
|
||||||
history.Redo();
|
history.Redo();
|
||||||
dotPanel.Refresh();
|
dotPanel.Refresh();
|
||||||
CheckHistoryButtons();
|
CheckHistoryButtons();
|
||||||
@@ -1303,13 +1415,11 @@ namespace McBitFont {
|
|||||||
private void importImageToolStripMenuItem_Click(object sender, EventArgs e) {
|
private void importImageToolStripMenuItem_Click(object sender, EventArgs e) {
|
||||||
ImageImporter iform = new ImageImporter(f.width, f.height);
|
ImageImporter iform = new ImageImporter(f.width, f.height);
|
||||||
if (iform.ShowDialog() == DialogResult.OK) {
|
if (iform.ShowDialog() == DialogResult.OK) {
|
||||||
//history.AddPre(f);
|
|
||||||
for (int i = 0; i < iform.bmpScaled.Width; i++) {
|
for (int i = 0; i < iform.bmpScaled.Width; i++) {
|
||||||
for (int j = 0; j < iform.bmpScaled.Height; j++) {
|
for (int j = 0; j < iform.bmpScaled.Height; j++) {
|
||||||
f.data[i, j] = iform.bmpScaled.GetPixel(i, j).ToArgb().Equals(Color.Black.ToArgb());
|
f.data[i, j] = iform.bmpScaled.GetPixel(i, j).ToArgb().Equals(Color.Black.ToArgb());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//history.AddPost(f);
|
|
||||||
history.Add(f);
|
history.Add(f);
|
||||||
CheckHistoryButtons();
|
CheckHistoryButtons();
|
||||||
dotPanel.Refresh();
|
dotPanel.Refresh();
|
||||||
@@ -1336,6 +1446,9 @@ namespace McBitFont {
|
|||||||
private void chkRectSelect_CheckedChanged(object sender, EventArgs e) {
|
private void chkRectSelect_CheckedChanged(object sender, EventArgs e) {
|
||||||
lblSelection.Visible = lblSelectionLabel.Visible = chkRectSelect.Checked;
|
lblSelection.Visible = lblSelectionLabel.Visible = chkRectSelect.Checked;
|
||||||
selectAllToolStripMenuItem.Enabled = chkRectSelect.Checked;
|
selectAllToolStripMenuItem.Enabled = chkRectSelect.Checked;
|
||||||
|
|
||||||
|
SetPanelCursor();
|
||||||
|
|
||||||
dotPanel.Refresh();
|
dotPanel.Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1464,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();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1562,5 +1675,146 @@ namespace McBitFont {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void toggleBarToolStripMenuItem_Click(object sender, EventArgs e) {
|
||||||
|
int state;
|
||||||
|
|
||||||
|
dotPanel.Width = this.Width - (toggleBarToolStripMenuItem.Checked ? 260 : 504);
|
||||||
|
SideBarRecalc();
|
||||||
|
if (toggleBarToolStripMenuItem.Checked) {
|
||||||
|
toggleBarToolStripMenuItem.Text = "<<";
|
||||||
|
state = 1;
|
||||||
|
} else {
|
||||||
|
toggleBarToolStripMenuItem.Text = ">>";
|
||||||
|
state = 0;
|
||||||
|
}
|
||||||
|
panel1.Location = sidebarLocs[state, 0];
|
||||||
|
pnlInfo.Location = sidebarLocs[state, 1];
|
||||||
|
miniList.Visible = !toggleBarToolStripMenuItem.Checked;
|
||||||
|
vScroll.Location = sidebarLocs[state, 2];
|
||||||
|
hScroll.Width = dotPanel.Width;
|
||||||
|
cbZoom.Focus();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void PrevNextMenuCheck() {
|
||||||
|
if (frames.Count < 2) {
|
||||||
|
nextSymbolToolStripMenuItem.Enabled = false;
|
||||||
|
previousSymbolToolStripMenuItem.Enabled = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
previousSymbolToolStripMenuItem.Enabled = f.code != frames.First().code;
|
||||||
|
nextSymbolToolStripMenuItem.Enabled = f.code != frames.Last().code;
|
||||||
|
}
|
||||||
|
private void fontToolStripMenuItem_DropDownOpening(object sender, EventArgs e) {
|
||||||
|
PrevNextMenuCheck();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void previousSymbolToolStripMenuItem_Click(object sender, EventArgs e) {
|
||||||
|
if (f.code != frames.First().code && miniList.SelectedItems.Count > 0) {
|
||||||
|
miniList.Items[miniList.SelectedIndices[0] - 1].Selected = true;
|
||||||
|
}
|
||||||
|
PrevNextMenuCheck();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void nextSymbolToolStripMenuItem_Click(object sender, EventArgs e) {
|
||||||
|
if (f.code != frames.Last().code && miniList.SelectedItems.Count > 0) {
|
||||||
|
miniList.Items[miniList.SelectedIndices[0] + 1].Selected = true;
|
||||||
|
}
|
||||||
|
PrevNextMenuCheck();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ZerofyBlankWidth(object sender, EventArgs e) {
|
||||||
|
if (monospaced) return; // Does not work for monospaced fonts
|
||||||
|
if (frames.Count < 2) return; // Does not work for single images
|
||||||
|
|
||||||
|
bool flag = false;
|
||||||
|
for (int i = 0; i < frames.Count; i++) {
|
||||||
|
|
||||||
|
if (IsFrameBlank(frames[i])) {
|
||||||
|
frames[i] = FrameResize(frames[i], 0, dotHeight, true);
|
||||||
|
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (flag) {
|
||||||
|
SetModified(true, true);
|
||||||
|
MiniList_SelectedIndexChanged(miniList, EventArgs.Empty);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void nudBrush_ValueChanged(object sender, EventArgs e) {
|
||||||
|
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.4.0.0</AssemblyVersion>
|
<AssemblyVersion>2.9.0.0</AssemblyVersion>
|
||||||
<FileVersion>2.4.0.0</FileVersion>
|
<FileVersion>2.9.0.0</FileVersion>
|
||||||
<Version>$(VersionPrefix)2.4.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'">
|
||||||
|
172
McBitFont/McCursor.cs
Normal file
@@ -0,0 +1,172 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Drawing.Drawing2D;
|
||||||
|
using System.Drawing.Imaging;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace McBitFont {
|
||||||
|
internal class McCursor {
|
||||||
|
|
||||||
|
public struct IconInfo {
|
||||||
|
public bool fIcon;
|
||||||
|
public int xHotspot;
|
||||||
|
public int yHotspot;
|
||||||
|
public IntPtr hbmMask;
|
||||||
|
public IntPtr hbmColor;
|
||||||
|
}
|
||||||
|
[DllImport("user32.dll")]
|
||||||
|
[return: MarshalAs(UnmanagedType.Bool)]
|
||||||
|
public static extern bool GetIconInfo(IntPtr hIcon, ref IconInfo pIconInfo);
|
||||||
|
[DllImport("user32.dll")]
|
||||||
|
public static extern IntPtr CreateIconIndirect(ref IconInfo icon);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Create a cursor from a bitmap without resizing and with the specified
|
||||||
|
/// hot spot
|
||||||
|
/// </summary>
|
||||||
|
public static Cursor CreateCursorNoResize(Bitmap bmp, int xHotSpot, int yHotSpot) {
|
||||||
|
IntPtr ptr = bmp.GetHicon();
|
||||||
|
IconInfo tmp = new IconInfo();
|
||||||
|
GetIconInfo(ptr, ref tmp);
|
||||||
|
tmp.xHotspot = xHotSpot;
|
||||||
|
tmp.yHotspot = yHotSpot;
|
||||||
|
tmp.fIcon = false;
|
||||||
|
ptr = CreateIconIndirect(ref tmp);
|
||||||
|
return new Cursor(ptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Create a 32x32 cursor from a bitmap, with the hot spot in the middle
|
||||||
|
/// </summary>
|
||||||
|
public static Cursor CreateCursor(Bitmap bmp) {
|
||||||
|
int xHotSpot = 16;
|
||||||
|
int yHotSpot = 16;
|
||||||
|
|
||||||
|
IntPtr ptr = ((Bitmap)ResizeImage(bmp, 32, 32)).GetHicon();
|
||||||
|
IconInfo tmp = new IconInfo();
|
||||||
|
GetIconInfo(ptr, ref tmp);
|
||||||
|
tmp.xHotspot = xHotSpot;
|
||||||
|
tmp.yHotspot = yHotSpot;
|
||||||
|
tmp.fIcon = false;
|
||||||
|
ptr = CreateIconIndirect(ref tmp);
|
||||||
|
return new Cursor(ptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Resize the image to the specified width and height.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="image">The image to resize.</param>
|
||||||
|
/// <param name="width">The width to resize to.</param>
|
||||||
|
/// <param name="height">The height to resize to.</param>
|
||||||
|
/// <returns>The resized image.</returns>
|
||||||
|
public static Bitmap ResizeImage(Image image, int width, int height) {
|
||||||
|
var destRect = new Rectangle(0, 0, width, height);
|
||||||
|
var destImage = new Bitmap(width, height);
|
||||||
|
|
||||||
|
destImage.SetResolution(image.HorizontalResolution, image.VerticalResolution);
|
||||||
|
|
||||||
|
using (var graphics = Graphics.FromImage(destImage)) {
|
||||||
|
graphics.CompositingMode = CompositingMode.SourceCopy;
|
||||||
|
graphics.CompositingQuality = CompositingQuality.HighQuality;
|
||||||
|
graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
|
||||||
|
graphics.SmoothingMode = SmoothingMode.HighQuality;
|
||||||
|
graphics.PixelOffsetMode = PixelOffsetMode.HighQuality;
|
||||||
|
|
||||||
|
using (var wrapMode = new ImageAttributes()) {
|
||||||
|
wrapMode.SetWrapMode(WrapMode.TileFlipXY);
|
||||||
|
graphics.DrawImage(image, destRect, 0, 0, image.Width, image.Height, GraphicsUnit.Pixel, wrapMode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return destImage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Cursor GetCursor(int penSize, int cellSize, int gap) {
|
||||||
|
int size = (cellSize + gap) * penSize;
|
||||||
|
|
||||||
|
Bitmap bmp = new(size, size);
|
||||||
|
Pen pb = new(Color.Black, 1);
|
||||||
|
SolidBrush bw = new(Color.FromArgb(160, Color.White));
|
||||||
|
using (Graphics g = Graphics.FromImage(bmp)) {
|
||||||
|
g.DrawRectangle(pb, 0, 0, size-1, size-1);
|
||||||
|
g.FillRectangle(bw, 1, 1, size - 2, size - 2);
|
||||||
|
}
|
||||||
|
return CreateCursorNoResize(bmp, cellSize / 2, cellSize / 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Cursor GetCursorSelect() {
|
||||||
|
Point[] arrow = { new(1, 1), new(12, 12), new(11, 13), new(6, 13), new(2, 17), new(1, 16) };
|
||||||
|
Point[] corner1 = { new(13, 6), new(20, 6), new(20, 13), new(17, 13), new(17, 9), new(13, 9) };
|
||||||
|
Point[] corner2 = { new(17, 16), new(20, 16), new(20, 23), new(13, 23), new(13, 20), new(17, 20) };
|
||||||
|
Point[] corner3 = { new(3, 16), new(6, 16), new(6, 20), new(10, 20), new(10, 23), new(3, 23) };
|
||||||
|
Point[] corner4 = { new(6, 6), new(10, 6), new(10, 9), new(6, 9) };
|
||||||
|
|
||||||
|
Bitmap bmp = new(21, 24);
|
||||||
|
Pen pb = new(Color.Black, 1);
|
||||||
|
SolidBrush bw = new (Color.White);
|
||||||
|
using (Graphics g = Graphics.FromImage(bmp)) {
|
||||||
|
g.FillPolygon(bw, corner1);
|
||||||
|
g.DrawPolygon(pb, corner1);
|
||||||
|
g.FillPolygon(bw, corner2);
|
||||||
|
g.DrawPolygon(pb, corner2);
|
||||||
|
g.FillPolygon(bw, corner3);
|
||||||
|
g.DrawPolygon(pb, corner3);
|
||||||
|
g.FillPolygon(bw, corner4);
|
||||||
|
g.DrawPolygon(pb, corner4);
|
||||||
|
g.FillPolygon(bw, arrow);
|
||||||
|
g.DrawPolygon(pb, arrow);
|
||||||
|
}
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
70
McBitFont/Properties/Resources.Designer.cs
generated
@@ -100,6 +100,26 @@ namespace McBitFont.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap arrow_turn_left {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("arrow_turn_left", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap arrow_turn_right {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("arrow_turn_right", 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>
|
||||||
@@ -160,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>
|
||||||
@@ -170,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>
|
||||||
@@ -320,6 +370,26 @@ 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>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap text_letterspacing2 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("text_letterspacing2", 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,24 +133,30 @@
|
|||||||
<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>
|
||||||
<data name="Famfamfam-Silk-Page-copy.16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="Famfamfam-Silk-Page-copy.16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\Famfamfam-Silk-Page-copy.16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\Famfamfam-Silk-Page-copy.16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="font" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="picture_go" 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\picture_go.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="arrow_inout" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="arrow_inout" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\arrow_inout.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\arrow_inout.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
|
<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>
|
||||||
|
</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>
|
||||||
<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>
|
|
||||||
</data>
|
|
||||||
<data name="icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\icon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\icon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -181,20 +190,23 @@
|
|||||||
<data name="z_shading" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="z_shading" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\shading.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\shading.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="arrow_turn_left" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\arrow_turn_left.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
<data name="add" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="add" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\add.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\add.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<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="z_undo" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="fam_lines" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\arrow_undo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\fam_lines.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</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>
|
||||||
<data name="delete" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="z_undo" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\delete.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\arrow_undo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="z_redo" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="z_redo" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\arrow_redo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\arrow_redo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
@@ -208,8 +220,17 @@
|
|||||||
<data name="Famfamfam-Silk-Page-white.16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="Famfamfam-Silk-Page-white.16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\Famfamfam-Silk-Page-white.16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\Famfamfam-Silk-Page-white.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="delete" 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\delete.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="arrow_turn_right" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\arrow_turn_right.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<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>
|
||||||
|
</data>
|
||||||
|
<data name="text_letterspacing2" 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>
|
||||||
</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>
|
||||||
@@ -232,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="picture_go" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="fam_top" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\picture_go.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/arrow_turn_left.png
Normal file
After Width: | Height: | Size: 512 B |
BIN
McBitFont/Resources/arrow_turn_right.png
Normal file
After Width: | Height: | Size: 489 B |
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 |
BIN
McBitFont/Resources/text_letterspacing2.png
Normal file
After Width: | Height: | Size: 357 B |
11
README.md
@@ -20,12 +20,18 @@ Some basic hints on the interface:
|
|||||||
- Mouse 1 to mark a pixel black
|
- Mouse 1 to mark a pixel black
|
||||||
- Mouse 2 to mark a pixel white
|
- Mouse 2 to mark a pixel white
|
||||||
- Drag the mouse holding a button to draw pixels
|
- Drag the mouse holding a button to draw pixels
|
||||||
|
- Hold Shift to constrain painting horizontally
|
||||||
|
- Hold Ctrl to constrain painting vertically
|
||||||
- Mouse Scroll to scroll up and down
|
- Mouse Scroll to scroll up and down
|
||||||
- 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
|
||||||
|
- 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!
|
||||||
|
|
||||||
|
Library example instructions to implement to STM32 code: [mctext](STM32_HAL_Lib/README.md)
|
||||||
|
|
||||||
#### Important:
|
#### Important:
|
||||||
**Since v2.0 new save file format is implemented. You can use [McBitFont v1.7](https://gitea.mcflyer.ru/McFLY/McBitFont/releases/tag/v1.7) to convert old saved files to the new format.**
|
**Since v2.0 new save file format is implemented. You can use [McBitFont v1.7](https://gitea.mcflyer.ru/McFLY/McBitFont/releases/tag/v1.7) to convert old saved files to the new format.**
|
||||||
|
|
||||||
@@ -59,3 +65,8 @@ Code Shift dialog
|
|||||||
Font PNG export example
|
Font PNG export example
|
||||||
|
|
||||||

|

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

|
||||||
|
|
||||||
|
13
STM32_HAL_Lib/README.md
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# McText Library
|
||||||
|
|
||||||
|
- The library uses "Left to Right, Top to bottom" scan and "LSB Top" for pixels alignment
|
||||||
|
|
||||||
|
#### Instructions
|
||||||
|
|
||||||
|
To use the library you have to have a display driver with a function that paints a single pixel with X and Y coordinates and 0/1 color.<br>
|
||||||
|
Find "SET A FUNCTION NAME HERE!" text in *mctext.c* file and change the function name that suits your driver.<br>
|
||||||
|
**Note:** it is possible that you will have to change parameters in the function to match your driver.
|
||||||
|
|
||||||
|
**Note:** check the "include" in *mctext.h* file to match your HAL. (stm32f1xx_hal.h is fo STM32F1 MCU series)
|
||||||
|
|
||||||
|
Now use **mct_String** function to draw a string of text.
|
113
STM32_HAL_Lib/mctext.c
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
/*
|
||||||
|
* mctext.c
|
||||||
|
*
|
||||||
|
* Created on: May 16, 2025
|
||||||
|
* Author: User
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include "mctext.h"
|
||||||
|
#include "ST7565.h"
|
||||||
|
|
||||||
|
//=========================== SET A FUNCTION NAME HERE! ===========================//
|
||||||
|
// A function from display driver to set a pixel (x, y, color)
|
||||||
|
void (*mct_SetPixel)(uint8_t, uint8_t, uint8_t) = ST7565_SetPixel;
|
||||||
|
//=================================================================================//
|
||||||
|
|
||||||
|
|
||||||
|
// Draw a single character. Returns width of drawn character
|
||||||
|
uint8_t mct_CharT(uint8_t x, uint8_t y, unsigned char c, uint8_t color, const uint8_t *font, uint8_t transp) {
|
||||||
|
uint8_t pk = font[0]; // Is it a packed font?
|
||||||
|
uint8_t w = font[1]; // Font char width
|
||||||
|
uint8_t h = font[2]; // Font char height
|
||||||
|
uint8_t fc = font[4]; // First char code in the font
|
||||||
|
uint8_t lc = font[5]; // Last char code in the font
|
||||||
|
uint8_t i, j, p, s, b, seg; // i-cur.column, j-cur.row of 8, p-rows of 8, s-height in cur.row of 8, b-cur.bit in cur.row, seg-byte.segment
|
||||||
|
uint8_t bps; // Bytes per symbol for packed fonts
|
||||||
|
uint16_t o; // Current offset
|
||||||
|
|
||||||
|
if (c < fc || c > lc) return 0;
|
||||||
|
if (x > LCDWIDTH) return 0;
|
||||||
|
if (y+h > LCDHEIGHT) return 0;
|
||||||
|
|
||||||
|
// Calc the offset for desired symbol
|
||||||
|
if (pk) { // The font is packed
|
||||||
|
if (w) { // The font is monospaced
|
||||||
|
bps = w*h/8; // Bytes per symbol
|
||||||
|
if ((w*h)%8 > 0) bps++; // Correction for the last byte
|
||||||
|
o = FONT_HEADER+(c-fc)*bps; // Offset for desired symbol
|
||||||
|
} else { // The font is not monospaced
|
||||||
|
o = FONT_HEADER; // Starting offset
|
||||||
|
for (i=0; i<c-fc; i++) { // Going through every symbol
|
||||||
|
bps = font[o]*h/8; // Bytes per current symbol
|
||||||
|
if ((font[o]*h)%8 > 0) bps++; // Correction for the last byte
|
||||||
|
o += bps + 1; // Adding symbol's width to the offset (+ width byte)
|
||||||
|
}
|
||||||
|
w = font[o]; // Desired symbol's width
|
||||||
|
o++; // Offset for desired symbol's data
|
||||||
|
}
|
||||||
|
|
||||||
|
// Draw the packed symbol!
|
||||||
|
bps = w*h/8; // Bytes per current symbol
|
||||||
|
if ((w*h)%8 > 0) bps++; // Correction for the last byte
|
||||||
|
b = 0; // bit indexer in "current" byte
|
||||||
|
for (i=0; i<w; i++) { // Going through columns
|
||||||
|
if (x+i > LCDWIDTH) return i-1; // Check if we're out of display size
|
||||||
|
for (j=0; j<h; j++) { // Going through rows in column [i]
|
||||||
|
if (b == 0) seg = font[o];
|
||||||
|
if ((seg>>b) & 1) mct_SetPixel(x+i, y+j, color); // Paint the pixel
|
||||||
|
if (b < 7) b++; else {b = 0; o++;} // Track bits and bytes
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} else { // The font is not packed
|
||||||
|
p = (h%8 > 0) ? h/8 + 1 : h/8; // Bytes in one column
|
||||||
|
if (w) { // The font is monospaced
|
||||||
|
o = FONT_HEADER+(c-fc)*w*p; // Offset for desired symbol
|
||||||
|
} else { // The font is not monospaced
|
||||||
|
o = FONT_HEADER; // Starting offset
|
||||||
|
for (i=0; i<c-fc; i++) { // Going through every symbol
|
||||||
|
o += font[o]*p + 1; // Adding symbol's width to the offset
|
||||||
|
}
|
||||||
|
w = font[o]; // Desired symbol's width
|
||||||
|
o++; // Offset for desired symbol's data
|
||||||
|
}
|
||||||
|
|
||||||
|
// Draw the symbol
|
||||||
|
for (i=0; i<w; i++) { // Going through columns
|
||||||
|
if (x+i > LCDWIDTH) return i-1; // Check if we're out of display size
|
||||||
|
for (j=0; j<p; j++) { // Going through bytes in single column
|
||||||
|
s = (h - j*8 >= 8) ? 8 : (h - j*8) % 8; // Clac the amount of pixels in current byte
|
||||||
|
|
||||||
|
seg = font[o];
|
||||||
|
for (b=0; b<s; b++) { // Going through the byte and paint the pixel if the bit is 1
|
||||||
|
if ((seg>>b) & 1) mct_SetPixel(x+i, y+j*8+b, color);
|
||||||
|
else if (!transp) mct_SetPixel(x+i, y+j*8+b, !color);
|
||||||
|
}
|
||||||
|
o++;
|
||||||
|
}
|
||||||
|
//mct_SetPixel(x+i, y, color); // For testing purposes
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return w;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Draw a single character. Transparent background. Returns width of drawn character
|
||||||
|
uint8_t mct_Char(uint8_t x, uint8_t y, unsigned char c, uint8_t color, const uint8_t *font) {
|
||||||
|
return mct_CharT(x, y, c, color, font, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Draw a string of characters
|
||||||
|
void mct_String(uint8_t x, uint8_t y, const char *c, uint8_t color, const uint8_t *font) {
|
||||||
|
uint8_t w = font[1]; // Font char width
|
||||||
|
uint8_t h = font[2]; // Font char height
|
||||||
|
uint8_t s = font[3]; // Font space between characters
|
||||||
|
|
||||||
|
if (y+h > LCDHEIGHT) return;
|
||||||
|
while (c[0] != 0) {
|
||||||
|
if (x+w > LCDWIDTH) return;
|
||||||
|
w = mct_Char(x, y, (unsigned char)*c, color, font);
|
||||||
|
c++;
|
||||||
|
x += w + s;
|
||||||
|
}
|
||||||
|
}
|
21
STM32_HAL_Lib/mctext.h
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* mctext.h
|
||||||
|
*
|
||||||
|
* Created on: May 16, 2025
|
||||||
|
* Author: User
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef INC_MCTEXT_H_
|
||||||
|
#define INC_MCTEXT_H_
|
||||||
|
|
||||||
|
#include "stm32f1xx_hal.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Draw a single character. Returns width of drawn character
|
||||||
|
uint8_t mct_Char(uint8_t x, uint8_t y, unsigned char c, uint8_t color, const uint8_t *font);
|
||||||
|
|
||||||
|
// Draw a string of characters
|
||||||
|
void mct_String(uint8_t x, uint8_t y, const char *c, uint8_t color, const uint8_t *font);
|
||||||
|
|
||||||
|
#endif /* INC_MCTEXT_H_ */
|
13
TODO.txt
@@ -1,11 +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 Copy-Paste now uses System clipboard and it is possible to copy-paste from/to different instances of running program
|
V Special cursor to indicate baseline set
|
||||||
|
V Special cursor when dragging canvas with middle mouse button
|
||||||
|
|
||||||
Functionality:
|
Functionality:
|
||||||
V Rewrite history class so it tracks all changes, not only a canvas changes
|
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 In some cases after switching to a symbol dotPanel mouse move causes "Out of range" exception (history.Pre after width change?)
|
V Fixed "Frame modified" check. It leaves modified flag if user refused to save changes.
|
||||||
V Switching between symbols while select tool is active and small area selected trows an error
|
V Middle mouse button tries to change selection while dragging canvas with rectSelection tool active
|
||||||
V Full frame Copy in Clipboard does not respect selection on Paste operation
|
|
BIN
examples/46PixVN3_vw_cyr.mbfont
Normal file
BIN
examples/Cursors.mbfont
Normal file
BIN
examples/Cyrillic-pixel-7.mbfont
Normal file
BIN
examples/Font_5x7_vw_narrow.mbfont
Normal file
BIN
examples/Standard_narrow_Latin1.mbfont
Normal file
BIN
examples/Standard_wide_Latin1.mbfont
Normal file
BIN
examples/basis33_vw_cyr.mbfont
Normal file
BIN
examples/icons_14x14.mbfont
Normal file
BIN
examples/pixel_3x5_Cyr.mbfont
Normal file
BIN
examples/tests/flipper.mbfont
Normal file
BIN
examples/tests/flipper_1.mbfont
Normal file
BIN
examples/tests/flipper_3.mbfont
Normal file
BIN
icons/famfamfam/arrow_turn_left.png
Normal file
After Width: | Height: | Size: 512 B |
BIN
icons/famfamfam/arrow_turn_right.png
Normal file
After Width: | Height: | Size: 489 B |
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
icons/famfamfam/text_letterspacing2.png
Normal file
After Width: | Height: | Size: 357 B |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 12 KiB |
BIN
images/Screenshot_Frame-screenshot.png
Normal file
After Width: | Height: | Size: 8.7 KiB |
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 52 KiB |