BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Resizing a metafile

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Graphics)
View previous topic :: View next topic  
Author Message
Analian
Guest





PostPosted: Mon Oct 24, 2005 12:49 pm    Post subject: Resizing a metafile Reply with quote



I've created a metafile within a TMetafile object with some dimensions.
The metafile contains some lines.
I'd like to change the dimensions of the metafile but in such a way that to
preserve the ratios of the lines to the dimensions.
For example:

previous height = 200, previous width = 200, line (50, 50) - (200, 200)
new height = 100, new width = 100, line (25, 25) - (100, 100)

previous height = 100, previous width = 200, line (50, 50) - (200, 200)
new height = 25, new width = 100, line (50, 12.5) - (100, 50)

I could accomplish this by editing each line in the metafile but I don't
know how to mess with the object stored within the metafile, but I guess
what I want to do is a common thing to do with metafiles so it should have a
routine to do it (not sure).
So how do I do it? Thank you.

Analian


Back to top
Thorsten Kettner
Guest





PostPosted: Mon Oct 24, 2005 2:25 pm    Post subject: Re: Resizing a metafile Reply with quote




"Analian" <analian (AT) mail (DOT) bg> wrote:
Quote:
I've created a metafile within a TMetafile object with some
dimensions. The metafile contains some lines. I'd like to
change the dimensions of the metafile but in such a way that
to preserve the ratios of the lines to the dimensions.

When you draw the metafile with StretchDraw it will be streched
to fit the specified rectangle. All you have to do is to give it
a rect with the correct ratio.

Back to top
Analian
Guest





PostPosted: Wed Oct 26, 2005 9:25 pm    Post subject: Re: Resizing a metafile Reply with quote



Thank you.
This helps me do what I want to.

Analian


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Graphics) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.