www.mxdraw.com
|
把一个实体显示保存到一个jpg Base64编码的字符串中.
static CString Mx_DrawEntityToJpgBase64(IN LONG lId, IN int iWidth = -1, IN int iHeight = -1, IN COLORREF* pBkColor = NULL);
参数 |
说明 |
IN LONG lId |
该实体对象的id |
IN int iWidth = -1 |
jpg文件的像素宽度,-1默认为1000 |
IN int iHeight = -1 |
jpg文件的像素高度,-1默认为1000 |
IN COLORREF* pBkColor = NULL |
绘制的背景颜色,为空取当前背景颜色. |
返回 Base64编码
例如: C#代码.
MxDrawUtility mxUtility = new MxDrawUtility(); MxDrawPoint pt; MxDrawEntity ent = mxUtility.GetEntity(out pt, "选择实体:"); if (ent == null) { return; } MxDrawResbuf param = new MxDrawResbuf(); param.AddObjectId(ent.ObjectID); MxDrawResbuf res = (MxDrawResbuf)axMxDrawX1.CallEx("Mx_DrawEntityToJpgBase64", param); string sBase64Code; if (res.AtString(0) == "Ok") { sBase64Code = res.AtString(1); }