C# 消除绘制图形缩放时抖动

2025-04-06 02:05:52
推荐回答(1个)
回答1:

先把图像画在内存里,然后再取出来就行了。

Graphics g1 = this.CrateGraphic();
BufferedGraphicsContext currentContext = BufferedGraphicsManager.Current;
BufferedGraphics myBuffer = currentContext.Allocate(g1, displayRec);
Graphics g = myBuffer.Graphics;
g.DrawImage(图片, x, y);
myBuffer.Render();
myBuffer.Dispose();