GDI+RotateFlip未在WMF图像上旋转

GDI+ RotateFlip is not rotating on WMF Image?

本文关键字:旋转 图像 WMF 未在 GDI+RotateFlip      更新时间:2023-10-16

在C++中,当使用GDI+RotateFlip函数旋转WMF图像时,图像不会被旋转。我用下面的代码来旋转。

Graphics graphics(hdc);
Image image(L"Crayons.WMF");
image.RotateFlip(Rotate90FlipX);
graphics.DrawImage(&image, 10, 10, image.GetWidth(), image.GetHeight());

RotateFlip功能可正确旋转bmp和jpg图像。

RotateFlip功能是否支持WMF图像?

提前谢谢。

元文件是图形命令的列表,而不是光栅表示,因此旋转翻转不起作用。

将图元文件绘制为位图,然后旋转该位图。

请改用Graphics.RotateTransform和Graphics.ScaleTransform。在这里寻找灵感:绘图时翻转坐标以控制