trichview.com

trichview.support




Re: Different size of metafile picutres in RVEdit and RTF


Return to index


Author

Message

Sergey Tkachenko

Posted: 10/01/2002 15:20:24


> Thanks for the fixes in 1.6.48, particulary the loading of the NextParaNo

> property from RVF and not modifying the Inch=0 property of enhanced

> metafiles.

>

> I have not noticed any change in the RVF file when saving metafiles

without

> body. How should I understand:

>   - saving extra properties for controls and pictures in RVF in mode when

>     they are saved without "bodies"


There was a bug in this place. It does not affect cases when pictures are

saved just in RVF, or pictures without extra properties (such as imagewidth,

imageheight, vshift, etc).


As for the file that you have posted in the thread below (Error reading RVF

file),

I think it was not saved by RichView.

Probably it was loaded in a stringlist (or from a textfile) and then

incorrectly

assembled back.


>

> I still have the problem that my metafile pictures are too large in RTF. I

> have made the pictures to fit the width of the page when printed from

> RVEdit, but they are much larger when printed from Word. I found that the

> width is close to MMWidth of the metafile when printed from Word (RTF),

but

> when printed from RVEdit, the width is much less (167 instead of 194 mm).

> Because I can scale the pictures only in one way, the printing size is

> either wrong in Word or in RVEdit. Because RVEdit does not print according

> to MMWidth, I think the metafiles should also not be exported to RTF with

> the actual MMWidth but their MMWidth  should be set such that the relativ

> sizes between tables and pictures are maintained.


As I said, RichView and Delphi uses <Width,Height>, Word uses <MMWidth,

MMHeight>.

When inserting metafile from RTF, RichView sets item's extra properties

(ImageWidth and ImageHeight) so that they reflect MMWidth and MMHeight.

So images loaded from RTF have the same size as in MS Word (achieved by

stretching), and then you save this file back in RTF, they still will be of

the same size.


If you want images to have the same size in RichView and Word, just assign

the item's extra properties:


// code for inserting image


if gr is TMetafile then begin

  rve.BeginUndoGroup(rvutInsert);

  rve.SetUndoGroupMode(True);

  rve.InsertPicture('',gr,rvvaBaseLine);

  rve.SetCurrentItemExtraIntProperty(rvepImageWidth, gr.Width, False);

  rve.SetCurrentItemExtraIntProperty(rvepImageWidth, gr.Height, False);

  rve.SetUndoGroupMode(False);

  end

else

  rve.InsertPicture('',gr,rvvaBaseLine);







Powered by ABC Amber Outlook Express Converter