0

I am working on converting the EMF file to RTF file.

I am having a problem on converting the (x,y) coordinates (in EMR_LINETO record) to twips.

So please post the conversion factor.

skaffman
  • 398,947
  • 96
  • 818
  • 769
Bharat
  • 6,828
  • 5
  • 35
  • 56

1 Answers1

2

A Twip is twentieth of a point, a point is 1/72 of an inch. So if there's no scaling in the metafile a twip should be 1/1440 of an inch. If you're converting from, say, screen pixels to twips, you'd use GetDeviceCaps to find out the number of pixels per inch. So;

TwipsX = PixelsX * 1440 div GetDeviceCaps(DC, LOGPIXELSX);
Sertac Akyuz
  • 54,131
  • 4
  • 102
  • 169