• 大小: 0.07M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-16
  • 语言: C#
  • 标签: 其他  

资源简介

C#GDI绘图_绘制图形.rar

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Drawing2D;

namespace GDIDraw
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Paint(object sender PaintEventArgs e)
        {
            Graphics g = e.Graphics;
            Point PStart = new Point(10 10);
            Point PEnd = new Point(100 100);
            LinearGradientBrush brush = new LinearGradientBrush(PStart PEndColor.RedColor.Blue);
            SolidBrush redBrush = new SolidBrush(Color.Red);
            SolidBrush greenBrush = new SolidBrush(Color.Green);
            SolidBrush blueBrush = new SolidBrush(Color.Blue);

            g.FillEllipse(redBrush 0 0 100 60);
            g.FillPie(greenBrush 100 0 100 70 30 60);
            g.FillRectangle(redBrush2001010050);

            Point[] point = {
                                new Point(0100)
                                new Point(20120)
                                new Point(50100)
                                new Point(60200)
                                new Point(30220)
                                new Point(180200)
                                new Point(20110)
                                new Point(0220)
                            };

            g.FillPolygon(redBrush point);
            Rectangle fillRect = new Rectangle(200 110 100 100);
            Region fillRegion = new Region(fillRect);
            g.FillRegion(greenBrush fillRegion);
            StringFormat f = new StringFormat(StringFormatFlags.DirectionVertical);
            g.DrawString(“椭圆“new Font(“方正舒体“20)blueBrushnew Point(3570)f);
            g.DrawString(“扇形椭圆“ this.Font blueBrush (new Point(120 70)));
            g.DrawString(“矩形“ this.Font blueBrush (new Point(240 70)));
            g.DrawString(“多边形“ this.Font blueBrush (new Point(60 215)));
            g.DrawString(“正方形“ this.Font blueBrush (new Point(230215)));
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       2271  2009-02-19 16:02  C#GDI绘图_绘制图形\Backup\Form1.cs

     文件       1483  2009-02-14 16:58  C#GDI绘图_绘制图形\Backup\Form1.Designer.cs

     文件       5814  2009-02-14 16:58  C#GDI绘图_绘制图形\Backup\Form1.resx

     文件       3760  2009-02-14 17:08  C#GDI绘图_绘制图形\Backup\GDIDraw.csproj

     文件        903  2009-02-14 16:33  C#GDI绘图_绘制图形\Backup\GDIDraw.sln

    ..A..H.     14336  2009-02-19 16:42  C#GDI绘图_绘制图形\Backup\GDIDraw.v12.suo

     文件        488  2009-02-14 16:33  C#GDI绘图_绘制图形\Backup\Program.cs

     文件       1370  2009-02-14 16:33  C#GDI绘图_绘制图形\Backup\Properties\AssemblyInfo.cs

     文件       2864  2009-02-14 16:33  C#GDI绘图_绘制图形\Backup\Properties\Resources.Designer.cs

     文件       5612  2009-02-14 16:33  C#GDI绘图_绘制图形\Backup\Properties\Resources.resx

     文件       1092  2009-02-14 16:33  C#GDI绘图_绘制图形\Backup\Properties\Settings.Designer.cs

     文件        249  2009-02-14 16:33  C#GDI绘图_绘制图形\Backup\Properties\Settings.settings

     文件       9728  2019-11-12 13:43  C#GDI绘图_绘制图形\bin\Debug\GDIDraw.exe

     文件      24064  2019-11-12 13:43  C#GDI绘图_绘制图形\bin\Debug\GDIDraw.pdb

     文件      22704  2019-11-12 13:43  C#GDI绘图_绘制图形\bin\Debug\GDIDraw.vshost.exe

     文件        490  2013-03-18 17:00  C#GDI绘图_绘制图形\bin\Debug\GDIDraw.vshost.exe.manifest

     文件       2292  2019-11-12 13:43  C#GDI绘图_绘制图形\Form1.cs

     文件       2358  2019-11-12 13:43  C#GDI绘图_绘制图形\Form1.Designer.cs

     文件       5814  2019-11-12 13:43  C#GDI绘图_绘制图形\Form1.resx

     文件       5263  2019-11-12 13:42  C#GDI绘图_绘制图形\GDIDraw.csproj

     文件        453  2019-11-12 13:42  C#GDI绘图_绘制图形\GDIDraw.csproj.user

     文件        982  2019-11-12 13:42  C#GDI绘图_绘制图形\GDIDraw.sln

    ..A..H.     14336  2009-02-19 16:42  C#GDI绘图_绘制图形\GDIDraw.suo

    ..A..H.     23552  2019-11-12 13:43  C#GDI绘图_绘制图形\GDIDraw.v12.suo

     文件       7941  2019-11-12 13:42  C#GDI绘图_绘制图形\obj\Debug\DesignTimeResolveAssemblyReferences.cache

     文件       6970  2019-11-12 13:42  C#GDI绘图_绘制图形\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件       2002  2019-11-12 13:43  C#GDI绘图_绘制图形\obj\Debug\GDIDraw.csproj.FileListAbsolute.txt

     文件        847  2019-11-12 13:43  C#GDI绘图_绘制图形\obj\Debug\GDIDraw.csproj.GenerateResource.Cache

     文件       8252  2019-11-12 13:42  C#GDI绘图_绘制图形\obj\Debug\GDIDraw.csprojResolveAssemblyReference.cache

     文件       9728  2019-11-12 13:43  C#GDI绘图_绘制图形\obj\Debug\GDIDraw.exe

............此处省略23个文件信息

评论

共有 条评论