1

我使用此代码将 png 绘制到我的设备上下文中:

auto_ptr<Gdiplus::Graphics> g(Gdiplus::Graphics::FromHDC(pDC->GetSafeHdc()));
g->DrawImage(pPng, xDest, yDest, xSrc, ySrc, nSrcWidth, pSrcHeight, Gdiplus::UnitPixel);

这会按照应有的方式粘贴 png。我用 GIMP 编辑 png。我的函数现在绘制 png拉伸。我用 mspaint 对其进行编辑,并进行完全相同的更改。png画得很好。

这是怎么发生的?

4

0 回答 0