图象标记对象,该对象会显示一个图片,该图片大小不会随视区的缩放而改变。 多用于在图上标记某个信息。
class McDbMxImageMark : public McDbEntity;
McDbMxImageMark.h
例如:MxDraw中代码
McDbObjectId MxDraw::DrawImageMark(MXDRAWOCXHANDLE hOcx, CString sImageFile, McGePoint3d ptPos, double dImageScale /*= 1.0*/, bool isCDCDraw /*= true*/, bool isDrawFlag /*= false*/, double dDocWidth /*= 1.0*/, double dDocHeight /*= 1.0*/) { if(hOcx == NULL) hOcx = MxDraw::GetCurOcxHandle(); if(hOcx == NULL) { MXASSERT(0); return McDbObjectId::kNull; } McDbDatabase* pDatabase = MxDraw::GetDatabase(hOcx); McDbMxImageMark* pImageMark = new McDbMxImageMark; pImageMark->SetImageFile(sImageFile); pImageMark->setWidth(dDocWidth); pImageMark->setHeight(dDocHeight); pImageMark->setPosition(ptPos); pImageMark->setCDCDraw(isCDCDraw); pImageMark->setDrawFlag(isDrawFlag); pImageMark->setScale(dImageScale); Mcad::ErrorStatus ret = MrxDbgUtils::addToCurrentSpace(pImageMark,pDatabase); MXASSERT(ret == Mcad::eOk); McDbObjectId retId = pImageMark->objectId(); pImageMark->close(); return retId; }