A
Alexander Gorbylev
Hi!
Let the size of vector is e.g. 3.5".
I render the same vector on a printer & a screen on the same procedure:
printDoc_BeginPrint(object sender, PrintEventArgs e)
{
....
vector.Width * g.DpiX
....
}
On the paper (300/600dpi) or a preview on the screen (100%) the vector size
is correct (=3.5")
But when I put a metafile on clipboard by ClipboardMetafileHelper and paste
it to other programms,
I get the resized picture (~3.3"). Why?
*****************************
to put I use:
ClipboardMetafileHelper.PutEnhMetafileOnClipboard(this.Handle, mf )
{
bool bResult = false;
IntPtr hEMF, hEMF2;
hEMF = mf.GetHenhmetafile();
if (!hEMF.Equals(new IntPtr(0)))
{
hEMF2 = CopyEnhMetaFile(hEMF, new IntPtr(0));
.......
IntPtr hRes = SetClipboardData(14 /*CF_ENHMETAFILE*/, hEMF2);
bResult = hRes.Equals(hEMF2);
CloseClipboard();
}
*****************************
Best regards,
Alexander
Let the size of vector is e.g. 3.5".
I render the same vector on a printer & a screen on the same procedure:
printDoc_BeginPrint(object sender, PrintEventArgs e)
{
....
vector.Width * g.DpiX
....
}
On the paper (300/600dpi) or a preview on the screen (100%) the vector size
is correct (=3.5")
But when I put a metafile on clipboard by ClipboardMetafileHelper and paste
it to other programms,
I get the resized picture (~3.3"). Why?
*****************************
to put I use:
ClipboardMetafileHelper.PutEnhMetafileOnClipboard(this.Handle, mf )
{
bool bResult = false;
IntPtr hEMF, hEMF2;
hEMF = mf.GetHenhmetafile();
if (!hEMF.Equals(new IntPtr(0)))
{
hEMF2 = CopyEnhMetaFile(hEMF, new IntPtr(0));
.......
IntPtr hRes = SetClipboardData(14 /*CF_ENHMETAFILE*/, hEMF2);
bResult = hRes.Equals(hEMF2);
CloseClipboard();
}
*****************************
Best regards,
Alexander