English 中文(简体)
如何找到显示器的宽度和高度 EaselJS的目标
原标题:How to find the width and height of a DisplayObject in EaselJS
var tf = new Text(letter, font, color);
var tfContainer = new Container();
tfContainer.addChild(tf);

我怎么能发现 t泥的方方面面?

我知道,我可以使用tf.getMeasuredWidth()和tf.getMeasuredLineHala(),但我只使用更一般性的方法。 除此之外,还进行了准确的回归测量。

最佳回答

@Akonsu是正确的,不支持 w和高,主要是因为计算出它非常昂贵,尤其是在儿童变化的病媒和群体中。 我们正在考虑这一问题,但还没有具体的计划。

- Lanny(gskinner.com)

问题回答

我阅读了他们计划增加的内容,但我知道,还没有这样的功能。

是,在显示器上加宽和高。 目的必须。 如果规模无效,需要重新计算,则可以采用计算方法,而且只有在你试图达到规模时,才能被称作。





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签