private void ТиснениеToolStripMenuItem_Click(object sender, EventArgs e) { var bm = new Bitmap(pictureBox1.Image); old_image = image; image = bm; Filters filter = new Stamping(); backgroundWorker1.RunWorkerAsync(filter); }
public void UpdateFontLabel(Stamping stamping) { var fontSize = stamping.FontSize.ToString(); var fontstring = string.Format("{0} {1}pt", stamping.FontName, fontSize); if (fontstring.Length > 25) { fontstring = stamping.FontName.Substring(0, 25 - 4 - fontSize.Length).TrimEnd(); fontstring = string.Format("{0}. {1}pt", fontstring, fontSize); } StampFontButton.Content = fontstring; }
private void UpdateFontButtonText(Stamping stamping) { var fontSize = stamping.FontSize.ToString(); var fontstring = $"{stamping.FontName} {fontSize}pt"; if (fontstring.Length > 25) { fontstring = stamping.FontName.Substring(0, 25 - 4 - fontSize.Length).TrimEnd(); fontstring = $"{fontstring}. {fontSize}pt"; } FontButtonText = fontstring; RaisePropertyChanged(nameof(FontButtonText)); }
public override void OnInspectorGUI() { DrawDefaultInspector(); Stamping stamping = (Stamping)target; if (stamping.stampMode == Stamping.StampMode.Flatten) { stamping.flattenStepSize = EditorGUILayout.FloatField("Flatting Step Size: ", stamping.flattenStepSize); } if (stamping.stampMode == Stamping.StampMode.Mountain) { stamping.heightMultiplier = EditorGUILayout.Slider("Height Multiplier: ", stamping.heightMultiplier, 0.001f, 1f); stamping.persistance = EditorGUILayout.Slider("Persistance: ", stamping.persistance, 0f, 20f); } if (stamping.stampMode == Stamping.StampMode.Paint) { stamping.paintColor = EditorGUILayout.ColorField("Color: ", stamping.paintColor); } }