zoukankan      html  css  js  c++  java
  • C#使用Graphics画圆写字

    画填充圆:         

    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

    画圆圈:

    Graphics gra = this.pictureBox1.CreateGraphics();

    gra.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;

    Pen pen = new Pen(Color.Pink);//画笔颜色                                

    gra.DrawEllipse(pen, 250, 10, 100, 100);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50

    写字:

    Graphics gra = this.pictureBox1.CreateGraphics();

    Font myFont = new Font("宋体", 60, FontStyle.Bold);             

    Brush bush = new SolidBrush(Color.Red);//填充的颜色

    gra.DrawString("堵塞!", myFont, bush, 100, 100);

    http://www.cnblogs.com/sosoft/

  • 相关阅读:
    CSS3阴影 box-shadow的使用和技巧总结
    事件
    表单操作
    DOM
    BOM
    js总结1
    css3
    css图片文字相关属性
    CSS盒子模型及布局
    写博客的几个注意事项
  • 原文地址:https://www.cnblogs.com/sosoft/p/3458369.html
Copyright © 2011-2022 走看看