我有一个位图和一个面板。两者都是500 x 500像素。为什么位图比面板大得多?
代码示例:
Bitmap img = new Bitmap(500, 500);
//panel properties set by properties tab
Graphics g = Graphics.FromImage(img);
g.DrawEllipse(new Pen(Color.Black, 2), 0, 0, 500, 500);
pnl.BackgroundImage = img;
pnl.Refresh();
我做错了什么/失踪了?提前谢谢!