Available in the LEADTOOLS Imaging toolkit. |
BitmapDpi example for Visual C++ 4.0 and later
float x, y;
OLE_HANDLE hAuto = m_Lead1.AnnCreate (ANNOBJECT_AUTOMATION, FALSE, FALSE);
x = m_Lead1.AnnGetBitmapDpiX (hAuto);
y = m_Lead1.AnnGetBitmapDpiY (hAuto);
CString msg;
msg.Format("X: %f, Y: %f", (double)x, (double)y);
AfxMessageBox(msg);
m_Lead1.AnnSetBitmapDpiX (hAuto, x + 2, FALSE);
m_Lead1.AnnSetBitmapDpiY (hAuto, y + 2, FALSE);
x = m_Lead1.AnnGetBitmapDpiX(hAuto);
y = m_Lead1.AnnGetBitmapDpiY(hAuto);
msg.Format("X: %f, Y: %f", (double)x, (double)y);
AfxMessageBox(msg);