110,538
社区成员
发帖
与我相关
我的任务
分享
public Form1()
{
InitializeComponent();
pictureBox1.Load("https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/monkey/33.gif");
var bm = new Bitmap(pictureBox1.Width, pictureBox1.Height);
var bg = pictureBox1.Image;
var g = Graphics.FromImage(bm);
for (var x = 0; x < bm.Width; x += bg.Height)
{
for (var y = 0; y < bm.Height; y += bg.Height)
{
g.DrawImage(bg, x, y);
g.DrawImage(bg, new Point[] { new Point(x - bg.Width / 2, y - bg.Height / 2), new Point(x + bg.Width / 2, y - bg.Height / 2), new Point(x - bg.Width / 2, y + 20) });
}
}
pictureBox1.Image = bm;
}