?
Solved

WMF Rotation ?

Posted on 1998-06-30
3
Medium Priority
?
901 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
slinky earned 300 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

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…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
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.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
Suggested Courses

771 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