TextLayout 클래스 내에서 텍스트의 높이를 찾는 방법이 있는지 아는 사람 있습니까?텍스트 찾기 TextLayout 구성 요소의 높이
나는 그렇게처럼 내 TextLayout의 객체를 만드는 중이라서 : 나는 높이를 찾을 기대
this._textFlow = new TextFlow();
this._paragraphElement = new ParagraphElement();
this._textFlow.addChild(this._paragraphElement);
this._span = new SpanElement();
this._span.text = this._text;
this._paragraphElement.addChild(this._span);
if(this._textAlign != ''){
this._paragraphElement.textAlign = this._textAlign;
}
var tempTextWidth:Number;
var tempTextHeight:Number;
if(this._textWidth > 0){
tempTextWidth = this._textWidth;
} else {
tempTextWidth = NaN;
}
if(this._textHeight > 0){
tempTextHeight = this._textHeight;
} else {
tempTextHeight = NaN;
}
this._containerController = new ContainerController(this, tempTextWidth, tempTextHeight);
this._textFlow.flowComposer.addController(this._containerController);
this._textFlow.flowComposer.updateAllControllers();
모든 공용 속성은 this._textFlow.lineHeight로 정의되지 않습니다.
감사 상기 documentation 따르면
높이 관련 속성이 값을 가져 오기 전에 한 번 표시해야 할 수 있습니다. –