C#绘图(文字)

it2022-05-05  169

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); this.Paint += new PaintEventHandler(f1_paint); } #region Test private void f1_paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; g.DrawString("你好,C#!", new Font("Verdana", 20), new SolidBrush(Color.Tomato), 40, 40); g.DrawRectangle(new Pen(Color.Pink, 3), 20, 20, 150, 100); } #endregion } }

 

转载于:https://www.cnblogs.com/hongjiumu/archive/2013/02/19/2917873.html

相关资源:C#在图片上绘制文字

最新回复(0)