[]getGraphicBounds() 的问题
文档中 提到,参数 true 时 为 使用图片的真实大小,那么内部应该重新计算的,不应该作用计算过的值
也许内容判断了,发后改变后才重新计算,但是如下使用时,会发生错误
var rect:Rectangle = rcurDs.getGraphicBounds(true)
rect.x -= rcurDs.pivotX;
rect.y -= rcurDs.pivotY;
引用值被改变了 再次使用 getGraphicBounds 时 是个错误的值
也许内容判断了,发后改变后才重新计算,但是如下使用时,会发生错误
var rect:Rectangle = rcurDs.getGraphicBounds(true)
rect.x -= rcurDs.pivotX;
rect.y -= rcurDs.pivotY;
引用值被改变了 再次使用 getGraphicBounds 时 是个错误的值
没有找到相关结果
已邀请:
要回复问题请先登录
2 个回复
ymsdandan
赞同来自:
rt1223103
赞同来自:
trace(rect.toString());
rect.x -= rcurDs.pivotX;
rect.y -= rcurDs.pivotY;
trace(rect.toString());
rect = rcurDs.getGraphicBounds(true);
trace(rect.toString());
你打个显示对象,试一试啊