Solved

WMF Rotation ?

Posted on 1998-06-30
3
890 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

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…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

839 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