[]getGraphicBounds() 的问题

文档中 提到,参数 true 时 为 使用图片的真实大小,那么内部应该重新计算的,不应该作用计算过的值
也许内容判断了,发后改变后才重新计算,但是如下使用时,会发生错误
var rect:Rectangle = rcurDs.getGraphicBounds(true)
    rect.x -= rcurDs.pivotX;
    rect.y -= rcurDs.pivotY;
 
引用值被改变了    再次使用  getGraphicBounds 时 是个错误的值
已邀请:

ymsdandan

赞同来自:

建议您发个demo过来

rt1223103

赞同来自:

var rect:Rectangle = rcurDs.getGraphicBounds(true);
trace(rect.toString());
    rect.x -= rcurDs.pivotX;
    rect.y -= rcurDs.pivotY;
trace(rect.toString());
rect = rcurDs.getGraphicBounds(true);
trace(rect.toString());
 
你打个显示对象,试一试啊
 

要回复问题请先

商务合作
商务合作