www.mxdraw.com
内容索引主面
前一个向上下一个
_DMxDrawX::ImpMoveGripPointsAtFun 数据 成员

移动自定义实体夹点事件回调函数指针

IDL
[id(245) , helpstring("property ImpMoveGripPointsAtFun"), hidden, nonbrowsable]
IDispatch* ImpMoveGripPointsAtFun;

例如: JS

function MoveGripPointsFun(pCustomEntity, lGridIndex, dOffsetX, dOffsetY) {

    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;


        if (lGridIndex == 0) {
            stp.x = stp.x + dOffsetX;
            stp.y = stp.y + dOffsetY;
            pCustomEntity.SetPoint("spt", stp);
        }
        else {
            ept.x = ept.x + dOffsetX;
            ept.y = ept.y + dOffsetY;
            pCustomEntity.SetPoint("ept", ept);
        }

        mxOcx.SetEventRet(1);
    }
}
Copyright (c) 2010. All rights reserved.
你认为该帮助怎么样? 发送反馈信息!