zoukankan      html  css  js  c++  java
  • 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();
  • 相关阅读:
    xcode debug
    ios 使用Quartz 2D画虚线
    ios UIGestureRecognizer
    ios 实现带矩形框的屏幕截图
    ios UISegemetedControl
    centos最小安装之后无法使用ifconfig
    无线LoRa智能远传水表
    智能水表188协议汇总
    无线LoRa远传智能水表
    静电除尘器除尘原理
  • 原文地址:https://www.cnblogs.com/jcomet/p/1242815.html
Copyright © 2011-2022 走看看