设置图形大小缓冲区域Rectangle drawRectangleBufferedGraphicsContext currentContext = BufferedGraphicsManager.Current;BufferedGraphics myBuffer = currentContext.Allocate(this.CreateGraphics(), drawRectangle);Graphics g = myBuffer.Graphics;