Reputation: 59
In C++ when using GDI+ RotateFlip function for rotating WMF image the image is not getting rotated. I used below code for rotating.
Graphics graphics(hdc);
Image image(L"Crayons.WMF");
image.RotateFlip(Rotate90FlipX);
graphics.DrawImage(&image, 10, 10, image.GetWidth(), image.GetHeight());
RotateFlip function rotates bmp and jpg images properly.
Will RotateFlip function support WMF image?
Thanks in advance.
Upvotes: 2
Views: 650
Reputation: 9244
Use Graphics.RotateTransform and Graphics.ScaleTransform instead. Look here for inspiration: flip coordinates when drawing to control
Upvotes: 1
Reputation: 6556
Metafiles are a list of drawing commands, not a raster representation so the rotate flip doesn't work.
Draw the metafile to a bitmap and then rotate that.
Upvotes: 1