Pen pen = new Pen(this.red, 20);
Point pCurrent = new Point(e.X, e.Y);
g.DrawLine(pen, this.pLast, pCurrent);
this.pLast = pCurrent;上面的代码画出来比较粗糙,有没有办法实现更圆润的画笔?
Point pCurrent = new Point(e.X, e.Y);
g.DrawLine(pen, this.pLast, pCurrent);
this.pLast = pCurrent;上面的代码画出来比较粗糙,有没有办法实现更圆润的画笔?
解决方案 »
- xmlrpc请求超时问题
- VS2008发布网站以后为什么有的代码会有空格?
- 窗体事件Load和Shown的区别只是一前一后触发么?但是把Shown的方法体放到Load里是不可以的吧。。。
- C#调用dll里的方法问题?
- 5.急求需要能运行出来的完整程序!急啊!
- combox和panel的使用
- JSON 序列化和反序列化
- 求教高手:现在软件业做什么最有前途?
- WinForm程序中,DataGrid在显示出DataTable数据后,怎样改变列的显示顺序及列的可见性?
- c#代码出现异常:未将对象引用设置到对象的实例,如何解决?
- 一个关于视图和业务层分离的讨论,希望大家畅所欲言!
- SqlDataAdapter.Fill()的时候超时
加上试试
{
this.g = this.pictureBox1.CreateGraphics();//指定控件
if (e.Button != MouseButtons.Left)//判断是否为左键
{
this.pLast = new Point(e.X, e.Y);
return;
}
Pen pen = new Pen(this.TransparencyKey, 30);//画刷颜色,宽度
Point pCurrent = new Point(e.X, e.Y);
this.g.DrawLine(pen, this.pLast, pCurrent);
this.pLast = pCurrent;
}
Doodle - a basic paint package in GDI+
private void button1_Click(object sender, EventArgs e) {
Graphics g = this.CreateGraphics();
SolidBrush sb = new SolidBrush(Color.Red);
for (int i = 0; i < 200; i++) {
g.FillEllipse(sb, 50, 50 + i, 30, 30);
}
g.Dispose();
sb.Dispose();
}刚才 试了一下