[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: How to convert to Standard WMF?
From:       Ariya Hidayat <ariya () kde ! org>
Date:       2003-01-16 11:25:20
[Download RAW message or body]


>             // grab bounding box, find original size
>             unsigned left = data[6]+(data[7]<<8);
>             unsigned top = data[8]+(data[9]<<8);
>             unsigned right = data[10]+(data[11]<<8);
>             unsigned bottom = data[12]+(data[13]<<8);
>             origWidth = (long) (MM_TO_TWIP(right-left)/100);
>             origHeight = (long) (MM_TO_TWIP(bottom-top)/100);
>
> According to a O'Reilly, for Placeable Metafiles, "Left, Top, Right, and
> Bottom contain the coordinates of the upper-left and lower-right corners of
> the image on the output device. These are measured in twips", not
> millimetres.

Really ? Some WMF files (which I have) show that left, top, right, and bottom 
are specified in 1/100 mm. 

Actually, what I did was loading a WMF picture into MS Word document and 
saving it as RTF file and there I found that original width and height of the 
picture in RTF (specified by \picwgoal and \pighgoal) are the same as (or 
close to ) the value of (right-left) and (bottom-top). This means that those 
values are in 1/100 mm, as RTF specifies \picwgoal and \pichgoal.

When I inserted the same picture in KWord, saved the document to RTF and then 
opened it in MS Word, it's just the same as if I had inserted the picture 
directly in MS Word. I even did some arbritrary scaling to the picture. 
That's why I was quite sure the code was right. Did I really miss something?


_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic