本帖最后由 u013539390 于 2014-12-26 13:40:25 编辑

解决方案 »

  1.   

    参考网上代码private void Form1_Paint(object sender, PaintEventArgs e)
    {
        string filename = "icon.png";//如果不是png类型,须转换
        System.Drawing.Bitmap bitmap = new System.Drawing.Bitmap(filename);
        for (int y = 0; y < 100; y++)
        {
            for (int x = 0; x < 100; x++)
            {
                if ((x - 50) * (x - 50) + (y - 50) * (y - 50) > 50 * 50)
                {
                    bitmap.SetPixel(x, y, System.Drawing.Color.FromArgb(0, 255, 255, 255));
                }
            }
        }
     
        Graphics g = CreateGraphics();
        g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
        g.DrawImage(bitmap, new Point(50, 50));
        g.DrawEllipse(new Pen(Color.LightGray), 50, 50, 100, 100);
        g.Dispose();
    }