GDI+基础知识——画笔的线帽属性示意
来源:互联网 发布:狂人大师软件下载 编辑:程序博客网 时间:2024/05/17 03:36
//线帽演示
private void Pen_LineCap_Click(object sender, System.EventArgs e)
{
Graphics graphics = this.CreateGraphics();
graphics.Clear(Color.White);
//设置文本输出对齐方式及字体
StringFormat fmt = new StringFormat();
fmt.Alignment = StringAlignment.Near;
fmt.LineAlignment = StringAlignment.Center;
//字体
Font font = new Font("Arial",12);
SolidBrush sBrush = new SolidBrush(Color.Red);
//创建宽度为15的画笔
Pen pen = new Pen(Color.Black,15);
//分别使用不同的线帽
foreach (LineCap lincap in Enum.GetValues(typeof(LineCap)))
{
pen.StartCap = lincap;//起点
pen.EndCap = lincap;//终点
graphics.DrawLine(pen,50,10,300,10);
//输出当前线帽类型(LineCap枚举成员名)
graphics.DrawString(pen.StartCap.ToString(),
font,sBrush,new Point(320,10),fmt);
//平移绘图平面
graphics.TranslateTransform(0,30);
}
}
- GDI+基础知识——画笔的线帽属性示意
- GDI+基础知识——画笔的对齐方式
- GDI+基础知识——各种画笔线型
- GDI+基础知识——通过画刷构建画笔
- GDI+基础知识——画笔的变换(缩放及旋转)
- GDI+画笔的使用
- GDI+学习记录(5)- 画笔线帽 LineCap
- Gdi+ 画笔
- GDI+ 画笔
- GDI+的实心画笔和形状
- 关于GDI中画笔的笔帽问题
- paint 画笔的一些属性
- android画笔的基本属性
- Paint 画笔的一些属性
- hiberante 中generator属性的所示意义
- vb.net GDI+入门——画笔、画刷和颜色
- 画笔线帽 LineCap
- GDI+编程(二)使用画笔
- 怎么读外文文献
- Fedora17修改用户登陆界面分辨率
- 几个注意点及易犯错误
- ecos代码分析(1)
- 从这里开始
- GDI+基础知识——画笔的线帽属性示意
- ecos代码分析(2)
- 韩顺平_轻松搞定网页设计(html+css+javascript)_第32讲_构造函数_成员函数详解_学习笔记_源代码图解_PPT文档整理
- C# 参考之方法参数关键字:params、ref及out
- fflush(stdout); fflush(stdin);
- 网站优化:测试网站速度的8款免费工具推荐
- ecos代码分析(3)
- Color Coherence Vector
- Jsp