• Graphics


    System.Drawing.Pen myPen = new System.Drawing.Pen(System.Drawing.Color.Red);//画笔
                system.drawing.solidbrush mybrush = new system.drawing.solidbrush(system.drawing.color.red);//画刷
                system.drawing.graphics formgraphics = this.creategraphics();
                formgraphics.fillellipse(mybrush, new rectangle(0, 0, 100, 200));//画实心椭圆
                formgraphics.drawellipse(mypen, new rectangle(0, 0, 100, 200));//空心圆
                formgraphics.fillrectangle(mybrush, new rectangle(0, 0, 100, 200));//画实心方
                formgraphics.drawrectangle(mypen, new rectangle(0, 0, 100, 200));//空心矩形
                formgraphics.drawline(mypen, 0, 0, 200, 200);//画线
                formgraphics.drawpie(mypen, 90, 80, 140, 40, 120, 100); //画馅饼图形
                画多边形
                formgraphics.drawpolygon(mypen, new point[]{
                    new point(30,140),
                    new point(270,250),
                    new point(110,240),
                    new point (200,170),
                    new point(70,350),
                    new point(50,200)
                });
                清理使用的资源
                mypen.dispose();
                mybrush.dispose();
                formgraphics.dispose();
  • 相关阅读:
    网络编程-python实现-UDP(1.1.2)
    网络编程-python实现-socket(1.1.1)
    1-浮动布局
    1-解决java Scanner出现 java.util.NoSuchElementException
    1.激活函数
    A-交叉熵的使用
    matplotlib的学习16-animation动画
    matplotlib的学习15-次坐标轴
    matplotlib的学习14-图中图
    07-爬虫验证码破解实战
  • 原文地址:https://www.cnblogs.com/benzhang/p/1458699.html
Copyright © 2020-2023  润新知