发文章
发文工具
撰写
网文摘手
文档
视频
思维导图
随笔
相册
原创同步助手
其他工具
图片转文字
文件清理
AI助手
留言交流
画填充圆:
Graphics gra = this.pictureBox1.CreateGraphics();
gra.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;Brush bush = new SolidBrush(Color.Green);//填充的颜色
gra.FillEllipse(bush, 10, 10, 100, 100);//画填充椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50
画圆圈:
gra.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;Pen pen = new Pen(Color.Pink);//画笔颜色
gra.DrawEllipse(pen, 250, 10, 100, 100);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50
写字:
Font myFont = new Font("宋体", 60, FontStyle.Bold);
Brush bush = new SolidBrush(Color.Red);//填充的颜色
gra.DrawString("堵塞!", myFont, bush, 100, 100);
来自: 昵称10504424 > 《工作》
0条评论
发表
请遵守用户 评论公约
C# GDI+ 绘图
C# GDI 连接线段与Brushes类
C# GDI 连接线段与Brushes类。只要执行了一个涉及到显示连接线段的操作,就可以设置连接线段的样式。为此,可以使用System.Drawing.Drawing2D命名空间中的LineJoin枚举的值,:Milter(默认值)、Beveled...
GDI+编程
运行界面:主要代码:privatevoidbutton1_Click(objectsender,EventArgse){Graphicsgraphics=this.CreateGraphics();PenmyPen1=newPen(Color.Blue,2);graphics.DrawLine(myPen1,50,30,170,30);PenmyPen...
GDI 图形图像
//实例化Bitmap类 Graphics g=Graphics.FromImage(mbit);//通过FromImage方法创建Graphics对象}Pen(Brush):用指定的 Brush 初始化 Pen ...
C#WinForm实践开发教程》4.图型图像GDI编程.ppt
案例6:(绘制文字)於座標(100,50)的位置繪製文字privatevoidForm10_Paint(objectsender,PaintEventArgse){Graphicsg=this.CreateGraphics();FontdrawFont=newFont("隶书",15);SolidBrushdr...
c# GDI 简单绘图(二)
Pen的属性主要有: Color(颜色),DashCap(短划线终点形状),DashStyle(虚线样式),EndCap(线尾形状), StartCap(线头形状),Width(粗细)等.
解答:GDI 实现自由绘图的问题! .NET技术 C# 技术解答社区
C#画图
Graphics g = Graphics.//create graphics over imagevar img = Image.Graphics g2 = Graphics.DrawArc(redPen, rect, 125, 40);3,处理图像Graphics有两类方法用来处理图像:g.DrawIcon(icon, rect);g...
C#开发的矢量图形绘制(转)
微信扫码,在手机上查看选中内容