0
没有影响:UIComponent的宽度和高度,有鉴于此代码对雪碧
var circle:Sprite = new Sprite();
circle.graphics.beginFill(0xFFCC00);
circle.graphics.drawCircle(0, 0, 20);
var uiComp:UIComponent = new UIComponent();
uiComp.x = 100;
uiComp.y = 100;
uiComp.measuredHeight = 0;
uiComp.measuredWidth = 0;
uiComp.addChild(circle);
addChild(uiComp);
为什么改变uiComp的宽度和高度不会影响到雪碧? UIComponent不会为Sprite提供一个Graphics对象,它限制了Sprite可以绘制的区域?
@JTt iirc,这两个人是背对背的回答。幸运的是@flexwheel只问了两个问题,并找到[其他线程](http://stackoverflow.com/questions/1611980/where-in-the-framework-is-the-graphics-object-passed-around-to-实现绘图)很容易。 – Amarghosh 2011-04-06 05:25:04
@JTt明白这一点。在我的辩护中,当前问题的答案完全没有提及另一个线程。 – Amarghosh 2011-04-07 10:35:41