绘制光栅图形
[id(73), helpstring("method DrawImage")] LONGLONG DrawImage(DOUBLE dPosX, DOUBLE dPosY, DOUBLE dScale, DOUBLE dAng, BSTR pszFilePath);
参数 |
说明 |
DOUBLE dPosX |
插入点的X坐标 |
DOUBLE dPosY |
插入点的Y坐标 |
DOUBLE dScale |
光栅图形的缩放比例 |
DOUBLE dAng |
旋转角度 |
BSTR pszFilePath |
光栅图的文字路径,支持http://开头的网络路径. |
返回光栅图对象id
例如: c#插入图块,把图块左下角设置成插入基点.
MxDrawRasterImage image = (MxDrawRasterImage)axMxDrawX1.ObjectIdToObject(axMxDrawX1.DrawImage(0, 0, 1.0, 0, "E:\111.jpg")) ; MxDrawPoint Origin; MxDrawVector3d uCorner; MxDrawVector3d vOnPlane; image.GetOrientation(out Origin, out uCorner, out vOnPlane); Double dW = uCorner.Length(); Double dH = vOnPlane.Length(); uCorner.Normalize(); vOnPlane.Normalize(); uCorner.Mult(100); vOnPlane.Mult(200); image.SetOrientation(Origin, uCorner, vOnPlane); axMxDrawX1.ZoomAll();
例如: c#插入图块,给图片重新取一个名,防止与之前名称重复.
axMxDrawX1.DrawImage(0, 0, 1, 0, "i:\1.jpg,newname");