www.mxdraw.com
|
矩阵变换自定义实体事件回调函数指针
[id(246) , helpstring("property ImpTransformByFun"), hidden, nonbrowsable]
IDispatch* ImpTransformByFun;
例如: JS
function TransformByFun(pCustomEntity, pMatXform) { var sGuid = pCustomEntity.Guid; if (sGuid == "TestMxCustomEntity") { if (!pCustomEntity.IsHave("ept")) return; var stp = pCustomEntity.GetPoint("spt"); if (stp == null) return; var ept = pCustomEntity.GetPoint("ept"); if (ept == null) return; stp.TransformBy(pMatXform); ept.TransformBy(pMatXform); pCustomEntity.SetPoint("spt", stp); pCustomEntity.SetPoint("ept", ept); mxOcx.SetEventRet(1); } }