coldboy
asked on
Problem with TMetafile: The size is not kept!
Dear EE!
I want to convert a Object (like Mathtype Equation, ChemSketch Object) from Word to Bitmap.
So I do these work:
Copy Object to Clipboard (I do it manually). Then Use TMetafile to Redraw it (I do it by Delphi): TMetafile.Assign(Clipboard ) and then:
TBitmap.Width:= TMetafile.Width; TBitmap.Height:= TMetaFile.Height;
TBitmap.Canvas.Draw(0,0,TM etaFile)
But a problem: the size of the image(width x height) is changed (become smaller)
Can you suggest me some enhanced Component or show me how to fix this problem?
Thanks much!
I want to convert a Object (like Mathtype Equation, ChemSketch Object) from Word to Bitmap.
So I do these work:
Copy Object to Clipboard (I do it manually). Then Use TMetafile to Redraw it (I do it by Delphi): TMetafile.Assign(Clipboard
TBitmap.Width:= TMetafile.Width; TBitmap.Height:= TMetaFile.Height;
TBitmap.Canvas.Draw(0,0,TM
But a problem: the size of the image(width x height) is changed (become smaller)
Can you suggest me some enhanced Component or show me how to fix this problem?
Thanks much!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Thats fine, the only thing you have to watch out for is that delphi gets screen.pixelsperinch from a call to
GetDeviceCaps(Screen.Handl e,LogPixel sY);
now thats fine because in 99.999% of screens a pixel is square. However if you where to use the same code say to write to a printer, then its not always the case and its best to get individual measurements for X & Y.
But its fine for what your doing
Good Luck
GetDeviceCaps(Screen.Handl
now thats fine because in 99.999% of screens a pixel is square. However if you where to use the same code say to write to a printer, then its not always the case and its best to get individual measurements for X & Y.
But its fine for what your doing
Good Luck
ASKER