SriKanthg143
SriKanthg143

Reputation: 59

GDI+ RotateFlip is not rotating on WMF Image?

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

Answers (2)

Dan Byström
Dan Byström

Reputation: 9244

Use Graphics.RotateTransform and Graphics.ScaleTransform instead. Look here for inspiration: flip coordinates when drawing to control

Upvotes: 1

Andrew Komiagin
Andrew Komiagin

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

Related Questions