Solved

WMF Rotation ?

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
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 be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

707 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

17 Experts available now in Live!

Get 1:1 Help Now