문제

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.

도움이 되었습니까?

해결책

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);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top