Solved

WMF Rotation ?

Posted on 1998-06-30
3
886 Views
Last Modified: 2008-02-01
How can i Rotate the WMF(or EMF) image with 90 or 270 angle?
0
Comment
Question by:kjinihl
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
slinky earned 100 total points
ID: 1166980
I have done a similar thing in the past where I scaled up/down a META file.
I assume as this question is in the C++ area that you want to do this in code and not using a graphics package.

In Visual C++,
You have to use the EnumMetaFile and then loop through all the GDI calls in the Metafiles. You then have to look at each call (you can use a big switch statement for each type of call) and then adjust the co-ordinates making up the call accordingly depending on the angle of rotation.

You will first need to decide on the translation method i.e. which corner of the Metafile you want to rotate about. I suggest you use the (0,0) corner, it will make the maths easier.

There is a (small) chance that I can find the code I used for this kind of thing but hopefully this should give you enough of an idea,
0
 

Author Comment

by:kjinihl
ID: 1166981
Thanks Slinky, but give me a more hint please...
How can I analyze the metafile processfunctions and How can I
know the metafiledatatable. .... etc?
please reply me and give me a more sight of the EnumMetaFile()..

0
 
LVL 1

Expert Comment

by:slinky
ID: 1166982
The best thing is if I can dig out the code I have that does this.
Watch this space.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now